Ask Your Question
1

How to save ffmpeg output to a file using redirection?

asked 2022-02-27 11:00:00 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-08-03 22:00:00 +0000

david gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-02-27 11:00:00 +0000

Seen: 17 times

Last updated: Aug 03 '21