VideoHelp Forum


Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!


Try StreamFab Downloader and download streaming video from Youtube, Netflix, Amazon! Download free trial.


+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    I have a 60-minute video split into three 20-minute h.264 mp4 files, which need to be uploaded to YouTube as one video. These 3 files came from Vimeo a long time ago. I want to avoid extra transcoding and tried joining these files with MKVToolNix GUI, which resulted in the following error message:

    The track number 0 from the file 'M:\Part 2.mp4' can probably not be appended correctly to the track number 0 from the file 'M:\Part 1.mp4': The codec's private data does not match. Both have the same length (45) but different content. Please make sure that the resulting file plays correctly the whole time.

    The resulting file becomes garbled after the joining point. How can I join these files while minimizing transcoding? YouTube will transcode at least once when the uploads are processed, and the videos already have a pretty low bitrate.
    Quote Quote  
  2. Post a mediainfo for all 3 mp4 files here.
    Quote Quote  
  3. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    Code:
    General
    Complete name                  : M:\Part 1.mp4
    Format                         : MPEG-4
    Format profile                 : Base Media / Version 2
    Codec ID                       : mp42 (mp42/mp41/isom/avc1)
    File size                      : 99.4 MiB
    Duration                       : 19 min 32 s
    Overall bit rate mode          : Variable
    Overall bit rate               : 711 kb/s
    Encoded date                   : UTC 2013-05-01 00:50:12
    Tagged date                    : UTC 2013-05-01 00:50:12
    
    Video
    ID                             : 1
    Format                         : AVC
    Format/Info                    : Advanced Video Codec
    Format profile                 : High@L3.1
    Format settings                : CABAC / 4 Ref Frames
    Format settings, CABAC         : Yes
    Format settings, Reference fra : 4 frames
    Codec ID                       : avc1
    Codec ID/Info                  : Advanced Video Coding
    Duration                       : 19 min 32 s
    Bit rate                       : 600 kb/s
    Width                          : 640 pixels
    Height                         : 480 pixels
    Display aspect ratio           : 4:3
    Frame rate mode                : Constant
    Frame rate                     : 25.000 FPS
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Scan type                      : Progressive
    Bits/(Pixel*Frame)             : 0.078
    Stream size                    : 83.6 MiB (84%)
    Writing library                : x264 core 129 r2245 bc13772
    Encoding settings              : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=75 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=600 / ratetol=1.0 / qcomp=0.60 / qpmin=5 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=900 / vbv_bufsize=3000 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
    Encoded date                   : UTC 2013-05-01 00:50:12
    Tagged date                    : UTC 2013-05-01 00:50:12
    Codec configuration box        : avcC
    
    Audio
    ID                             : 2
    Format                         : AAC LC
    Format/Info                    : Advanced Audio Codec Low Complexity
    Codec ID                       : mp4a-40-2
    Duration                       : 19 min 32 s
    Source duration                : 19 min 32 s
    Bit rate mode                  : Variable
    Bit rate                       : 109 kb/s
    Channel(s)                     : 2 channels
    Channel layout                 : L R
    Sampling rate                  : 48.0 kHz
    Frame rate                     : 46.875 FPS (1024 SPF)
    Compression mode               : Lossy
    Stream size                    : 15.3 MiB (15%)
    Source stream size             : 15.3 MiB (15%)
    Encoded date                   : UTC 2013-05-01 00:50:12
    Tagged date                    : UTC 2013-05-01 00:50:12

    Code:
    General
    Complete name                  : M:\Part 2.mp4
    Format                         : MPEG-4
    Format profile                 : Base Media / Version 2
    Codec ID                       : mp42 (mp42/mp41/isom/avc1)
    File size                      : 99.6 MiB
    Duration                       : 19 min 33 s
    Overall bit rate mode          : Variable
    Overall bit rate               : 713 kb/s
    Encoded date                   : UTC 2013-05-01 21:45:34
    Tagged date                    : UTC 2013-05-01 21:45:34
    
    Video
    ID                             : 1
    Format                         : AVC
    Format/Info                    : Advanced Video Codec
    Format profile                 : High@L3.1
    Format settings                : CABAC / 4 Ref Frames
    Format settings, CABAC         : Yes
    Format settings, Reference fra : 4 frames
    Codec ID                       : avc1
    Codec ID/Info                  : Advanced Video Coding
    Duration                       : 19 min 33 s
    Bit rate                       : 600 kb/s
    Width                          : 640 pixels
    Height                         : 480 pixels
    Display aspect ratio           : 4:3
    Frame rate mode                : Constant
    Frame rate                     : 25.000 FPS
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Scan type                      : Progressive
    Bits/(Pixel*Frame)             : 0.078
    Stream size                    : 83.8 MiB (84%)
    Writing library                : x264 core 129 r2245 bc13772
    Encoding settings              : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=75 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=600 / ratetol=1.0 / qcomp=0.60 / qpmin=5 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=900 / vbv_bufsize=3000 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
    Encoded date                   : UTC 2013-05-01 21:45:34
    Tagged date                    : UTC 2013-05-01 21:45:34
    Codec configuration box        : avcC
    
    Audio
    ID                             : 2
    Format                         : AAC LC
    Format/Info                    : Advanced Audio Codec Low Complexity
    Codec ID                       : mp4a-40-2
    Duration                       : 19 min 33 s
    Source duration                : 19 min 33 s
    Bit rate mode                  : Variable
    Bit rate                       : 109 kb/s
    Channel(s)                     : 2 channels
    Channel layout                 : L R
    Sampling rate                  : 48.0 kHz
    Frame rate                     : 46.875 FPS (1024 SPF)
    Compression mode               : Lossy
    Stream size                    : 15.3 MiB (15%)
    Source stream size             : 15.3 MiB (15%)
    Encoded date                   : UTC 2013-05-01 21:45:34
    Tagged date                    : UTC 2013-05-01 21:45:34

    Code:
    General
    Complete name                  : M:\Part 3.mp4
    Format                         : MPEG-4
    Format profile                 : Base Media / Version 2
    Codec ID                       : mp42 (mp42/mp41/isom/avc1)
    File size                      : 99.6 MiB
    Duration                       : 19 min 32 s
    Overall bit rate mode          : Variable
    Overall bit rate               : 712 kb/s
    Encoded date                   : UTC 2013-05-01 21:58:50
    Tagged date                    : UTC 2013-05-01 21:58:50
    
    Video
    ID                             : 1
    Format                         : AVC
    Format/Info                    : Advanced Video Codec
    Format profile                 : High@L3.1
    Format settings                : CABAC / 4 Ref Frames
    Format settings, CABAC         : Yes
    Format settings, Reference fra : 4 frames
    Codec ID                       : avc1
    Codec ID/Info                  : Advanced Video Coding
    Duration                       : 19 min 32 s
    Bit rate                       : 600 kb/s
    Width                          : 640 pixels
    Height                         : 480 pixels
    Display aspect ratio           : 4:3
    Frame rate mode                : Constant
    Frame rate                     : 25.000 FPS
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Scan type                      : Progressive
    Bits/(Pixel*Frame)             : 0.078
    Stream size                    : 83.7 MiB (84%)
    Writing library                : x264 core 129 r2245 bc13772
    Encoding settings              : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=75 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=600 / ratetol=1.0 / qcomp=0.60 / qpmin=5 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=900 / vbv_bufsize=3000 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
    Encoded date                   : UTC 2013-05-01 21:58:50
    Tagged date                    : UTC 2013-05-01 21:58:50
    Codec configuration box        : avcC
    
    Audio
    ID                             : 2
    Format                         : AAC LC
    Format/Info                    : Advanced Audio Codec Low Complexity
    Codec ID                       : mp4a-40-2
    Duration                       : 19 min 32 s
    Source duration                : 19 min 32 s
    Bit rate mode                  : Variable
    Bit rate                       : 109 kb/s
    Channel(s)                     : 2 channels
    Channel layout                 : L R
    Sampling rate                  : 48.0 kHz
    Frame rate                     : 46.875 FPS (1024 SPF)
    Compression mode               : Lossy
    Stream size                    : 15.3 MiB (15%)
    Source stream size             : 15.3 MiB (15%)
    Encoded date                   : UTC 2013-05-01 21:58:500
    Tagged date                    : UTC 2013-05-01 21:58:50
    Last edited by Knocks; 23rd Dec 2020 at 16:50.
    Quote Quote  
  4. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    Originally Posted by ProWo View Post
    Post a mediainfo for all 3 mp4 files here.
    Hi, do you have any feedback on the data I uploaded?
    Quote Quote  
  5. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Knocks View Post
    Originally Posted by ProWo View Post
    Post a mediainfo for all 3 mp4 files here.
    Hi, do you have any feedback on the data I uploaded?
    It's worthless for this issue. Use the search box above and search for:
    codec "private data"

    You'll see some of the issues and possible soplutions
    Quote Quote  
  6. Do 3 steps:
    1) remux your mp4 files to ts files: ffmpeg -i "fullpath\Part 1.mp4" -c copy -map 0 "Part 1.ts" (for all 3 files).
    2) concat the 3 new ts files (into a windows command window): type "Part 1.ts" "Part 2.ts" "Part 3.ts" > onefile.ts
    3) remux the new file to mp4: ffmpeg -i "fullpath\onefile.ts" -c copy -map 0 onefile.mp4
    Quote Quote  
  7. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    How is that different from recompressing the videos?
    Quote Quote  
  8. @ProWo
    Do 3 steps:
    1) remux your mp4 files to ts files: ffmpeg -i "fullpath\Part 1.mp4" -c copy -map 0 "Part 1.ts" (for all 3 files).
    2) concat the 3 new ts files (into a windows command window): type "Part 1.ts" "Part 2.ts" "Part 3.ts" > onefile.ts
    3) remux the new file to mp4: ffmpeg -i "fullpath\onefile.ts" -c copy -map 0 onefile.mp4
    It seems awkward to use a command meant to manipulate text in order to concatenate video files (even though it may work, haven't tested).
    Also, what does “-map 0” do here ?
    I had found a similar method years ago, using ffmpeg itself to concatenate the intermediate TS files :
    Code:
    ffmpeg -i "input1.mp4" -c copy -bsf h264_mp4toannexb "temp1.ts"
    ffmpeg -i "input2.mp4" -c copy -bsf h264_mp4toannexb "temp2.ts"
    ffmpeg -i "input3.mp4" -c copy -bsf h264_mp4toannexb "temp3.ts"
    ffmpeg -i "concat:temp1.ts|temp2.ts|temp3.ts|temp4.ts" -c copy -absf aac_adtstoasc "output.mp4"
    It was the only method that managed to merge three partial MP4 recordings of the same broadcast with no synchronization issue (it was in 2013 and I had tested MP4Box / YAMB, MKVMerge / MKVToolNix, TSMuxer, Avidemux). I don't know what “-bsf h264_mp4toannexb” or “-absf aac_adtstoasc” were for, and if these options were actually required.

    @Knocks
    How is that different from recompressing the videos?
    It is different in that it does not recompress the videos.
    Quote Quote  
  9. Member
    Join Date
    Jul 2006
    Location
    United States
    Search Comp PM
    @abolibibelot

    That code returns an error message:

    Code:
    Codec 'aac' (86018) is not supported by the bitstream filter 'h264_mp4toannexb'. 
    Supported codecs are: h264 (28)
    Error initializing bitstream filter: h264_mp4toannexb

    @ProWo

    I tried your code too. Strangely, before completing the final step, I tried playing combined.ts in MPC-BE, and it would not play correctly. The player showed that the combined length was only 20 minutes, instead of 60 minutes (20 minutes for each part). I remuxed combined.ts to MKV with MKVtoolnix, which fixed the length issue, but the video was still buggy (audio disappearing or occasional freezing).

    After trying the final line of your code (remixing combined.ts to mp4), I seem to have a working .mp4 file. I will try to upload it to YouTube in that form.

    Thank you for the help, guys.
    Last edited by Knocks; 4th Jan 2021 at 14:54.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!