Concat给出了闪烁的结果

时间:2016-04-03 01:38:39

标签: ffmpeg

我真的不明白这一点;我使用ffmpeg concat一个2个文件,音频很好,但视频不是。第二个视频会导致冻结/闪烁/绿色屏幕。

Video: MPEG4 Video (H264) 1280x720 60fps [V: h264 main L4.1, yuv420p, 1280x720 [default]] Audio: AAC 48000Hz stereo [A: aac, 48000 Hz, stereo [default]]

比较文件,我使它们尽可能相同:

  • input.mkv1
    Video: MPEG4 Video (H264) 1280x720 60fps [V: English [eng] (h264 main L4.1, yuv420p, 1280x720) [default]] Audio: AAC 48000Hz stereo [A: English [eng] (aac, 48000 Hz, stereo) [default]]
  • input2.mkv
    var questions=`This was the first 3-D film*Bwana Devil This was the first cartoon talking picture*Steamboat Willie This was the sequel to "Star Wars"*The Empire Strikes Back`

什么可能导致这种行为?

an article about the new API

1 个答案:

答案 0 :(得分:0)

我最终使用此解决方案:https://trac.ffmpeg.org/wiki/Concatenate#protocol

ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4

转换成.ts允许我连接而没有奇怪的闪烁。