0%

Usage of FFmpeg

转换GIF

1
$ ffmpeg -ss {start_time} -to {end_time} -i {input_file} -r {frame_rate} -vf scale=-2:{height} {output_name}.gif

For example:

1
$ ffmpeg -ss 01:30:02 -to 01:30:12 -i '227 ELEVEN.mp4' -r 15 -vf scale=-2:240 cut.gif

截取视频

1
$ ffmpeg -ss {start_time} -to {end_time} -i {input_file} -preset {preset} -c:v {encoding} {output_file}

For example:

1
$ ffmpeg -ss 00:30:01 -to 00:30:11 -i '227 ELEVEN.mp4' -preset veryslow -c:v libx264 cut.mkv