Next Page

ffmpeg Decodes .xma Too Fast? by Kurausukun at 4:34 AM EST on December 10, 2016
I just tried using the latest build of ffmpeg to decode an .xma file (specifically, an .xma file from Sonic 06, which uses xma1), and ffmpeg does successfully output the file, but it plays too fast. Does anyone else have this issue, or have any experience/tips in decoding .xma files with ffmpeg?
by bnnm at 7:08 AM EST on December 10, 2016
Looks like XMA2 with XMA1 header, so it decodes incorrectly? (it has XMA2 stuff at the very end)
Meaning vgmstream's FFmpeg also can't open it.

Probably fixable, I'll look into it.

I got it from joshw, I wonder it they weren't ripped incorrectly.


edited 7:09 AM EST December 10, 2016
by kode54 at 4:15 PM EST on December 10, 2016
Also look into supporting the loop points from the extra codec setup data, since FFmpeg doesn't support those.
by Kurausukun at 5:36 PM EST on December 10, 2016
I got mine directly from an ISO. I doubt joshw's was ripped incorrectly, but if you want, I can upload one here.

edited 5:37 PM EST December 10, 2016
by kode54 at 3:13 PM EST on December 11, 2016
FFmpeg needs to be tricked into ignoring the "fmt " chunks in those files, so it only parses the XMA2 chunks for format information. I tried to make it override at one point, but that didn't work. It needs to not even see the "fmt " chunks if there are "XMA2" chunks.
by bxaimc at 8:36 PM EST on December 11, 2016
*cough* I ripped it *cough*
by AnonRunzes at 8:47 PM EST on December 11, 2016
@bxaimc - Yes, and...?
by bnnm at 2:18 PM EST on December 12, 2016
Not being ripped ok was just a random thought!

I did some grotesque header forgery and it's working ok. I'll take some time to check variations and stuff though.
(maybe it's just easier to fix it in FFmpeg itself)
by kode54 at 3:44 PM EST on December 12, 2016
Chopping out the "fmt " chunk will "fix" it too. Maybe add a check to FFmpeg to search for the XMA2 chunk separately first, then bypass the fmt chunk if an XMA2 chunk is found? And don't forget to submit your patch to the ffmpeg devel mailing list!
by bnnm at 4:39 PM EST on December 12, 2016
The main problem is that the XMA2 chunk has some variations but FFmpeg only supports one.
I can reconstruct the header ignoring the fmt and moving XMA2 data around where FFmpeg expects it but it's so ugly.

Patching FFmpeg wouldn't be so hard but on the other hand it could take a while (months?) to propagate plus having to go through all their hoops.

I think I'll do a quick hack and call it a day.

edited 4:39 PM EST December 12, 2016

Next Page
Go to Page 0 1

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source