Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To save ffmpeg output to a file using redirection, use the syntax:

ffmpeg [input options] -i input_file [output options] -f format -

Where:

  • [input options] are options for the input file
  • input_file is the input file name
  • [output options] are options for the output file
  • format is the output file format
  • - is the standard output stream

To redirect the output to a file, add the following to the end of the command:

> output_file

Where output_file is the name of the file where you want to save the output.

For example, to transcode a video to another format and save the output to a file named output.mp4, you could use the following command:

ffmpeg -i input.mp4 -c:v libx264 -c:a aac -strict experimental -f mp4 - > output.mp4

This command transcodes input.mp4 to output.mp4 using the H.264 video codec and AAC audio codec, and saves the output to the file named output.mp4.