如何在不收到警告的情况下使用 ffmpeg 连接多个 webm 文件?
How to concat multiple webm files with ffmpeg without getting warnings?
我正在尝试使用此命令连接 6 个具有相同分辨率和相同编解码器的 WebM 视频文件 ffmpeg -f concat -i mylist.txt -c copy finalvideo.webm
但我收到多个警告并且最终输出只有第一个视频文件
mylist.txt
file '1.webm'
file '2.webm'
file '3.webm'
file '4.webm'
file '5.webm'
file '6.webm'
ffmpeg 日志
built with gcc 7.1.0 (GCC)
Input #0, concat, from 'mylist.txt':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0(eng): Audio: opus, 48000 Hz, mono, fltp
Stream #0:1(eng): Video: vp9 (Profile 0), yuv420p(tv), 1920x1080, SAR 1:1 DAR 16:9, 1k fps, 1k tbr,
1k tbn, 1k tbc
Metadata:
alpha_mode : 1
Output #0, webm, to 'finalvideo.webm':
Metadata:
encoder : Lavf57.78.100
Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1k fps
, 1k tbr, 1k tbn, 1k tbc
Metadata:
alpha_mode : 1
Stream #0:1(eng): Audio: opus, 48000 Hz, mono, fltp
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[concat @ 0000000000797200] DTS -9223363446920184 < 3900 out of order
DTS -9223363446920184, next:3901000 st:1 invalid dropping
PTS -9223363446920184, next:3901000 invalid dropping st:1
[webm @ 00000000029e20e0] Timestamps are unset in a packet for stream 0. This is deprecated and will st
op working in the future. Fix your code to set the timestamps properly
DTS -9223363446920156, next:3902000 st:1 invalid dropping
PTS -9223363446920156, next:3902000 invalid dropping st:1
DTS -9223363446920128, next:3903000 st:1 invalid dropping
[webm @ 00000000029e20e0] Application provided invalid, non monotonically increasing dts to muxer in st
ream 0: 4094 >= 0
av_interleaved_write_frame(): Invalid argument
frame= 350 fps=0.0 q=-1.0 Lsize= 2436kB time=00:00:04.09 bitrate=4873.8kbits/s speed=11.7x
video:2576kB audio:46kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!
尝试 -avoid_negative_ts 1
作为可能的解决方法。
升级您的 ffmpeg 版本可能会有所帮助。
见
https://trac.ffmpeg.org/ticket/6248
和
我正在尝试使用此命令连接 6 个具有相同分辨率和相同编解码器的 WebM 视频文件 ffmpeg -f concat -i mylist.txt -c copy finalvideo.webm
但我收到多个警告并且最终输出只有第一个视频文件
mylist.txt
file '1.webm'
file '2.webm'
file '3.webm'
file '4.webm'
file '5.webm'
file '6.webm'
ffmpeg 日志
built with gcc 7.1.0 (GCC)
Input #0, concat, from 'mylist.txt':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0(eng): Audio: opus, 48000 Hz, mono, fltp
Stream #0:1(eng): Video: vp9 (Profile 0), yuv420p(tv), 1920x1080, SAR 1:1 DAR 16:9, 1k fps, 1k tbr,
1k tbn, 1k tbc
Metadata:
alpha_mode : 1
Output #0, webm, to 'finalvideo.webm':
Metadata:
encoder : Lavf57.78.100
Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 1k fps
, 1k tbr, 1k tbn, 1k tbc
Metadata:
alpha_mode : 1
Stream #0:1(eng): Audio: opus, 48000 Hz, mono, fltp
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[concat @ 0000000000797200] DTS -9223363446920184 < 3900 out of order
DTS -9223363446920184, next:3901000 st:1 invalid dropping
PTS -9223363446920184, next:3901000 invalid dropping st:1
[webm @ 00000000029e20e0] Timestamps are unset in a packet for stream 0. This is deprecated and will st
op working in the future. Fix your code to set the timestamps properly
DTS -9223363446920156, next:3902000 st:1 invalid dropping
PTS -9223363446920156, next:3902000 invalid dropping st:1
DTS -9223363446920128, next:3903000 st:1 invalid dropping
[webm @ 00000000029e20e0] Application provided invalid, non monotonically increasing dts to muxer in st
ream 0: 4094 >= 0
av_interleaved_write_frame(): Invalid argument
frame= 350 fps=0.0 q=-1.0 Lsize= 2436kB time=00:00:04.09 bitrate=4873.8kbits/s speed=11.7x
video:2576kB audio:46kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!
尝试 -avoid_negative_ts 1
作为可能的解决方法。
升级您的 ffmpeg 版本可能会有所帮助。
见
https://trac.ffmpeg.org/ticket/6248
和