Log in

View Full Version : ffmpeg encoding for Quicktime 7 OSX playback


Electron.Rotoscope
14th July 2014, 17:13
I'm trying to encode some video for use in ProTools on an OSX system, and I'd really prefer to use ffmpeg and x264, since they're so much better in practically every way. Unfortunately I can't get the Quicktime framework to recognize the video as being H.264 on OSX. Instead of H.264, it says Lavc55.68.100 libx264, and I think that's making programs on the QuickTime framework (ie ProTools) freak out and refuse to accept it.

My encode command is
C:\cli\ffmpeg\bin\ffmpeg.exe -i "%~f1" ^
-pix_fmt yuv420p -sws_flags lanczos -s 1280x720 ^
-vcodec libx264 -profile:v main -preset medium -tune fastdecode -crf 20 -refs 1 -qmin 1 ^
-maxrate 3000k -bufsize 3000k ^
-c:a pcm_s16le ^
-f mov "X:\ffmpegout\for_mix_%~n1.mov"
and it seems to be totally fine in VLC and Quicktime for Windows (inspector window (http://i.imgur.com/CDPJ5x6.png)) but when I take it to an OSX system it plays in QT7 Pro but won't import in my client's ProTools. I suspect because it's not detecting as being H.264 (inspector window (http://i.imgur.com/lrqnXtY.png))

Has anyone seen this before, and knows a way around it? I know QuickTime is kind of garbagey, but unfortunately I can't tell the audio house to buy a new operating system or stop using ProTools, and I'd really hate to have to go back to Compressor just because of this.

Alternately: does anyone know if it's possible to put PCM into an mp4? Quicktime seems to accept it when it's in an mp4, but then I have to compress the audio and playback shuttle speed and CPU load take a hit on the client's end.

In case it matters, source video is DNxHD 175X, test rig is QT 7.6.6 on OSX 10.6.8. The ffmpeg encode looks like this when encoding http://pastebin.com/deN262jw

Electron.Rotoscope
14th July 2014, 20:31
So... I don't know if this is ever going to come up for anyone, but it turns out if you load the finished mov into a hex editor and search for the DOS 8-bit format string "libx264" you can see where it's pulling the text from that shows up in Quicktime.

If you just replace the text you can actually make it whatever you want (including "helpimtrappedinsideqt" (http://i.imgur.com/YCgDHSR.png)) so you can manually changed it to "H.264" and a bunch of blank, or you can change the 0x0115 that immediately precedes the text to 0x0100 and QuickTime suddenly remembers that it's capable of reading FourCC codes and displays H.264 properly

I haven't heard back whether this actually helps in ProTools on OSX though