ffmpeg concat of mp4s jumps and pauses a few seconds on the joins

Questions involving a Windows version of FFmpeg.
Post Reply
rtomlin
Posts: 1
Joined: Thu May 16, 2019 3:01 pm

ffmpeg concat of mp4s jumps and pauses a few seconds on the joins

Post by rtomlin » Thu May 16, 2019 3:06 pm

I am using ffmpeg to create chunks of 10 second mp4(h265) video. I am using image2pipe as this seems to have a less of an impact on the cpu, the command line is:

Code: Select all

-y -threads 1 -framerate " & FrameRate & " -f image2pipe -i pipe:.jpg -vf format=yuv420p -c:v libx265 -preset ultrafast -crf 28 -vsync vfr " & strSaveDirectory
I am then concatanating these video chunks using:

Code: Select all

"-f concat -safe 0 -i " & strConcatAVIs & " -c copy " & outPutPath
If I play each of the 10 second mp4s they appear to be complete but when they are merged to one file sometimes there will be a pause on a join of a few seconds and sometimes the video will jump 3 or 4 seconds on a join.

Typically this is the descrtiption of a couple of files:

Code: Select all

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Temp\testmp4\video_1_1_2_2019_5_13_13_15_10.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.20.100
  Duration: 00:00:09.85, start: 0.000000, bitrate: 225 kb/s
    Stream #0:0(und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 768x576 [SAR 1:1 DAR 4:3], 221 kb/s, 13 fps, 13 tbr, 13312 tbn, 13 tbc (default)
    Metadata:
      handler_name    : VideoHandler
-----------------------------------------------

Code: Select all

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Temp\testmp4\video_1_1_2_2019_5_13_13_15_20.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.20.100
  Duration: 00:00:10.00, start: 0.000000, bitrate: 334 kb/s
    Stream #0:0(und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 768x576 [SAR 1:1 DAR 4:3], 330 kb/s, 13 fps, 13 tbr, 13312 tbn, 13 tbc (default)
    Metadata:
      handler_name    : VideoHandler
In my file 'strConcatAVIs' I have tried adding the correct duration which doesn't change much but if I change the duration to be 14, 6 as oppose to 10, 10, which are the correct durations, on the joins that are pausing and speeding up it plays pretty smoothly.

Post Reply
'