Re: ffmpeg, mpeg2, and final cut (Mike Melanson)
Howdy...
We're running into a problem where we have a mpeg2 dump from a video card which we'd like to be able to throw into final cut. Unfortunately, final cut can't understand mpeg2 audio (even though quicktime can, grr!). So we need to change the format. We'd like to do this in the least cpu intensive, and least quality degrading way.
We've tried just about every container format (mpg, avi, mov, mp4) and just about every audio codec (aac, ac3, pcm_s16le, etc.), and have found no combination that a) ffmpeg doesn't choke on and b) plays in quicktime.
Is there perhaps a compatibility matrix of video/audio codecs and container formats somewhere?
Around here, we know FFmpeg quite well. What we don't know is Final Cut. Is this a trimmed down version of the Final Cut Pro program? Can you provide a list of the features it does support?
Final Cut Express is a trimmed down version of Final Cut Pro. On talking with the folks at apple, apparently mpeg2 audio is not supported and never will be (grr). So, we have to transcode into a different format. I ran a little test: for ext in avi mpg mov mp4 ; do for ac in ac3 mp3 aac pcm_s16le ; do ffmpeg -t 5 -i "foo.mpg" \ -vcodec copy -acodec $ac /archive/video/scratch/test-$ac.$ext ; done done done Out of all the files that generated, many generated errors when I tried to open them in quicktime (invalid format, among others), 1 had video but no audio (same problem we were looking to avoid) and 2 had audio but no video (specifically, pcm_s16le and aac audio in a .mov container), which is promising, because while encoding, I noticed this error message (same with both pcm_s16le and aac and other audio formats): [mov @ 0x4007e610]Warning, using MS style video codec tag, the file may be unplayable! So I'm thinking it's possible that by specifying the proper "apple style" video codec tag, the video will render ok in quicktime/final cut, which would save us a *lot* of pain (right now we're waiting 2x realtime for video to transcode before our video editors can even start downloading). So.... How do I tell ffmpeg to use a non-MS style video codec tag, and what should that tag be for mpeg2video? Cheers & Thanks again, Brian Brian Szymanski Software and Systems Developer Media Matters for America ski at mediamatters.org cell: 202.243.9007 work: 202.756.4128 home: 202.470.2578 skype: xbrianskix aim: xbrianskix
Brian Szymanski wrote:
Final Cut Express is a trimmed down version of Final Cut Pro. On talking with the folks at apple, apparently mpeg2 audio is not supported and never will be (grr).
MPEG-2 audio? Do you mean MPEG-1, layer 2? Probably... Anyway, I found the feature comparison chart at: http://www.apple.com/finalcut/index.html Not very many input formats are supported. I wonder "Uncompressed 8-bit SD/HD" constitutes?
So, we have to transcode into a different format. I ran a little test:
for ext in avi mpg mov mp4 ; do for ac in ac3 mp3 aac pcm_s16le ; do ffmpeg -t 5 -i "foo.mpg" \ -vcodec copy -acodec $ac /archive/video/scratch/test-$ac.$ext ; done done done
Out of all the files that generated, many generated errors when I tried to open them in quicktime (invalid format, among others), 1 had video but no audio (same problem we were looking to avoid) and 2 had audio but no video (specifically, pcm_s16le and aac audio in a .mov container), which is promising, because while encoding, I noticed this error message (same with both pcm_s16le and aac and other audio formats): [mov @ 0x4007e610]Warning, using MS style video codec tag, the file may be unplayable!
I tried some quick experiments and can not get MPEG video copied into a QT container that will play in QT Player. New idea: You say that Final Cut Express can handle the video from an MPEG file, right? Can it import the audio from another file and then mix that audio track along with the MPEG video track? If so, you could use FFmpeg to decode the audio track to a WAV/PCM file and import that audio. I can foresee a problem if the program insists on only using Apple audio files (aiff). Let us know if that's true and maybe someone can slam together an aiff muxer.
So I'm thinking it's possible that by specifying the proper "apple style" video codec tag, the video will render ok in quicktime/final cut, which would save us a *lot* of pain (right now we're waiting 2x realtime for video to transcode before our video editors can even start downloading).
So.... How do I tell ffmpeg to use a non-MS style video codec tag, and what should that tag be for mpeg2video?
The override switch is '-vtag'. -- -Mike Melanson
participants (2)
-
mike@multimedia.cx -
ski@mediamatters.org