Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Problematic file format (duplicate moov box) (Read 4574 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Problematic file format (duplicate moov box)

Dear all,

when trying to play some of my .m4a-files foobar 0.9.5.6 gives the error message: "Unable to open item for playback (Unsupported format or corrupted file (duplicate moov box))".

Before upgrading to the new version (I used 0.83 before) everyhting was just fine, and the files are also played without problems by other players (e.g. WMP). What do I have to do to be able to use foobar again to play and manipulate the tags of these files?

Thanks in advance for any help!

Cheers,

Peter

Problematic file format (duplicate moov box)

Reply #1
There were a lot of improvements in validity checks in input file decoders for greater security and stability.

Two "moov" boxes in one file don't make sense and are in violation of MPEG 4 container standard:
Quote
8.1.1 Movie Box - Definition
Box Type: ‘moov’
Container: File
Mandatory: Yes
Quantity: Exactly one

You might need to re-mux the files so that they are properly structured.

(And yes, just because some other software plays such tracks doesn't mean they are fine and hacks should be added to fb2k to play broken files.)
Full-quoting makes you scroll past the same junk over and over.

Problematic file format (duplicate moov box)

Reply #2
(And yes, just because some other software plays such tracks doesn't mean they are fine and hacks should be added to fb2k to play broken files.)
Let me just express that not anybody agrees here. I don't. http://en.wikipedia.org/wiki/Robustness_Principle is what I agree with. And it's not always necessarily "hacks" (additional code) which are needed to interpret faulty data. Also less code could make a more liberal data interpreter.

Problematic file format (duplicate moov box)

Reply #3
That principle is great in some cases - for example, almost all text-based protocols specify that any number of whitespace characters can occur between individual tokes. Still there are many implementations out there which just break down if the format of incoming data is not ideal, purely because of laziness of their authors.

It's also very useful to follow this philosophy in cases of non-fatal errors. If an unexpected block is found where it doesn't belong, it can be simply ignored. If invalid data are found in a non-mandatory block, it can be just skipped, with a warning for the user.

But we are talking about a mandatory, basic MPEG 4 block, containing all information about tracks appearing in the file, codec parameters and other metadata. If there are two such boxes, which will you use? And how will you decide? And why should you care if such scenario should not be possible at all?

We don't know why OP's file is invalid in this case. But if it's a result of broken muxer, why shouldn't its author be pushed to fix it in the first place? It's his responsibility to produce valid files. The world already has way too many sloppy and non-standard implementations, and those cost way too much money and cause way too many delays and way too many defects.
Full-quoting makes you scroll past the same junk over and over.

Problematic file format (duplicate moov box)

Reply #4
Thanks for the quick answer. However -- what does that mean "remux". Can I do it with foobar? I am quite sure I originally used foobar to convert the files into m4a from CD.
Can I work on the files at hand or do I have to sort out the big box with CDs from the back of the cave?

Cheers, Peter

Problematic file format (duplicate moov box)

Reply #5
Mu(ltiple)xing is the process where you take the individual tracks and wrap them inside a container file, add index for seeking, tags, etc. It's quite simple here with only one audio track, muxing a movie with several A/V tracks is much more interesting.

By remuxing I mean rewriting the container while leaving the compressed audio data as they are, without reencoding and introducing quality loss. So you'll need some kind of tool which can manage MP4 files (add/remove tracks and metadata) and won't choke on the invalid headers.

If you know that an older fb2k version handled such files fine, you might try just use the Tagging/Rewrite file tags... command in it.
If that doesn't work, you'll have to look elsewhere. I have only very little experience in this area, so I can't make a direct recommendation, however Googling "mp4 tools", "mp4 muxer" and similar revealed quite a few such applications.

I could not get MP4Box to do the operation without losing metadata. But mp4UI, although maybe a bit outdated, seemed simple yet capable to do what you need - backup the original, load a test "invalid" file, right click on the tree, choose "Optimize" and close it. Note that I don't have an MP4 file with two "moov" blocks, so I could not test the exact problem you have, but as long as the file structure is rewritten, it should help in your case.

See if something simple works for you and if not, it might be easier to just rerip the affected tracks than spend time trying to find a solution.
Full-quoting makes you scroll past the same junk over and over.