ffmpeg遇到Non-monotonous DTS in output stream的问题

在执行命令行:

./ffmpeg -f concat -safe 0 -i filelist.txt out.mp4

遇到如下问题,得到的文件音频某一段没有声音:

[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963852, current: 36597661; changing to 36963853. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963853, current: 36598685; changing to 36963854. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963854, current: 36599709; changing to 36963855. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963855, current: 36600733; changing to 36963856. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963856, current: 36601757; changing to 36963857. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963857, current: 36602781; changing to 36963858. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963858, current: 36603805; changing to 36963859. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963859, current: 36604829; changing to 36963860. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963860, current: 36605853; changing to 36963861. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963861, current: 36606877; changing to 36963862. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963862, current: 36607901; changing to 36963863. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963863, current: 36608925; changing to 36963864. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963864, current: 36609949; changing to 36963865. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963865, current: 36610973; changing to 36963866. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963866, current: 36611997; changing to 36963867. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963867, current: 36613021; changing to 36963868. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963868, current: 36614045; changing to 36963869. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963869, current: 36615069; changing to 36963870. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963870, current: 36616093; changing to 36963871. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963871, current: 36617117; changing to 36963872. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963872, current: 36618141; changing to 36963873. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963873, current: 36619165; changing to 36963874. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963874, current: 36620189; changing to 36963875. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963875, current: 36621213; changing to 36963876. This may result in incorrect timestamps in the output file.
[mp4 @ 00000249e9f01480] Non-monotonous DTS in output stream 0:1; previous: 36963876, current: 36622237; changing to 36963877. This may result in incorrect timestamps in the output file.
 

解决:

发现是filelist.txt中各个视频文件中的音频采样率不一致导致,于是将这些视频文件的音频按指定采样率重新采样

 ./ffmpeg.exe -i a.mp4 -ac 1 -ar 48000 -vcodec copy a_re.mp4

再重新执行多文件拼接命令,就没有上面的报错了

猜你喜欢

转载自blog.csdn.net/tong5956/article/details/108277191
DTS