Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12171

ffmpeg demux concat video output blinks/stuttering between joined clips

$
0
0

I'm experiencing a strange issue with FFmpeg after partially joining a few MP4 clips into one output file (output.mp4). The problem is that the video between clips randomly blinks or stutters, showing frames from the previous scene in the next scene. This happens in a completely random manner.

All my MP4 clips have the same FPS, TBR, and TBN values, except for the bitrate (bolded below), which varies for each clip. These clips were prepared and encoded using AWS MediaConvert to ensure they have consistent parameters.

Here’s the ffprobe result for one of the clips:

Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661),yuv420p(progressive), 640x360 [SAR 1:1 DAR 16:9], **84 kb/s**, 29.97 fps,29.97 tbr, 30k tbn (default)

Below is my input.txt file for concatenation:

file 'clip1_360.mp4'outpoint 00:00:04.00file 'clip2_360.mp4'outpoint 00:00:03.00file 'clip3_360.mp4'outpoint 00:00:04.00

The FFmpeg command I'm using to concatenate the clips is:

ffmpeg -y -f concat -safe 0 -protocol_whitelistfile,http,https,tcp,tls -fflags +igndts -i input.txt -c copy output/output.mp4

I use the -fflags +igndts flag because I receive warnings about non-monotonic DTS. I’m employing the concat demuxer to avoid re-encoding the video, as the time required to generate the output is crucial. This is why I have prepared and encoded all clips in advance to have consistent values.

Here is screen recording from my video player to see this problem:

https://youtu.be/SfWnCbMeOfw

Any assistance or suggestions on how to resolve this issue would be greatly appreciated. Because I don't have any more idea what I can do with this. If you need some more details which I didn't provide, please let me know.


Viewing all articles
Browse latest Browse all 12171

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>