macbook:output developer$ ffmpeg -i ../output.mp4 -f hls -hls_time 1 -hls_list_size 1000000 index.m3u8
macbook:output developer$
macbook:output developer$ head index.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:8
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:3.136467,
index0.ts
#EXTINF:8.341667,
index1.ts
#EXTINF:8.341667,
index2.ts
macbook:output developer$我想要长度在1秒左右的视频切片,但是我得到的TARGETDURATION: 8你注意到了,它是从哪里来的?我没有设置像8这样的东西,让人困惑.谢谢
发布于 2019-07-06 15:21:59
段将在关键帧处被切割,因此除非每秒钟存在一个关键帧,否则hls_time将不会被执行。添加-force_key_frames expr:gte(t,n_forced*1),在每秒钟开始时添加一个关键帧。
https://stackoverflow.com/questions/56915014
复制相似问题