Issues with total video length when merging video files using ffmpeg concat

Questions involving a Windows version of FFmpeg.
Post Reply
jujulie56
Posts: 1
Joined: Wed Mar 13, 2019 4:36 pm

Issues with total video length when merging video files using ffmpeg concat

Post by jujulie56 » Wed Mar 13, 2019 4:46 pm

Hi,

I ran the following script to merge several video files:

Code: Select all

ffmpeg -f concat -i input.txt -c copy output.mp4
I realized that the total duration of the output video file is longer than the sum of duration of the video files being merged.

Could someone help me to fix it please?


The properties of the files are :

Code: Select all

ffmpeg version N-93151-gff03418348 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20190212
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 47.102 / 58. 47.102
  libavformat    58. 26.101 / 58. 26.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002a78c5a2e40] Auto-inserting h264_mp4toannexb bitstream filter
[concat @ 000002a78c598d00] Could not find codec parameters for stream 2 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[concat @ 000002a78c598d00] Could not find codec parameters for stream 3 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, concat, from 'input.txt':
  Duration: N/A, start: 0.000000, bitrate: 30121 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 29993 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      creation_time   : 2018-09-04T11:04:37.000000Z
      handler_name    :         GoPro AVC
      encoder         : GoPro AVC encoder
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s
    Metadata:
      creation_time   : 2018-09-04T11:04:37.000000Z
      handler_name    :         GoPro AAC
    Stream #0:2: Unknown: none
    Stream #0:3: Unknown: none
Output #0, mp4, to 'output.mp4':
  Metadata:
    encoder         : Lavf58.26.101
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 29993 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc
    Metadata:
      creation_time   : 2018-09-04T11:04:37.000000Z
      handler_name    :         GoPro AVC
      encoder         : GoPro AVC encoder
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s
    Metadata:
      creation_time   : 2018-09-04T11:04:37.000000Z
      handler_name    :         GoPro AAC
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)

Post Reply