如何解决无法将视频分割成更小的部分
我想将一些视频分成 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 举报,一经查实,本站将立刻删除。