Reputation: 1
I'd like to generate a still image from my video in mpeg to pipe, something like
avconv -ss 0:01 -i my.mpg -frames:v 1 -f jpeg -
However, avconv (ffmpeg) does not have jpeg among allowed output formats. There is no problem to specify format by output extension:
avconv -ss 0:01 -i my.mpg -frames:v 1 my.jpg; cat my.jpg
but I don't want to create redundant files. Any hint?
Upvotes: 0
Views: 256
Reputation: 1
From the docs, you can pipe to stdout by setting the output filename as the pipe protocol, i.e. pipe:1
. And though it's not stated explicitly, you can set the output format as a file extension, the same way you would for a normal filename:
avconv -ss 0:01 -i my.mpg -frames:v 1 pipe:1.jpg
Sidenote:
Note that some formats (typically MOV), require the output protocol to be seekable, so they will fail with the pipe output protocol
Upvotes: 0