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.
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 9 of 9
-
-
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 15:50.
-
-
-
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 -
@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
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"
@Knocks
How is that different from recompressing the videos? -
@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 13:54.
Similar Threads
-
Video changes colour after i upload to YouTube
By Master Tape in forum Video Streaming DownloadingReplies: 5Last Post: 5th Nov 2020, 17:26 -
cant upload video in 1440p in youtube(vegas pro 17)
By besal in forum Newbie / General discussionsReplies: 2Last Post: 29th Mar 2020, 09:34 -
Upload an unlisted video on youtube
By linhnv231 in forum Newbie / General discussionsReplies: 4Last Post: 22nd Sep 2018, 00:40 -
Recommended cross-platform way to convert mp3/audio files 4 YouTube upload?
By colorstar in forum Video ConversionReplies: 2Last Post: 12th Dec 2017, 10:45 -
Is there any way at all to get a 960 x 540 video to upload HD on youtube?
By JediRift in forum Video ConversionReplies: 9Last Post: 1st Apr 2016, 08:29