Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
5th July 2015, 10:17 | #1 | Link | |
Registered User
Join Date: Nov 2012
Posts: 10
|
[x /H264]: moov atom at the front of the file (Fast Start)
Hi all,
I am working with Avisynth, megui, and h264 to create the ultimate quality presets for YouTube. YouTube's suggestion is to put Quote:
Please assist if there is a command line I can use in h264 / x264 to put moove atom to the front of file. Thank you. |
|
5th July 2015, 10:26 | #2 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
That's usually done at the muxing stage. Did you confirm that MeGUI isn't doing this already?
http://forum.doom9.org/showthread.php?t=168601 |
5th July 2015, 15:10 | #3 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
You can think of the moov atom is something like the global "index table" of the MP4 file. It can be located at the beginning of the file (before mdat atom) or at the end of the file (after mdat atom).
For local file playback it doesn't matter much, but for streaming (progressive download) you want to have the moov atom at the beginning of the file - for obvious reasons. However, x264 will append the frames to the MP4 file as they are encoded. And, since the exact size of each frame cannot be known before they have actually been encoded, the index (moov atom) will be written last, at the end of the file. So you cannot make x264 output an MP4 file with moov atom at the beginning. At least not directly. But you can achieve this easily with a tool like MP4Box or AtomicParsley! Code:
mp4box.exe -add c:\Temp\input.mp4 c:\Temp\output.mp4
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 5th July 2015 at 15:23. |
5th July 2015, 22:28 | #4 | Link |
Registered User
Join Date: Nov 2012
Posts: 10
|
Thanks for helping me out sneaker_ger and LoRd_MuldeR.
As it stands I am using Sony Vegas to output a .avi with Debugmode frameserver. Then I grab that .avi Megui and create an AVS for it and put the same .avi as the audio input. Then MeGUI muxes the two together into an mp4 - and it already puts moov atom to front! I never attempted to put moov atom to front so I figured it wasn't. By using mp4box.exe -info I was able to find that it is. I will post back here in a month or two with a guide for the ultimate presets once I am certain they are complete |
9th July 2015, 16:18 | #5 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
Which is dangerous, because the file might look like it's fine with some server/player combinations, and work horribly with others. Making Fast Start all the more important, since just having the file work in progressive download doesn't mean it'll always work. This was such a huge problem 5-20 years ago. Fortunately we now have adaptive streaming with fragmented mp4 and moof headers for commercial content delivery. |
|
Tags |
h264, x264 |
Thread Tools | Search this Thread |
Display Modes | |
|
|