ffmpeg DTS 输出问题导致文件长度翻倍

ffmpeg DTS 输出问题导致文件长度翻倍

我正在尝试使用以下命令行连接 mp4 文件。

ffmpeg -fflags +genpts -y -f concat -copytb 1 -safe 0 -i .\list.txt -c:a copy -c copy $outputFileName

我收到这些文件的许多错误。

Auto-inserting h264_mp4toannexb bitstream filter
Auto-inserting h264_mp4toannexb bitstream filterx

更重要的是,存在很多这样的错误。

[mp4 @ 0000000002574720] Non-monotonous DTS in output stream 0:0; previous: 1628167, current: 1603584; changing to 1628168. This may result
in incorrect timestamps in the output file.
[mp4 @ 0000000002574720] Non-monotonous DTS in output stream 0:0; previous: 1628168, current: 1604096; changing to 1628169. This may result
in incorrect timestamps in the output file.
[mp4 @ 0000000002574720] Non-monotonous DTS in output stream 0:0; previous: 1628169, current: 1604608; changing to 1628170. This may result
in incorrect timestamps in the output file.
[mp4 @ 0000000002574720] Non-monotonous DTS in output stream 0:0; previous: 1628170, current: 1605120; changing to 1628171. This may result
in incorrect timestamps in the output file.

单个文件似乎播放得很好,最终的输出文件也可以播放,但其长度恰好是输入文件的两倍。

换句话说,当我到达视频的“结尾”时,播放器会报告视频还有一半未播放。

如果有必要,我很乐意重新编码音频以纠正此问题。欢迎提出任何关于如何纠正的建议。

在此处输入图片描述

相关内容