输出流中先前电流的非单调DTS更改为这可能会导致输出文件中的时间戳不正确

时间:2018-10-27 11:05:17

标签: ffmpeg

我的file.txt包含简短的摘要

file 'input.mp4'
inpoint 1.5402465510368346
outpoint 2.722609395980835
file 'input.mp4'
inpoint 3.192511146068573
outpoint 7.074568028450012
file 'input.mp4'
inpoint 7.851800565719604
outpoint 9.023683423995971
file 'input.mp4'
inpoint 10.054571752548219
outpoint 12.008032734394073
file 'input.mp4'
inpoint 18.70977670431137
outpoint 21.20993923664093
file 'input.mp4'
inpoint 24.51183382153511
outpoint 26.465287650823594
...

我与他们相拥

ffmpeg -safe 0 -f concat -i file.txt out.mp4

我尝试了

ffmpeg -use_wallclock_as_timestamps 1 -safe 0 -f concat -i file.txt out.mp4

我明白了

[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 2069, current: 2067; changing to 2070. This may result in incorrect timestamps in the output file.
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 2070, current: 2067; changing to 2071. This may result in incorrect timestamps in the output file.
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 2071, current: 2067; changing to 2072. This may result in incorrect timestamps in the output file.
[aac @ 00000178c50f8a80] Queue input is backward in time
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 2758, current: 2756; changing to 2759. This may result in incorrect timestamps in the output file.
[aac @ 00000178c50f8a80] Queue input is backward in time
    Last message repeated 5 times
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 7581, current: 7579; changing to 7582. This may result in incorrect timestamps in the output file.
[aac @ 00000178c50f8a80] Queue input is backward in time
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 7582, current: 7579; changing to 7583. This may result in incorrect timestamps in the output file.
[aac @ 00000178c50f8a80] Queue input is backward in time
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 7583, current: 7579; changing to 7584. This may result in incorrect timestamps in the output file.
[aac @ 00000178c50f8a80] Queue input is backward in time
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 7584, current: 7579; changing to 7585. This may result in incorrect timestamps in the output file.
[aac @ 00000178c50f8a80] Queue input is backward in time
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 7585, current: 7579; changing to 7586. This may result in incorrect timestamps in the output file.
[aac @ 00000178c50f8a80] Queue input is backward in time
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 7586, current: 7579; changing to 7587. This may result in incorrect timestamps in the output file.
[aac @ 00000178c50f8a80] Queue input is backward in time
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 7587, current: 7579; changing to 7588. This may result in incorrect timestamps in the output file.
[aac @ 00000178c50f8a80] Queue input is backward in time
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 7588, current: 7579; changing to 7589. This may result in incorrect timestamps in the output file.
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 7589, current: 7579; changing to 7590. This may result in incorrect timestamps in the output file.
[aac @ 00000178c50f8a80] Queue input is backward in time
[mp4 @ 00000178c514cc00] Non-monotonous DTS in output stream 0:1; previous: 7590, current: 7579; changing to 7591. This may result in incorrect timestamps in the output file.
[aac @ 00000178c50f8a80] Queue input is backward in time

最终文件在错误的位置被剪切。

如何使file.txt工作?

... ... ... ... ... ... ... ... ... ... ... ... ... ... ... .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...。 .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ………………………………………………………….. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...。 .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ………………………………………………………….. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...。 .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ………………………………………………………….. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...。 .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ………………………………………………………….. 。...

1 个答案:

答案 0 :(得分:3)

如果为了解码目的需要输入,则concat多路分配器将选择输入范围之外的部分。这些将导致时间戳冲突以及输出中的额外材料。您需要使用选择过滤器来摆脱它们。

"I have two variables: -mass: 12 --vel= 18" OR "this is just another descriptor" AND "that new thing" OR "that new fangled thing"