我正在尝试连接单个帧,但是视频长度为0,所有帧似乎都可以一次播放。我尝试增加ffmpeg中的视频长度并更改帧频。
os.system('ffmpeg -f concat -i List_tb.txt -c copy output.mp4')
os.system("ffmpeg -i output.mp4 -filter:v fps=fps=120 output_temp.mp4")
os.system("ffmpeg -i output_temp.mp4 -filter:v setpts=8.0*PTS final.mp4")
也是帧频也是帧数
由于图像没有固有的时间戳,因此concat多路分配器无法为其生成的数据包生成平滑的单调时间戳序列。您可以通过在列表中为每个文件指定持续时间指令来解决此问题,即
file '-1.1257558476894771_10_1_0j.png'
duration 0.04
file '-0.8103308013367797_10_1_0j.png'
duration 0.04
file '1.0805993584315776_10_1_0j.png'
duration 0.04
...
其中0.04
是25 fps下一帧的持续时间,以秒为单位。