Why are Vegas' MP4s renders invalid in QuickTime?

Torley wrote on 5/4/2008, 3:04 PM
Hello! I'm wondering about a strange problem that's dogged me for awhile. I've tried rendering to both "MainConcept AVC/AAC" and "Sony AVC" and and trying many finer options within, but the resulting MP4 plays in QuickTime Player with a few quirks which leads me to believe it's less than fully-compatible:

* The first frame always shows as black.
* Checking the properties (via Window menu > Show Movie Properties) shows "Data Size" to always be "-NA-".
* Trying to export the video from QuickTime into other formats results in this error:

"Error -2015: the movie contains an incorrect time value"

I generally like the quality of MainConcept AVC/AAC, and I'm hesitant to render to "QuickTime 7" because H.264 isn't available ("H.263" is but that's worse, and "MPEG-4 Video" is different, right?) and furthermore, there are no really good audio formats: I can't use MP3 or AAC, and would likely end up having to render again (with video passed through) in QuickTime.

Does anyone know how to work around this, or a better way of generating fully QuickTime-compatible files? I'd like to encode some high-quality videos which are web-streamable, but it looks like the only convincing way to do that without suffering noticeable quality losses is via QuickTime Player itself, which I can't do straight from Vegas.

Any help is enthusiastically appreciated, thank-you in advance :)

Comments

NickHope wrote on 5/4/2008, 9:53 PM
I suspect this is something to do with the order of moov and mdat atoms in the H.264 files that Vegas generates. It is the same issue that causes Flash player to buffer 100% of these mp4 files before playing them.

This can be fixed by remuxing the mp4 file in YAMB which is a GUI for mp4box. In the Advanced Settings make sure that "Overwrite an existing output file" is checked and that "Store file with all media data first (useful for streaming)" is NOT checked (yes, that's the opposite of how it sounds it should be). Screenshots about 70% of the way down this page.

Personally I'm not a big fan of the H.264 options available in Vegas. They render very fast but I find the quality is not even as good as my Xvid videos at the same bitrate. The MainConcept AVC/AAC codec is pretty old. I am now making H.264 files using the free open source x264 codec inside MeGUI and there are Quicktime-compatible templates available in there (CE-Quicktime). I do it by frameserving from Vegas to AVISynth using the Debugmode Frameserver. In AVISynth I convert the colorspace of the video, deinterlace and resize with an AVS script such as this:

AviSource("d:\fs.avi")
ConvertToYV12()
TDeint(order=1)
LanczosResize(512,288)


MeGUI then reads the output of that script. For audio I am using MeGUI's NDAAC-HE-64kbps template which gives incredible quality for 64kbps (you also need to install Nero AAC to get that working).

But bear in mind this whole x264/Nero rendering workflow is very involved compared to doing AVC/AAC direct in Vegas. Also note that even though the finished mp4 file is compatible with Quicktime, only the audio will open in Vegas Pro 8.0b and it won't open in Edius. I don't know why. If you do not include an audio stream then it will open fine in Vegas.
Torley wrote on 5/9/2008, 2:27 PM
Thanks MUCHLY for the technical insight, Nick!

I reckon I'll continue rendering to an intermediate format (Photo JPEG) and re-rendering into H.264 MP4 from QuickTime for the time being.

I'm curious to investigate the pipeline you suggested, tho.