Я пытаюсь объединить файлы 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.

Кажется, что отдельные файлы воспроизводятся очень хорошо, и воспроизводится конечный выходной файл, но его длина в два раза больше длины входных файлов.

Другими словами, когда я добираюсь до "конца" видео, проигрыватель сообщает, что видео еще предстоит пройти половину пути.

Я рад перекодировать аудио, если необходимо, чтобы исправить эту проблему. любые предложения о том, как это исправить, приветствуются.

0