[FFmpeg-user] directly view transcoding in video player
simon at dancingcloudservices.com
Fri Aug 7 22:51:38 EEST 2020
On Fri, Aug 7, 2020 at 7:31 AM James Darnley <james.darnley at gmail.com>
> On 07/08/2020, Timothy W. Grove <tim_grove at sil.org> wrote:
> > I develop an application which displays a video, amongst other things. A
> > user may open just about any video format to view in the video display.
> > "Saving" a video will invoke ffmpeg to resize and transcode the video to
> > h264 (mp4) and display this video.
> > Is it possible to open the initial video file and stream it to the
> > display in its final format using ffmpeg so a user could see the video
> > in its final form without the intermediate "saving" step? Thanks for any
> > suggestions.
> You mean: decode -> encode -> decode -> display? No ffmpeg cannot do
> that. You may use the libraries to do it yourself.
But you *can* pipe the output of ffmpeg to ffplay. This has been discussed
elsewhere, it's not a great arrangement performance-wise, and involves some
compromises that I'm likely not fully aware of, so I won't give more
details unless you decide to pursue (and you'll find more in a general
google search anyway). As I recall, this can also be done with a kind of
teeing effect (writing to file and to a pipe) so you can watch what's being
That said, if you're not planning to store the result why not just display
(with ffplay) the original without all the CPU load? Are you trying to let
the user see the effect of the compressions/filters, perhaps?
More information about the ffmpeg-user