无法将视频分割成更小的部分

问题描述

我想将一些视频分成 2 秒的部分,为此,我尝试使用以下代码

ffmpeg -i invid.264 -threads 3 -vcodec copy -f segment -segment_time 2 cam_out_h264%04d.264

但它无法正常工作并在命令行中产生此错误

[h264 @ 000001b4caf5f580] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0,h264,from 'output.264':
  Duration: N/A,bitrate: N/A
  Stream #0:0: Video: h264 (High),yuv420p(progressive),1920x1080 [SAR 1:1 DAR 16:9],30 fps,30 tbr,1200k tbn,60 tbc
[segment @ 000001b4cb0e3600] opening 'cam_out_h2640000.h264' for writing
Output #0,segment,to 'cam_out_h264%04d.h264':
  Metadata:
    encoder         : Lavf58.77.100
  Stream #0:0: Video: h264 (High),q=2-31,30 tbn,30 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop,[?] for help
[segment @ 000001b4cb0e3600] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame=  600 fps=0.0 q=-1.0 Lsize=N/A time=00:00:19.93 bitrate=N/A speed= 234x
video:19039kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unkNown

有什么问题吗?该视频有 600 帧,时长为 19.93 秒。因此,拆分为 2 秒视频应该没有任何问题。您知道问题出在哪里吗?请帮我解决这个问题。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)