使用 -ss 和 -to 使用 ffplay 播放视频

Using -ss and -to to play a video using ffplay

我想在trim播放之前显示视频

到trim我们可以使用2种方式:

方法一:

FFmpeg -i input.mp4 -ss 00:00:10.000 -to 00:00:15.000 output.mp4

这将生成一个长度为 5 秒的视频[注意这里使用我们也可以使用 -t]

方法二

FFmpeg -i input.mp4 -ss 00:00:10.000 -t 00:00:5.000 output.mp4

这会生成一个长度为 5 秒的视频[这里我们使用了 -t 所以我们指定了持续时间]

如果我想显示我正在使用的视频

FFplay -i input.mp4 -ss 00:00:10 -t 00:00:5

但它的起始视频从 5 秒到 15 秒[视频长度为 10 秒,而应该是 10 秒到 15 秒[5 秒]]

并且如果文件格式再次不同,则它从随机点开始,例如 .mkv,其说明为 8 秒到 15 秒 如果我使用 -to 我得到这个错误

Failed to set value '00:00:15.123' for option 'to': Option not found

我在过去 1 小时测试这个,有人告诉我我如何为 trimming 视频做 ffplay 谢谢

只有我使用的那个文件有问题 对于任何其他文件都可以使用此命令正常工作

FFplay -i input.mp4 -ss 00:00:10 -t 00:00:5