PDA

View Full Version : H.264 failure to mux properly


Quince
8th March 2006, 17:23
Using MeGui, x264, and faac.exe, I created the MP4 video and audio streams from a set of VOBs. The video and audio files play fine individually, in both VNC and QuickTime. Then I tried to MUX them, first with MeGui (always results in unhandled exception of MP4Box after the first phase reaches the end), then with YAMB. YAMB completes it successfully, except it creates a file with a messed up video stream information:

MPEG-4 Video import - 0 x 0 @ 25.0000 FPS
Indicated Profile: Simple Profile @ Level 1

Removed 197 N-VOPs
IsoMedia import - track ID 1 - Audio (SR 48000 - 2 channels)

Saving to C:\Documents and Settings\Prune\My Documents\A.mp4: 0.500 secs Interleaving

Adjusting visual track size to 0 x 0

What the fuck?! The input video file is 720 x 480 @ 29.97 FPS. VNC will only play audio from this, and QuickTime won't even open it, saying it contains invalid data. So I spend 10 hours encoding to create a 3.7 GB garbage file?! :angry:

By the way, besides a .mp4 file, what's the easiest way to also mux these into a .mov container?

ChronoCross
8th March 2006, 18:12
bad version of mp4box?

bond
8th March 2006, 21:27
update to an uptodate version of mp4box

btw remuxing mp4 to mov makes no sense

Quince
9th March 2006, 02:27
I don't understand what you mean update to an autoupdate version. I didn't come across such a version. The two versions I tried are the one linked from the Doom9 MP4 guide at some .it site, and then the one that came with YAMB itself.

Also, mp4info.exe from the MPEG4IP tools is unable to open the unmuxed video file. I don't know if that's an indication that there's a problem in the video-only file rather than with the muxer (though the players open it fine).

Why does remuxing to mov make no sense? I plan to distribute the thing to a number of users and some people only have QuickTime and I can't expect them to be searching for MP4 codecs and players (it's not a film; it's an educational video).

Quince
10th March 2006, 03:46
Update: moreover, even after I installed the newest 3ivx filters, I can't mux using that either in Graphedit. The video file connects to 3ivx Media Splitter, but the resulting AVC1 output will not allow connection to 3ivx Media Muxer.

BTW, the video file, though as I said plays fine in Quicktime and VLC, crashes WMP and if played in Graphedit through Video Renderer.

bond
10th March 2006, 19:19
Also, mp4info.exe from the MPEG4IP tools is unable to open the unmuxed video file. I don't know if that's an indication that there's a problem in the video-only file rather than with the muxer (though the players open it fine).what fileextension does the unmuxed file have?
how has the unmuxed file been created _exactly_?

Why does remuxing to mov make no sense? I plan to distribute the thing to a number of users and some people only have QuickTime and I can't expect them to be searching for MP4 codecs and players (it's not a film; it's an educational video).qt handles mp4, so you are not forced to mov when using qt
but generally you are forced to use qt when using mov, which is not the case with mp4

so its better to use mp4

Quince
11th March 2006, 06:40
Here's how the file was created: I had a set of decrypted VOB files on my HD. I used DGIndex to make the .dv2 and .avs files. I edited the .avs manually as I had messed up the deinterlacing and had to change it to kernel instead of telecide, as the video actually was fully interlaced TV camera source. The .avs and audio files played fine.
I encoded the audio in MeGui through faac.exe, ABR/160. The result plays fine in any player. Then I opened the .avs in MeGui. For x264, the options were ABR/1600, two threads (I've dual core); output type was set to .mp4.
I wasn't sure about the Queue Analysis pass and Add pre-rendering job, so I did both, in that order, before doing an Enqueue. The Add pre-rendering job began creating a file that was growing into the tens of gigabytes and I was getting low on HD space, so I killed the process and redid the video without these, just doing an Enqueue. That ran fine. The rest is as I posted above. The video file is about 3.3 GB, the audio file about 380 MB.

By the way, I no longer have the .VOBs, so I can't do the reencoding. Clearly the video data is there as VLC and QuickTime play it, but something else is messed up, like the header or whatever.

bond
11th March 2006, 12:29
hm maybe this abort, resume f*ed things up?

also the log you posted in the first post tells me your stream is mpeg-4 asp (xvid or libavcodec) and not mpeg-4 avc (x264)

run mp4info from mpeg4ip on the video .mp4 and tell what it reports

Quince
11th March 2006, 18:32
Like I said, mp4info cannot open the file.
I don't see how the file can not be x264, when I selected x264.exe as the encoder in MeGui.

bond
11th March 2006, 18:41
i assume the video file is a raw asp video stream and not an avc one

than i assume you maybe stumbled over the same mp4box bug discussed here:
http://forum.doom9.org/showthread.php?t=108420

Quince
28th March 2006, 02:53
Well I read that thread twice and I'm not sure I fully follow. I should just rename the file to .264? If this is only a bug in mp4box, what's causing the failure with the 3ivx filters I described in Graphedit?

Quince
28th March 2006, 05:25
I tried renaming to .264, and using a March 24 build of MP4Box, using YAMB interface, I get:
IsoMedia import - track ID 1 - Audio (SR 48000 - 2 channels)

Cannot find H264 start code
Error importing C:\Documents and Settings\Prune\My Documents\A.264: BitStream Not Compliant
(BitStream Not Compliant)
(BitStream Not Compliant)

BTW, in VLC player, in media info for the video file, it says "Codec: avc1"

cacepi
28th March 2006, 07:07
Cannot find H264 start code
Error importing C:\Documents and Settings\Prune\My Documents\A.264: BitStream Not Compliant
(BitStream Not Compliant)
(BitStream Not Compliant)
This doesn't necessarily mean that the file is b0rked, just that MP4Box is expecting a raw video file and throwing up an exception when it doesn't find it. Change the extension of a good mp4 file you might have to .264; it'll report the same error.

You say that it plays in both VLC and QuickTime correctly, yes? If you have QuickTime Pro you can use it to mux the audio and video into an .mp4 file.

-- Edit --

What does "Show Movie Info" (Ctrl-I) in QuickTime report?

Quince
30th March 2006, 00:53
I got it to work -- I renamed back to .mp4, and using the latest build of MP4Box I could find, it now works.

Only thing is that the muxed file crashes Windows Media Player (and the Classic one as well), though it works fine in VLC and QuickTime.

Thanks for everyone's help.

cacepi
30th March 2006, 05:46
Only thing is that the muxed file crashes Windows Media Player (and the Classic one as well), though it works fine in VLC and QuickTime.
Sounds like a DirectShow problem; incorrect splitter, perhaps?

Let's see if we can fix that. Can you tell us what the error message is?

Quince
30th March 2006, 07:04
No idea, Visual Studio's debugger comes up...

FF shows in the taskbar, decoder is libavcodec or something for H.264

nhyone
30th March 2006, 07:54
mp4box treats my .h264 video file at 25 fps too. I forced the fps to 29.97 using the options, and that works.

cacepi
30th March 2006, 09:37
No idea, Visual Studio's debugger comes up...

FF shows in the taskbar, decoder is libavcodec or something for H.264
Sounds like ffdshow is crashing. How old is the build?

Or, you can wait until Friday and get CoreAVC. Its beta version from January was already much better than ffdshow, and at $7.45 for the basic version it'll be an absolute steal.

bond
30th March 2006, 14:20
what directshow mp4 splitter do you have installed?