FFMPEG
Last updated
Was this helpful?
Last updated
Was this helpful?
no Re-encode: Only changing the container
In this commandline, you are providing
the AVI video as input
specifying the name of the output MP4 file,
instructing FFmpeg to directly copy the audio and video (seen here: -c:v copy -c:a copy
) from the AVI container format to the MP4 container format.
In this example the input images are sequentially named img001.png, img002.png, img003.png, etc.
When outputting H.264, adding -vf format=yuv420p or -pix\_fmt yuv420p
will ensure compatibility so crappy players can decode the video. See the for more info.
If -framerate option is omitted the default will input and output 25 frames per second. See for more info.
For example if you want to start with img126.png then use the -start_number
option:
You can use cat
or other tools to pipe to ffmpeg:
I used this command:
Here is a more complicated version:
Explanation of the used arguments in this example:
-i - input file
-vn - Disable video, to make sure no video (including album cover image) is included if the source would be a video file
-ar - Set the audio sampling frequency. For output streams it is set by default to the frequency of the corresponding input stream. For input streams this option only makes sense for audio grabbing devices and raw demuxers and is mapped to the corresponding demuxer options.
-ac - Set the number of audio channels. For output streams it is set by default to the number of input audio channels. For input streams this option only makes sense for audio grabbing devices and raw demuxers and is mapped to the corresponding demuxer options. So used here to make sure it is stereo (2 channels)
-b:a - Converts the audio bitrate to be exact 192kbit per second