View Full Version : ffmbc piped to ffmpeg
Electron.Rotoscope
25th May 2013, 21:33
I'm having trouble decoding DNxHD video in ffmpeg, but ffmbc seems to be decoding it fine. However, I can't get the encode switches I want in ffmbc, so I'd like to be able to decode in ffmbc and encode in ffmpeg. I understand the way to do this is with pipes, buit I can't get them to work
The best that I have gotten so far is
ffmbc.exe -i infile - | ffmpeg.exe -i - -vcodec libx264 [x264 options] -acodec copy outfile
which gives me "unable to find a suitable output format for pipe" and
ffmbc.exe -i infile -f yuv4mpegpipe - | ffmpeg.exe -i - -vcodec libx264 [x264 options] -acodec copy outfile
which gives me a blank white frame. Is there documentation somewhere about how to properly use piping in Windows? I cannot find much at all. What I'd LOVE to be able to do is just decode the video and audio and send that directly to ffmpeg.
Alternately: does anyone know how to ensure accurate DNxHD decoding in regular ffmpeg?
sneaker_ger
25th May 2013, 21:46
It works here. Note that you can only pipe one stream at a time, so you have to do two separate commands for the yuv4mpegpipe and for a e.g. wave pipe.
Electron.Rotoscope
25th May 2013, 21:53
This (http://i.imgur.com/heTE68w.png) is what the frame should look like and this (http://i.imgur.com/nn6HYGn.jpg) is what ffmpeg is giving me. It's just for the first 6 frames after a big length of black screen, the rest of the video seems fine so far.
I'd think it was GOP related only I don't think DNxHD has GOPs (longer than 1 frame).
And I ensured that it was the decode, it does it regardless of what -vcodec I put in.
full command and output here (http://pastebin.com/fC3u1N8d)
Electron.Rotoscope
25th May 2013, 21:54
It works here. Note that you can only pipe one stream at a time, so you have to do two separate commands for the yuv4mpegpipe and for a e.g. wave pipe.
Sorry, what part works there?
sneaker_ger
25th May 2013, 21:56
ffmbc.exe -i infile -f yuv4mpegpipe - | ffmpeg.exe -i - -vcodec libx264 [x264 options] outfile
I didn't test with DNxHD. Maybe you need to use -pix_fmt to convert first. (<-ignore this)
This (http://i.imgur.com/heTE68w.png) is what the frame should look like and this (http://i.imgur.com/nn6HYGn.jpg) is what ffmpeg is giving me. It's just for the first 6 frames after a big length of black screen, the rest of the video seems fine so far.
I'd think it was GOP related only I don't think DNxHD has GOPs (longer than 1 frame).
And I ensured that it was the decode, it does it regardless of what -vcodec I put in.
full command and output here (http://pastebin.com/fC3u1N8d)
Hmm... that doesn't look command-line related, though.
Electron.Rotoscope
25th May 2013, 22:04
The piping thing isn't that useful for me if it had to do audio in a separate pass anyways, speed is paramount for this setup.
I didn't test with DNxHD. Maybe you need to use -pix_fmt to convert first.
I think that might be the key for me actually, it says
Input stream #0:0 frame changed from size:1920x1080 fmt:yuv422p to size:1920x1080 fmt:yuv422p10le
right about where it screws up. Is there a way for me to hard-declare the input pixel format so it doesn't think that it's switching?
Electron.Rotoscope
25th May 2013, 22:46
I suppose I should start a new thread maybe
poisondeathray
25th May 2013, 23:11
What encode switches are unavailable in ffmbc libx264 that are present in ffmpeg libx264 ?
Electron.Rotoscope
25th May 2013, 23:36
What encode switches are unavailable in ffmbc libx264 that are present in ffmpeg libx264 ?
-sws_flags was the first one I noticed, but I might have been doing it wrong. -vf drawtext doesn't seem to work either. I certainly haven't looked through it a lot. I did notice that the encode was running about 6 times faster in ffmpeg so I figured some of my x264 flags weren't being read properly and it was just going with defaults
Electron.Rotoscope
25th May 2013, 23:42
However, for posterity, it seems I've solved my problem: turns out Avid software has the ability to export "Same as Source" quicktime files with mixed frame compression. Some of the footage in the source sequence I was working with was "DNxHD 175" (an 8-bit codec) and some was "DNxHD 175 X" (a 10-bit codec). Quicktime parses the file fine, we've never had problems using Apple Compressor with these files. However, when ffmpeg hits a switch midway through a single video stream it hiccups for a few frames and makes that weirdness, and resets vf drawtext timecode. The solution is simple though, all I have to do is make sure the editor renders their whole sequence with the same damn compression! :D
Does this seem like something I should submit as a bug report? I guess it is a case of ffmpeg not being able to do something the Avid quicktime components (http://avid.force.com/pkb/articles/en_US/download/Avid-QuickTime-Codecs-LE-2-3-8) can handle
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.