Categories
FFMPEG PROGRAMMING TOOLS TUTORIALS

Display FFmpeg output without saving to file

So if you have been editing video files using FFmpeg, you know that we need to save the output to a file displaying viewing it, right? But would it not be great if we could display FFmpeg output without having to save it to a file?

Well, there is good news for you! Because we can actually do this! There is this special command that you can use to display the ffmpeg output without having to save it to a file first. Want to know what that command is? Well, here we go!

Here is the command we normally use to display output by saving it to an output file:

ffmpeg -i input_file ... options ... output_file
Display ffmpeg output directly to screen using ffplay command

But if you want to display the output directly to the screen, we will let go off the ffmpeg command in the above command line. But instead, we will use the other available ffmpeg tool called “ffplay”.

What Is ffplay?

We have already seen what ffplay is in our earlier article on ffmpeg commands list. But just to re-iterate, ffplay is another tool from the ffmpeg command line tool set. It is used to display the content of an ffmpeg operation directly on to the screen without having to save it to a file!

Just what we needed, right?

So how can we use the ffplay command line tool?

Display FFmpeg output to a screen

The syntax of ffplay command line tool is pretty straight forward and it looks somewhat like this:

ffplay -i input_file .... test_options

So it looks pretty straight forward, right?

All you have to do is to pass in the input media file along with any optional test parameters. So, if we have an input file called input.mp4, we can run the above command as follows:

ffplay -i input.mp4

That is it! By running the above command, you should now be able to display ffmpeg output onto the screen.

So that is all there is to it guys! You just run the command ffplay in place of ffmpeg and let it display the contents directly on your screen!

If you still have any doubts on this, do let me knw in the comments below!

Leave a Reply

Your email address will not be published. Required fields are marked *