4

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?

2 Answers 2

12

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. Commented Jan 7, 2019 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
    – tripulse
    Commented Oct 2, 2020 at 11:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .