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?
You have to provide the format with
-f, such as:
ffmpeg … -f matroska - | process
- For a list for available formats see
- 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.
FFmpeg doesn't knows what format to output on that's why only specifying
- as output would not work. Use the option
-f <muxer/demuxer> to output to pipes.
This command should work:
This command uses
nut as container. You could use any formats listed here.
ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 -f nut - | process
How's it better than matroska?
matroskais a mkv file. nut can contain all types of audio/video/subtitles. Using mkv may restrict you using only some codecs which it supports.