[FFmpeg-user] Specifying input and output formats with pipes

Rhodri James rhodri at kynesim.co.uk
Tue Jul 19 17:00:12 CEST 2011


Hi folks,

I have a mildly convoluted transcoding requirement that I'm having  
difficulty translating into command-line parameters to ffmpeg.

I'm using ffmpeg as part of a Unix pipe chain, so the input is coming on  
stdin and the output must go via stdout.  My input stream is MPEG-4/2  
wrapped in an H.222 transport stream.  For a first step I wanted MPEG-4/10  
output, so I hauled out libx264:

>  ffmpeg -i pipe: -f mpegts -vcodec libx264 pipe: 2>ffmpeg.log

That appeared to work, as far as I can tell, though ffmpeg was very sniffy  
about the headers.  My test clip is too short to show anything much  
(thanks everso, dear customer), but something is getting through the  
experience.  So far, so tentatively good.

Now, for obscure and hopefully temporary reasons, I need to wrap that  
H.264 output in MP4.  How on earth do I do that?  All I can glean from the  
docs is that I should give my output file a ".mp4" suffix and all will be  
well, but of course my "output file" is a pipe.  There doesn't seem to be  
any option to tell ffmpeg I want both H.264 transcode and MP4 wrapping.

Help?

-- 
Rhodri James
Kynesim Ltd


More information about the ffmpeg-user mailing list