PDA

View Full Version : MOV to MP4 with minimal transcoding


florinandrei
14th May 2009, 02:13
Let's say there's a MOV file with an AVC video track. I want to convert it to MP4 with minimal transcoding. Ideally, no transcoding on the video track; the audio track can be transcoded to AAC if necessary.

What are the tools you would use to extract the video and the audio tracks out of the MOV file? Once I learn this part I think I can handle the rest of the process (but suggestions are welcome, of course).
A/V sync is important too - sometimes the sync is lost when extracting tracks out of some containers, so if you have any comments on that I'd like to hear them.

The purpose is to create an MP4 AVC/AAC file which is playable on many different devices and systems - in particular, playable on a PlayStation 3, served over the network by a UPnP server (Mediatomb).

poisondeathray
14th May 2009, 02:28
Try mp4box (Yamb) , just re-wrap container

florinandrei
14th May 2009, 03:24
Try mp4box (Yamb) , just re-wrap container

I tried Yamb before, but the file it created could not be played even by something as robust as VLC. QT Player failed too.

Also, often the audio is PCM, so additional steps need to be taken to encode audio. Yamb can't do it (unless I'm missing something).

poisondeathray
14th May 2009, 03:50
Correct, yamb just re-wraps the audio & video, no re-encoding

You can use avidemux: video=> copy , audio=>AAC, format=>mp4

or you can try ffmpeg

florinandrei
14th May 2009, 04:06
Correct, yamb just re-wraps the audio & video, no re-encoding

You can use avidemux: video=> copy , audio=>AAC, format=>mp4

Hah! I just did that actually.
Works fine for progressive video. So that problem is solved.
Not so fine for interlaced - I had to deinterlace video, which means transcoding, and even then it was corrupted.

Lots of issues I've seen with interlaced AVC (1080i) and open source tools. :(

poisondeathray
14th May 2009, 04:10
You can still extract the raw interlaced avc stream and pcm stream with yamb, re-encode the pcm with an audio encoder, then use yamb to re-mux

or ffmpeg

blah789
14th May 2009, 06:42
Question (sorry for the semi-threadjack, but I think it is partly related): can the reverse be done? From MP4 to MOV (lossless copying of the streams without re-encoding).

Inspector.Gadget
14th May 2009, 06:56
blah789 - http://forum.doom9.org/showthread.php?t=117772

florinandrei
14th May 2009, 07:30
You can still extract the raw interlaced avc stream and pcm stream with yamb, re-encode the pcm with an audio encoder, then use yamb to re-mux

I tried that too but it seems Yamb is very slow when extracting the PCM track. Like, it takes 1 hour for a 400MB file.

Also, I spoke too soon about Avidemux. The sound disappeared somewhere in the middle of the file when playing it with the PS3. sigh... It's times like these when I think I should just get a license for Adobe Premiere or something like that.