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 fileinput_file
is the input file name[output options]
are options for the output fileformat
is the output file format-
is the standard output streamTo 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
.
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
Asked: 2022-02-27 11:00:00 +0000
Seen: 17 times
Last updated: Aug 03 '21
What is the process for converting a complete directory using ffmpeg?
Command line option for ffmgeg creating an output MP4 with 720p and 60fps for Youtube?
Is it possible for ffmpeg to display a progress bar?
ffmpeg: How can I get the bit rate of a MP3 File?
How can hdmv pgs subtitles be extracted from an mkv file and converted to srt format using ffmpeg?
How can I extract a given range from a Video with ffmpeg?
How can FFmpeg open an RTSP stream with the same URL?
How to use ffmpeg to provide a video stream in Node?
What is the process for combining several mono files into a single multichannel file using FFmpeg?