11/8/2022 0 Comments Ffmpeg command line![]()
Here's the command for doing that: ffmpeg -i inputfile.mov -vcodec h264 -acodec aac -strict -2 outfile.mp4įFmpeg supports many other video formats, that's just a specific example, You can also use the h265 codec instead of h264 if preferred see the documentation for all the details. #Ffmpeg command line mp4#My older DSLRs captured MOV files, and I've often needed to convert those to MP4 for various purposes. Those settings work well for the MP4 files I capture with my Nikon D850, but you may need to make adjustments for other formats. You can use FFmpeg to extract a cropped portion of a video, by specifying the width and height of the desired region as well as the X/Y offset of the top left corner of the desired region using the -vf "crop=W:H:X:Y" command line option.įor example, here's an example I used to extract a 1440 wide by 1080 tall section from the top left corner (0:0) of a video: ffmpeg -i inputfile.mp4 -vf "crop=1440:1080:0:0" -c:v libx264 -crf 17 -c:a copy outfile.mp4 Each input file should be on its own line in the format file 'filename.xxx' as shown in this example: file 'file1.mp4'Īssuming that file were named videos.txt, here's the command to concatenate the videos into a single outfile.mp4 file: ffmpeg -f concat -i videos.txt -c copy outfile.mp4 To combine multiple videos into a single video, first create a text file that lists the videos to be combined, in the order they should appear in the output file. If you want to speed up a video, use a number less than 1 for example "setpts=0.5" will make the output video play back 2X faster than the original. This example will make the video play back 2X slower – note the "setpts=2.0" argument. Here's an example of an FFmpeg command to change the playback speed of a video: ffmpeg -i inputfile.mp4 -filter:v "setpts=2.0" outfile.mp4
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |