videoffmpegmergeconcatenationvideo-encoding

FFmpeg merge two files from different sources with different bitrates


I have created an intro video with Adobe Premiere Pro and I want to add the intro video to my downloaded Mixer stream videos before uploading them to YouTube, without reencoding the complete video through Adobe Premiere because that takes a long time because the videos are more then an hour.

I tried it with FFmpeg ffmpeg -safe 0 -f concat -i list.txt -c copy output.mp4. The intro is normal but the video part from Mixer is running way to fast.
I think it has something todo with the bitrate but I can't figure it out.

Output of intro file:

  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2020-05-12T11:12:11.000000Z
  Duration: 00:00:06.06, start: 0.000000, bitrate: 2408 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2086 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2020-05-12T11:12:11.000000Z
      handler_name    : ?Mainconcept Video Media Handler
      encoder         : AVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
    Metadata:
      creation_time   : 2020-05-12T11:12:11.000000Z
      handler_name    : #Mainconcept MP4 Sound Media Handler

Output of Mixer file:

  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.12.100
  Duration: 01:02:00.58, start: 0.000000, bitrate: 1937 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720, 1800 kb/s, 29.41 fps, 29.97 tbr, 16k tbn, 32k tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

Output of the merged file:

  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.43.100
  Duration: 00:57:03.84, start: 0.000000, bitrate: 2109 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 3377 kb/s, 55.14 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : ?Mainconcept Video Media Handler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 140 kb/s (default)
    Metadata:
      handler_name    : #Mainconcept MP4 Sound Media Handler

If I need to reencode something my preference would be the intro because it's only 6 seconds.


Solution

  • For completion I'm answering this question so everyone who finds this hopefully will be helped.

    Although Mixer doesn't exist anymore this problem can also occur for using XBOX clips (talking off my own experience) taken on 120fps, but also anything else on different fps recorded then what you wanna put out in Premiere.

    Say you're trying to make a 60fps clip in Premiere, you need to encode the 120 fps to normalize it to 60fps before you can use it in Premiere.

    I'm using Shutter Encoder for this, which is free: https://www.shutterencoder.com/en/

    Just go into Advance features and select Conform by and choose speed an fill in the speed you want, in my case 60 fps and start the encoding.