3

I want to pipe ffmpeg output to some other process like this: ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 - | process. I get Unable to find a suitable output format for 'pipe:' pipe:: Invalid argument. How do I achieve piping?

11

You have to provide the format with -f, such as:

ffmpeg … -f matroska - | process
  • For a list for available formats see ffmpeg -formats.
  • Note that some formats (typically MOV), require the output protocol to be seekable, so they will fail with the pipe output protocol.
  • Also see FFmpeg Documentation: Pipe Protocol.
3

FFmpeg can't infer the desired output format in this case, output format must be explicitly specified before - using -f fmt (replace fmt with what format is desired).

ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 -f fmt - | process
2
  • The other answer provides -f fmt.  In fact, the question already has a -f fmt.  Can you provide a reference on the “nut” protocol and describe how it is better than Matroska? Please do not respond in comments; edit your answer to make it clearer and more complete. – Scott Jan 7 '19 at 5:23
  • nut is better than matroska in the sense that nut is a low overhead container (or atleast claimed), but matroska has more support across programs than nut. @Scott – bsound Oct 2 '20 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.