View Full Version : Help Needed - Using FFMPEG to Unwrap MOV
rec
21st December 2012, 10:15
ffmpeg noob here. I'm using ffmpeg to unwrap an H264 video from a Quicktime container. This is not a transcode, it's just a simple file copy. The video copies fine, but the audio gets re-encoded. The original audio is uncompressed PCM (1536 Kbps), but the transfered audio is compressed AAC (64.4 Kbps). Here's the script I'm using:
FOR %%f IN (*.mov) DO (ffmpeg -y -i "%%f" -vcodec copy -async 1 -f mp4 "%%f.mp4")
What have I got to do to make the uncompressed audio copy over?
Here's a sample clip you can download, if you care to play with it.
https://dl.dropbox.com/u/32965786/P1000129.MOV
sneaker_ger
21st December 2012, 11:23
PCM in mp4 seems to be a bit tricky, but you could try mp4box.
http://forum.doom9.org/showthread.php?t=165406
(ffmpeg's audio copy command would be "-acodec copy", btw, but it doesn't help in this case)
rec
23rd December 2012, 17:37
I still can't get it to work. Since FFmpeg is determined to re-compress the audio, is there at least some way I can tell it what bitrate to use so I can get better quality?
Selur
23rd December 2012, 21:38
you need to set "-acodec copy" if you don't want the audio not to be reencoded,...
Bleck
23rd December 2012, 21:47
Maybe ffmpeg thinks pcm is not compliant with mp4. Try to copy the audio stream and join it with mp4box...
ffmpeg -y -i input -vn -acodec copy audio.wav (or pcm)
mp4box -hint -add audio.wav filewiththevideo.mp4
can tell it what bitrate to use so I can get better quality?
I suggest the ffmpeg aac experimental codec at 96k, or extract it and reencode with nero aac codec. This should force you to spend some more time but quality would be better.
rec
23rd December 2012, 23:51
I've tried to increase the bitrate of the re-encoded audio, but ffmpeg rejects all attempts to do so. It really doesn't like PCM.
If anyone could post a script that works, I would appreciate it. Remember, I've got a sample clip in the first post that you can download.
I would like to be able to do this in one step, because I have hundreds of clips to process.
Thanks!
poisondeathray
24th December 2012, 00:18
ffmbc can do it; just switch ffmbc for ffmpeg
some applications and media players might have problems with uncompressed audio in MP4, but something like VLC can play it
for %%a in ("*.mov") do ffmbc -i %%a -vcodec copy -acodec copy %%~na.mp4
rec
24th December 2012, 06:36
ffmbc was the ticket! Thanks!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.