Translate

Some ffmpeg commands

 1. Use ffmpeg crop a part of video:

ffmpeg -i input.mp4 -filter:v "crop=640:1080:960:0" -c:a copy output.mp4

*  640: the width of cropped size
    1080: the height of cropped size
    960: x of top-left point
    0: y of top-left point

2. Use ffmpeg crop a period of video:

ffmpeg -ss 00:01:00 -to 00:02:00 -i input.mp4 -c copy output.mp4

       ffmpeg -i input.mp4 -ss 00:01:00 -to 00:02:00 -c copy output.mp4 (some version)

*  -ss: start time
    -to: end time

3. Use ffmpeg extract all the frames from a video:

        ffmpeg -i o1.mp4 -r 1/1 ./o1/o1_%03d.jpg

   


 

No comments:

Post a Comment