I'm using ffmpeg's concatenate to merge two video files, however I get a long error message (presumably) when ffmpeg goes to join the second video. Once it finishes, it outputs an mp4 that is longer than the two videos together should be. When I go to play the output file, it pauses where Video 1 would end and Video 2 would begin.
I'd appreciate any help!
Video 1:
Video 2:Code:General Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/avc1/mp41) File size : 16.4 GiB Duration : 40 min 47 s Overall bit rate mode : Variable Overall bit rate : 57.6 Mb/s Writing application : Lavf58.45.100 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : Baseline@L5.2 Format settings : 1 Ref Frames Format settings, CABAC : No Format settings, Reference frames : 1 frame Format settings, GOP : M=1, N=12 Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 40 min 47 s Bit rate : 56.1 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 59.940 FPS Minimum frame rate : 36.123 FPS Maximum frame rate : 1 463.415 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.113 Stream size : 15.8 GiB (96%) Writing library : x264 core 157 r2970 5493be8 Encoding settings : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=8 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=12 / keyint_min=1 / scenecut=0 / intra_refresh=0 / rc=crf / mbtree=0 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=0 Color range : Full Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Codec configuration box : avcC Audio ID : 2 Format : DTS XLL Format/Info : Digital Theater Systems Commercial name : DTS-HD Master Audio Codec ID : mp4a-A9 Duration : 40 min 47 s Bit rate mode : Variable Bit rate : 2 255 kb/s Channel(s) : 6 channels Channel layout : C L R Ls Rs LFE Sampling rate : 48.0 kHz Frame rate : 93.750 FPS (512 SPF) Bit depth : 16 bits Compression mode : Lossless Stream size : 658 MiB (4%) Default : Yes Alternate group : 1
FFMPEG Log:Code:General Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/avc1/mp41) File size : 483 MiB Duration : 1 min 24 s Overall bit rate mode : Variable Overall bit rate : 47.8 Mb/s Writing application : Lavf58.42.102 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : Baseline@L5.2 Format settings : 1 Ref Frames Format settings, CABAC : No Format settings, Reference frames : 1 frame Format settings, GOP : M=1, N=12 Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 1 min 24 s Duration_LastFrame : -16 ms Bit rate : 45.9 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 59.940 (59940/1000) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.092 Stream size : 463 MiB (96%) Writing library : x264 core 157 r2970 5493be8 Encoding settings : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=8 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=12 / keyint_min=1 / scenecut=0 / intra_refresh=0 / rc=crf / mbtree=0 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=0 Color range : Full Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Codec configuration box : avcC Audio ID : 2 Format : DTS XLL Format/Info : Digital Theater Systems Commercial name : DTS-HD Master Audio Codec ID : mp4a-A9 Duration : 1 min 22 s Bit rate mode : Variable Bit rate : 1 960 kb/s Channel(s) : 6 channels Channel layout : C L R Ls Rs LFE Sampling rate : 48.0 kHz Frame rate : 93.750 FPS (512 SPF) Bit depth : 16 bits Compression mode : Lossless Stream size : 19.2 MiB (4%) Default : Yes Alternate group : 1
Cut for the sake of brevity; the code continues repeating over and over.
Code:ffmpeg started on 2021-11-11 at 13:46:41 Report written to "ffmpeg-20211111-134641.log" Log level: 48 Command line: ffmpeg -f concat -i mylist.txt -c copy -report output.mp4 ffmpeg version git-2020-05-04-5767a2e Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9.3.1 (GCC) 20200328 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-libsrt --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-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf libavutil 56. 43.100 / 56. 43.100 libavcodec 58. 82.100 / 58. 82.100 libavformat 58. 42.102 / 58. 42.102 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 80.100 / 7. 80.100 libswscale 5. 6.101 / 5. 6.101 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 Splitting the commandline. Reading option '-f' ... matched as option 'f' (force format) with argument 'concat'. Reading option '-i' ... matched as input url with argument 'mylist.txt'. Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'. Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'. Reading option 'output.mp4' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option report (generate a report) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url mylist.txt. Applying option f (force format) with argument concat. Successfully parsed a group of options. Opening an input file: mylist.txt. [concat @ 0000010c8a31c940] Opening 'mylist.txt' for reading [file @ 0000010c8a31d980] Setting default whitelist 'file,crypto,data' [NULL @ 0000010c8a3264c0] Opening '1-audio-merged.mp4' for reading [mov,mp4,m4a,3gp,3g2,mj2 @ 0000010c8a3264c0] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0000010c8a3264c0] ISO: File Type Major Brand: isom [mov,mp4,m4a,3gp,3g2,mj2 @ 0000010c8a3264c0] Unknown dref type 0x206c7275 size 12 [mov,mp4,m4a,3gp,3g2,mj2 @ 0000010c8a3264c0] Processing st: 0, edit list 0 - media time: 0, duration: 146855100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0000010c8a3264c0] Unknown dref type 0x206c7275 size 12 [mov,mp4,m4a,3gp,3g2,mj2 @ 0000010c8a3264c0] Processing st: 1, edit list 0 - media time: 0, duration: 117484800 [mov,mp4,m4a,3gp,3g2,mj2 @ 0000010c8a3264c0] Before avformat_find_stream_info() pos: 5437386 bytes read:5443248 seeks:0 nb_streams:2 [h264 @ 0000010c8a326d80] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0000010c8a326d80] nal_unit_type: 8(PPS), nal_ref_idc: 3 [h264 @ 0000010c8a326d80] nal_unit_type: 6(SEI), nal_ref_idc: 0 [h264 @ 0000010c8a326d80] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0000010c8a326d80] nal_unit_type: 8(PPS), nal_ref_idc: 3 [h264 @ 0000010c8a326d80] nal_unit_type: 5(IDR), nal_ref_idc: 3 [h264 @ 0000010c8a326d80] Format yuvj420p chosen by get_format(). [h264 @ 0000010c8a326d80] Reinit context to 3840x2160, pix_fmt: yuvj420p [mov,mp4,m4a,3gp,3g2,mj2 @ 0000010c8a3264c0] All info found [mov,mp4,m4a,3gp,3g2,mj2 @ 0000010c8a3264c0] After avformat_find_stream_info() pos: 5482079 bytes read:5512767 seeks:0 frames:2 [mov,mp4,m4a,3gp,3g2,mj2 @ 0000010c8a3264c0] Auto-inserting h264_mp4toannexb bitstream filter [concat @ 0000010c8a31c940] Before avformat_find_stream_info() pos: 48 bytes read:48 seeks:0 nb_streams:2 [concat @ 0000010c8a31c940] file:0 stream:0 pts:0 pts_time:0 dts:0 dts_time:0 -> pts:0 pts_time:0 dts:0 dts_time:0 [h264 @ 0000010c8a32d740] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0000010c8a32d740] nal_unit_type: 8(PPS), nal_ref_idc: 3 [h264 @ 0000010c8a32d740] nal_unit_type: 6(SEI), nal_ref_idc: 0 [h264 @ 0000010c8a32d740] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0000010c8a32d740] nal_unit_type: 8(PPS), nal_ref_idc: 3 [h264 @ 0000010c8a32d740] nal_unit_type: 5(IDR), nal_ref_idc: 3 [h264 @ 0000010c8a32d740] Format yuvj420p chosen by get_format(). [h264 @ 0000010c8a32d740] Reinit context to 3840x2160, pix_fmt: yuvj420p [concat @ 0000010c8a31c940] file:0 stream:1 pts:0 pts_time:0 dts:0 dts_time:0 -> pts:0 pts_time:0 dts:0 dts_time:0 [concat @ 0000010c8a31c940] All info found [concat @ 0000010c8a31c940] After avformat_find_stream_info() pos: 48 bytes read:48 seeks:0 frames:2 Input #0, concat, from 'mylist.txt': Duration: N/A, start: 0.000000, bitrate: 55369 kb/s Stream #0:0(und), 1, 1/60000: Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p(pc, bt709), 3840x2160, 55369 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc Metadata: handler_name : VideoHandler Stream #0:1(und), 1, 1/48000: Audio: dts (DTS-HD MA) (mp4a / 0x6134706D), 48000 Hz, 5.1(side), s16p Metadata: handler_name : SoundHandler Successfully opened the file. Parsing a group of options: output url output.mp4. Applying option c (codec name) with argument copy. Successfully parsed a group of options. Opening an output file: output.mp4. [file @ 0000010c8a32bb00] Setting default whitelist 'file,crypto,data' Successfully opened the file. [mp4 @ 0000010c8a96d200] track 1: codec frame size is not set Output #0, mp4, to 'output.mp4': Metadata: encoder : Lavf58.42.102 Stream #0:0(und), 0, 1/60000: Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p(pc, bt709), 3840x2160, q=2-31, 55369 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 60k tbc Metadata: handler_name : VideoHandler Stream #0:1(und), 0, 1/48000: Audio: dts (DTS-HD MA) (mp4a / 0x6134706D), 48000 Hz, 5.1(side), s16p Metadata: handler_name : SoundHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [concat @ 0000010c8a31c940] file:0 stream:1 pts:512 pts_time:0.0106667 dts:512 dts_time:0.0106667 -> pts:512 pts_time:0.0106667 dts:512 dts_time:0.0106667 [concat @ 0000010c8a31c940] file:0 stream:0 pts:1001 pts_time:0.0166833 dts:1001 dts_time:0.0166833 -> pts:1001 pts_time:0.0166833 dts:1001 dts_time:0.0166833 [concat @ 0000010c8a31c940] file:0 stream:1 pts:1024 pts_time:0.0213333 dts:1024 dts_time:0.0213333 -> pts:1024 pts_time:0.0213333 dts:1024 dts_time:0.0213333 [concat @ 0000010c8a31c940] file:0 stream:1 pts:1536 pts_time:0.032 dts:1536 dts_time:0.032 -> pts:1536 pts_time:0.032 dts:1536 dts_time:0.032 [concat @ 0000010c8a31c940] file:0 stream:0 pts:2002 pts_time:0.0333667 dts:2002 dts_time:0.0333667 -> pts:2002 pts_time:0.0333667 dts:2002 dts_time:0.0333667 [concat @ 0000010c8a31c940] file:0 stream:1 pts:2048 pts_time:0.0426667 dts:2048 dts_time:0.0426667 -> pts:2048 pts_time:0.0426667 dts:2048 dts_time:0.0426667 [concat @ 0000010c8a31c940] file:0 stream:0 pts:3003 pts_time:0.05005 dts:3003 dts_time:0.05005 -> pts:3003 pts_time:0.05005 dts:3003 dts_time:0.05005 [concat @ 0000010c8a31c940] file:0 stream:1 pts:2560 pts_time:0.0533333 dts:2560 dts_time:0.0533333 -> pts:2560 pts_time:0.0533333 dts:2560 dts_time:0.0533333 [concat @ 0000010c8a31c940] file:0 stream:1 pts:3072 pts_time:0.064 dts:3072 dts_time:0.064 -> pts:3072 pts_time:0.064 dts:3072 dts_time:0.064 [concat @ 0000010c8a31c940] file:0 stream:0 pts:4004 pts_time:0.0667333 dts:4004 dts_time:0.0667333 -> pts:4004 pts_time:0.0667333 dts:4004 dts_time:0.0667333 [concat @ 0000010c8a31c940] file:0 stream:1 pts:3584 pts_time:0.0746667 dts:3584 dts_time:0.0746667 -> pts:3584 pts_time:0.0746667 dts:3584 dts_time:0.0746667 [concat @ 0000010c8a31c940] file:0 stream:0 pts:5005 pts_time:0.0834167 dts:5005 dts_time:0.0834167 -> pts:5005 pts_time:0.0834167 dts:5005 dts_time:0.0834167 [concat @ 0000010c8a31c940] file:0 stream:1 pts:4096 pts_time:0.0853333 dts:4096 dts_time:0.0853333 -> pts:4096 pts_time:0.0853333 dts:4096 dts_time:0.0853333 [concat @ 0000010c8a31c940] file:0 stream:1 pts:4608 pts_time:0.096 dts:4608 dts_time:0.096 -> pts:4608 pts_time:0.096 dts:4608 dts_time:0.096 [concat @ 0000010c8a31c940] file:0 stream:0 pts:6006 pts_time:0.1001 dts:6006 dts_time:0.1001 -> pts:6006 pts_time:0.1001 dts:6006 dts_time:0.1001 [concat @ 0000010c8a31c940] file:0 stream:1 pts:5120 pts_time:0.106667 dts:5120 dts_time:0.106667 -> pts:5120 pts_time:0.106667 dts:5120 dts_time:0.106667 [concat @ 0000010c8a31c940] file:0 stream:0 pts:7007 pts_time:0.116783 dts:7007 dts_time:0.116783 -> pts:7007 pts_time:0.116783 dts:7007 dts_time:0.116783 [concat @ 0000010c8a31c940] file:0 stream:1 pts:5632 pts_time:0.117333 dts:5632 dts_time:0.117333 -> pts:5632 pts_time:0.117333 dts:5632 dts_time:0.117333 [concat @ 0000010c8a31c940] file:0 stream:1 pts:6144 pts_time:0.128 dts:6144 dts_time:0.128 -> pts:6144 pts_time:0.128 dts:6144 dts_time:0.128 [concat @ 0000010c8a31c940] file:0 stream:0 pts:8008 pts_time:0.133467 dts:8008 dts_time:0.133467 -> pts:8008 pts_time:0.133467 dts:8008 dts_time:0.133467 [concat @ 0000010c8a31c940] file:0 stream:1 pts:6656 pts_time:0.138667 dts:6656 dts_time:0.138667 -> pts:6656 pts_time:0.138667 dts:6656 dts_time:0.138667 [concat @ 0000010c8a31c940] file:0 stream:1 pts:7168 pts_time:0.149333 dts:7168 dts_time:0.149333 -> pts:7168 pts_time:0.149333 dts:7168 dts_time:0.149333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:9009 pts_time:0.15015 dts:9009 dts_time:0.15015 -> pts:9009 pts_time:0.15015 dts:9009 dts_time:0.15015 [concat @ 0000010c8a31c940] file:0 stream:1 pts:7680 pts_time:0.16 dts:7680 dts_time:0.16 -> pts:7680 pts_time:0.16 dts:7680 dts_time:0.16 [concat @ 0000010c8a31c940] file:0 stream:0 pts:10010 pts_time:0.166833 dts:10010 dts_time:0.166833 -> pts:10010 pts_time:0.166833 dts:10010 dts_time:0.166833 [concat @ 0000010c8a31c940] file:0 stream:1 pts:8192 pts_time:0.170667 dts:8192 dts_time:0.170667 -> pts:8192 pts_time:0.170667 dts:8192 dts_time:0.170667 [concat @ 0000010c8a31c940] file:0 stream:1 pts:8704 pts_time:0.181333 dts:8704 dts_time:0.181333 -> pts:8704 pts_time:0.181333 dts:8704 dts_time:0.181333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:11011 pts_time:0.183517 dts:11011 dts_time:0.183517 -> pts:11011 pts_time:0.183517 dts:11011 dts_time:0.183517 [concat @ 0000010c8a31c940] file:0 stream:1 pts:9216 pts_time:0.192 dts:9216 dts_time:0.192 -> pts:9216 pts_time:0.192 dts:9216 dts_time:0.192 [concat @ 0000010c8a31c940] file:0 stream:0 pts:12012 pts_time:0.2002 dts:12012 dts_time:0.2002 -> pts:12012 pts_time:0.2002 dts:12012 dts_time:0.2002 [concat @ 0000010c8a31c940] file:0 stream:1 pts:9728 pts_time:0.202667 dts:9728 dts_time:0.202667 -> pts:9728 pts_time:0.202667 dts:9728 dts_time:0.202667 [concat @ 0000010c8a31c940] file:0 stream:1 pts:10240 pts_time:0.213333 dts:10240 dts_time:0.213333 -> pts:10240 pts_time:0.213333 dts:10240 dts_time:0.213333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:13013 pts_time:0.216883 dts:13013 dts_time:0.216883 -> pts:13013 pts_time:0.216883 dts:13013 dts_time:0.216883 [concat @ 0000010c8a31c940] file:0 stream:1 pts:10752 pts_time:0.224 dts:10752 dts_time:0.224 -> pts:10752 pts_time:0.224 dts:10752 dts_time:0.224 [concat @ 0000010c8a31c940] file:0 stream:0 pts:14014 pts_time:0.233567 dts:14014 dts_time:0.233567 -> pts:14014 pts_time:0.233567 dts:14014 dts_time:0.233567 [concat @ 0000010c8a31c940] file:0 stream:1 pts:11264 pts_time:0.234667 dts:11264 dts_time:0.234667 -> pts:11264 pts_time:0.234667 dts:11264 dts_time:0.234667 [concat @ 0000010c8a31c940] file:0 stream:1 pts:11776 pts_time:0.245333 dts:11776 dts_time:0.245333 -> pts:11776 pts_time:0.245333 dts:11776 dts_time:0.245333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:15015 pts_time:0.25025 dts:15015 dts_time:0.25025 -> pts:15015 pts_time:0.25025 dts:15015 dts_time:0.25025 [concat @ 0000010c8a31c940] file:0 stream:1 pts:12288 pts_time:0.256 dts:12288 dts_time:0.256 -> pts:12288 pts_time:0.256 dts:12288 dts_time:0.256 [concat @ 0000010c8a31c940] file:0 stream:1 pts:12800 pts_time:0.266667 dts:12800 dts_time:0.266667 -> pts:12800 pts_time:0.266667 dts:12800 dts_time:0.266667 [concat @ 0000010c8a31c940] file:0 stream:0 pts:16016 pts_time:0.266933 dts:16016 dts_time:0.266933 -> pts:16016 pts_time:0.266933 dts:16016 dts_time:0.266933 [concat @ 0000010c8a31c940] file:0 stream:1 pts:13312 pts_time:0.277333 dts:13312 dts_time:0.277333 -> pts:13312 pts_time:0.277333 dts:13312 dts_time:0.277333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:17017 pts_time:0.283617 dts:17017 dts_time:0.283617 -> pts:17017 pts_time:0.283617 dts:17017 dts_time:0.283617 [concat @ 0000010c8a31c940] file:0 stream:1 pts:13824 pts_time:0.288 dts:13824 dts_time:0.288 -> pts:13824 pts_time:0.288 dts:13824 dts_time:0.288 [concat @ 0000010c8a31c940] file:0 stream:1 pts:14336 pts_time:0.298667 dts:14336 dts_time:0.298667 -> pts:14336 pts_time:0.298667 dts:14336 dts_time:0.298667 [concat @ 0000010c8a31c940] file:0 stream:0 pts:18018 pts_time:0.3003 dts:18018 dts_time:0.3003 -> pts:18018 pts_time:0.3003 dts:18018 dts_time:0.3003 [concat @ 0000010c8a31c940] file:0 stream:1 pts:14848 pts_time:0.309333 dts:14848 dts_time:0.309333 -> pts:14848 pts_time:0.309333 dts:14848 dts_time:0.309333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:19019 pts_time:0.316983 dts:19019 dts_time:0.316983 -> pts:19019 pts_time:0.316983 dts:19019 dts_time:0.316983 [concat @ 0000010c8a31c940] file:0 stream:1 pts:15360 pts_time:0.32 dts:15360 dts_time:0.32 -> pts:15360 pts_time:0.32 dts:15360 dts_time:0.32 [concat @ 0000010c8a31c940] file:0 stream:1 pts:15872 pts_time:0.330667 dts:15872 dts_time:0.330667 -> pts:15872 pts_time:0.330667 dts:15872 dts_time:0.330667 [concat @ 0000010c8a31c940] file:0 stream:0 pts:20020 pts_time:0.333667 dts:20020 dts_time:0.333667 -> pts:20020 pts_time:0.333667 dts:20020 dts_time:0.333667 [concat @ 0000010c8a31c940] file:0 stream:1 pts:16384 pts_time:0.341333 dts:16384 dts_time:0.341333 -> pts:16384 pts_time:0.341333 dts:16384 dts_time:0.341333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:21021 pts_time:0.35035 dts:21021 dts_time:0.35035 -> pts:21021 pts_time:0.35035 dts:21021 dts_time:0.35035 [concat @ 0000010c8a31c940] file:0 stream:1 pts:16896 pts_time:0.352 dts:16896 dts_time:0.352 -> pts:16896 pts_time:0.352 dts:16896 dts_time:0.352 [concat @ 0000010c8a31c940] file:0 stream:1 pts:17408 pts_time:0.362667 dts:17408 dts_time:0.362667 -> pts:17408 pts_time:0.362667 dts:17408 dts_time:0.362667 [concat @ 0000010c8a31c940] file:0 stream:0 pts:22022 pts_time:0.367033 dts:22022 dts_time:0.367033 -> pts:22022 pts_time:0.367033 dts:22022 dts_time:0.367033 [concat @ 0000010c8a31c940] file:0 stream:1 pts:17920 pts_time:0.373333 dts:17920 dts_time:0.373333 -> pts:17920 pts_time:0.373333 dts:17920 dts_time:0.373333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:23023 pts_time:0.383717 dts:23023 dts_time:0.383717 -> pts:23023 pts_time:0.383717 dts:23023 dts_time:0.383717 [concat @ 0000010c8a31c940] file:0 stream:1 pts:18432 pts_time:0.384 dts:18432 dts_time:0.384 -> pts:18432 pts_time:0.384 dts:18432 dts_time:0.384 [concat @ 0000010c8a31c940] file:0 stream:1 pts:18944 pts_time:0.394667 dts:18944 dts_time:0.394667 -> pts:18944 pts_time:0.394667 dts:18944 dts_time:0.394667 [concat @ 0000010c8a31c940] file:0 stream:0 pts:24024 pts_time:0.4004 dts:24024 dts_time:0.4004 -> pts:24024 pts_time:0.4004 dts:24024 dts_time:0.4004 [concat @ 0000010c8a31c940] file:0 stream:1 pts:19456 pts_time:0.405333 dts:19456 dts_time:0.405333 -> pts:19456 pts_time:0.405333 dts:19456 dts_time:0.405333 [concat @ 0000010c8a31c940] file:0 stream:1 pts:19968 pts_time:0.416 dts:19968 dts_time:0.416 -> pts:19968 pts_time:0.416 dts:19968 dts_time:0.416 [concat @ 0000010c8a31c940] file:0 stream:0 pts:25025 pts_time:0.417083 dts:25025 dts_time:0.417083 -> pts:25025 pts_time:0.417083 dts:25025 dts_time:0.417083 [concat @ 0000010c8a31c940] file:0 stream:1 pts:20480 pts_time:0.426667 dts:20480 dts_time:0.426667 -> pts:20480 pts_time:0.426667 dts:20480 dts_time:0.426667 [concat @ 0000010c8a31c940] file:0 stream:0 pts:26026 pts_time:0.433767 dts:26026 dts_time:0.433767 -> pts:26026 pts_time:0.433767 dts:26026 dts_time:0.433767 [concat @ 0000010c8a31c940] file:0 stream:1 pts:20992 pts_time:0.437333 dts:20992 dts_time:0.437333 -> pts:20992 pts_time:0.437333 dts:20992 dts_time:0.437333 [concat @ 0000010c8a31c940] file:0 stream:1 pts:21504 pts_time:0.448 dts:21504 dts_time:0.448 -> pts:21504 pts_time:0.448 dts:21504 dts_time:0.448 [concat @ 0000010c8a31c940] file:0 stream:0 pts:27027 pts_time:0.45045 dts:27027 dts_time:0.45045 -> pts:27027 pts_time:0.45045 dts:27027 dts_time:0.45045 [concat @ 0000010c8a31c940] file:0 stream:1 pts:22016 pts_time:0.458667 dts:22016 dts_time:0.458667 -> pts:22016 pts_time:0.458667 dts:22016 dts_time:0.458667 [concat @ 0000010c8a31c940] file:0 stream:0 pts:28028 pts_time:0.467133 dts:28028 dts_time:0.467133 -> pts:28028 pts_time:0.467133 dts:28028 dts_time:0.467133 [concat @ 0000010c8a31c940] file:0 stream:1 pts:22528 pts_time:0.469333 dts:22528 dts_time:0.469333 -> pts:22528 pts_time:0.469333 dts:22528 dts_time:0.469333 [concat @ 0000010c8a31c940] file:0 stream:1 pts:23040 pts_time:0.48 dts:23040 dts_time:0.48 -> pts:23040 pts_time:0.48 dts:23040 dts_time:0.48 [concat @ 0000010c8a31c940] file:0 stream:0 pts:29029 pts_time:0.483817 dts:29029 dts_time:0.483817 -> pts:29029 pts_time:0.483817 dts:29029 dts_time:0.483817 [concat @ 0000010c8a31c940] file:0 stream:1 pts:23552 pts_time:0.490667 dts:23552 dts_time:0.490667 -> pts:23552 pts_time:0.490667 dts:23552 dts_time:0.490667 [concat @ 0000010c8a31c940] file:0 stream:0 pts:30030 pts_time:0.5005 dts:30030 dts_time:0.5005 -> pts:30030 pts_time:0.5005 dts:30030 dts_time:0.5005 [concat @ 0000010c8a31c940] file:0 stream:1 pts:24064 pts_time:0.501333 dts:24064 dts_time:0.501333 -> pts:24064 pts_time:0.501333 dts:24064 dts_time:0.501333 [concat @ 0000010c8a31c940] file:0 stream:1 pts:24576 pts_time:0.512 dts:24576 dts_time:0.512 -> pts:24576 pts_time:0.512 dts:24576 dts_time:0.512 [concat @ 0000010c8a31c940] file:0 stream:0 pts:31031 pts_time:0.517183 dts:31031 dts_time:0.517183 -> pts:31031 pts_time:0.517183 dts:31031 dts_time:0.517183 [concat @ 0000010c8a31c940] file:0 stream:1 pts:25088 pts_time:0.522667 dts:25088 dts_time:0.522667 -> pts:25088 pts_time:0.522667 dts:25088 dts_time:0.522667 [concat @ 0000010c8a31c940] file:0 stream:1 pts:25600 pts_time:0.533333 dts:25600 dts_time:0.533333 -> pts:25600 pts_time:0.533333 dts:25600 dts_time:0.533333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:32032 pts_time:0.533867 dts:32032 dts_time:0.533867 -> pts:32032 pts_time:0.533867 dts:32032 dts_time:0.533867 [concat @ 0000010c8a31c940] file:0 stream:1 pts:26112 pts_time:0.544 dts:26112 dts_time:0.544 -> pts:26112 pts_time:0.544 dts:26112 dts_time:0.544 [concat @ 0000010c8a31c940] file:0 stream:0 pts:33033 pts_time:0.55055 dts:33033 dts_time:0.55055 -> pts:33033 pts_time:0.55055 dts:33033 dts_time:0.55055 [concat @ 0000010c8a31c940] file:0 stream:1 pts:26624 pts_time:0.554667 dts:26624 dts_time:0.554667 -> pts:26624 pts_time:0.554667 dts:26624 dts_time:0.554667 [concat @ 0000010c8a31c940] file:0 stream:1 pts:27136 pts_time:0.565333 dts:27136 dts_time:0.565333 -> pts:27136 pts_time:0.565333 dts:27136 dts_time:0.565333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:34034 pts_time:0.567233 dts:34034 dts_time:0.567233 -> pts:34034 pts_time:0.567233 dts:34034 dts_time:0.567233 [concat @ 0000010c8a31c940] file:0 stream:1 pts:27648 pts_time:0.576 dts:27648 dts_time:0.576 -> pts:27648 pts_time:0.576 dts:27648 dts_time:0.576 [concat @ 0000010c8a31c940] file:0 stream:0 pts:35035 pts_time:0.583917 dts:35035 dts_time:0.583917 -> pts:35035 pts_time:0.583917 dts:35035 dts_time:0.583917 [concat @ 0000010c8a31c940] file:0 stream:1 pts:28160 pts_time:0.586667 dts:28160 dts_time:0.586667 -> pts:28160 pts_time:0.586667 dts:28160 dts_time:0.586667 [concat @ 0000010c8a31c940] file:0 stream:1 pts:28672 pts_time:0.597333 dts:28672 dts_time:0.597333 -> pts:28672 pts_time:0.597333 dts:28672 dts_time:0.597333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:36036 pts_time:0.6006 dts:36036 dts_time:0.6006 -> pts:36036 pts_time:0.6006 dts:36036 dts_time:0.6006 [concat @ 0000010c8a31c940] file:0 stream:1 pts:29184 pts_time:0.608 dts:29184 dts_time:0.608 -> pts:29184 pts_time:0.608 dts:29184 dts_time:0.608 [concat @ 0000010c8a31c940] file:0 stream:0 pts:37037 pts_time:0.617283 dts:37037 dts_time:0.617283 -> pts:37037 pts_time:0.617283 dts:37037 dts_time:0.617283 [concat @ 0000010c8a31c940] file:0 stream:1 pts:29696 pts_time:0.618667 dts:29696 dts_time:0.618667 -> pts:29696 pts_time:0.618667 dts:29696 dts_time:0.618667 [concat @ 0000010c8a31c940] file:0 stream:1 pts:30208 pts_time:0.629333 dts:30208 dts_time:0.629333 -> pts:30208 pts_time:0.629333 dts:30208 dts_time:0.629333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:38038 pts_time:0.633967 dts:38038 dts_time:0.633967 -> pts:38038 pts_time:0.633967 dts:38038 dts_time:0.633967 [concat @ 0000010c8a31c940] file:0 stream:1 pts:30720 pts_time:0.64 dts:30720 dts_time:0.64 -> pts:30720 pts_time:0.64 dts:30720 dts_time:0.64 [concat @ 0000010c8a31c940] file:0 stream:0 pts:39039 pts_time:0.65065 dts:39039 dts_time:0.65065 -> pts:39039 pts_time:0.65065 dts:39039 dts_time:0.65065 [concat @ 0000010c8a31c940] file:0 stream:1 pts:31232 pts_time:0.650667 dts:31232 dts_time:0.650667 -> pts:31232 pts_time:0.650667 dts:31232 dts_time:0.650667 [concat @ 0000010c8a31c940] file:0 stream:1 pts:31744 pts_time:0.661333 dts:31744 dts_time:0.661333 -> pts:31744 pts_time:0.661333 dts:31744 dts_time:0.661333 [concat @ 0000010c8a31c940] file:0 stream:0 pts:40040 pts_time:0.667333 dts:40040 dts_time:0.667333 -> pts:40040 pts_time:0.667333 dts:40040 dts_time:0.667333 [concat @ 0000010c8a31c940] file:0 stream:1 pts:32256 pts_time:0.672 dts:32256 dts_time:0.672 -> pts:32256 pts_time:0.672 dts:32256 dts_time:0.672
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 14 of 14
Thread
-
-
-
You could try mp4box, or if you wanted to try mkv you could use MKVToolNix.
-
I have been doing the instructions for #2 Concat Demux, but it results in my original post. Is there something with the second video file that I'm not noticing is messing things up?
I tried the mp4box GUI but it handled the audio streams weird and made separate tracks for both parts audio and pushed them all to the beginning of the video.
When I went to play this, there was no audio coming through, even though the MediaInfo says the DTS stream copied over. -
Some mega high bitrates for a Baseline profile, dude...dunno if that's anything to do with it (?)
Are these files downloaded Live streams or VODs ?Last edited by codehound; 11th Nov 2021 at 16:22.
-
One of the most common cause of freeze frame between joined videos is
1. The start pts of the second video is so far off from 0.000000, is hangs for the duration of the offset. You may not notice this when the second video is played by itself.
2. The first videos last frame(s) pts is longer than one frames normal duration, such as 0.096288 instead of 0.033367 for 29.97 fps.
Also just noticed you pts is 512 per frame on one and 1001 on the other. Perhaps different timebases?Last edited by Budman1; 11th Nov 2021 at 17:23.
-
They're HDTV captures that have been upscaled. I don't think the high bitrate has anything to do with it, since I've done this before with similar long videos that have been upscaled to this bitrate, and I didn't have any problems, but I could very well be wrong lol.
Is there some sort program out there that could help identify if #1 or #2 are happening? -
Is there some sort program out there that could help identify if #1 or #2 are happening?
In my experience from long ago (2013), Avidemux and mp4box couldn't reliably append MP4 files without synchronization issues (those were live recordings from Formula 1 races which I downloaded from Bittorrent for my brother, as they were no longer broadcast on a free channel that year), whereas the ffmpeg method with intermediate TS conversion produced a flawless result. So unless those two utilities were definitely improved in that area since then, I wouldn't recommend them for that specific purpose. (And in the case of Avidemux, I have the feeling that it is evolving backward, Benjamin Button style, with each new version seemingly breaking something that used to work just fine.) -
Tried this on the second (problematic) video and it yielded the same results when I went to concat, unless I'm doing something wrong lol (very possible).
Hmm when I tried this it generated an empty text file named after the video I dragged on to the batch file.
Edit:
Re-encoded the video with Premiere and looks like it may have fixed whatever was going on.Last edited by TheKCVault; 11th Nov 2021 at 20:20.
-
Is there some sort program out there that could help identify if #1 or #2 are happening?
Code:setlocal enabledelayedexpansion @echo off ::for %%a in (*.mp4,*.mpg,*.flv) Do ( for %%a in ("%~dpnx1") Do ( set /a count=0 cd %%~dpa echo frame,media_type,stream_index,key_frame,pkt_pts,pkt_pts_time,pkt_dts,pkt_dts_time,best_effort_timestamp,^ best_effort_timestamp_time,pkt_duration,pkt_duration_time,pkt_pos,pkt_size,^ Width,Height,pix_fmt,sample_aspect_ratio,pict_type,coded_picture_number,display_picture_number,^ interlaced_frame,top_field_first,repeat_pict,color_range,color_space,color_primaries,color_transfer,^ chroma_location > "%%~na_ffprobe.csv" echo No. pts_time dts_time type Frame# > "%%~na_AllFrames.txt" ver > nul set /a Number=0 ffprobe.exe -v quiet -select_streams v:0 -print_format csv -show_entries frame "%%~nxa" >> "%%~na_ffprobe.csv" for /F "tokens=4,6,8,18,19,20 delims=," %%b in ('findstr "video" "%%~na_ffprobe.csv"') do ( set "x=%%b" set "y=%%c" set "z=%%e" set "w=%%f" set "v=%%g" set "u=%%d" set sort=!y:~0,-7! ::if !sort! GEQ 0 if !sort! LEQ 10 echo !count! !y:~0,13! !x! !w:~0,1! >> "%%~na_AllFrames.txt" echo !count! !y:~0,13! !u:~0,13! !x! !w:~0,1! !v! >> "%%~na_AllFrames.txt" set /a count+=1 set /a ekko=count%%100 if !ekko! EQU 0 echo Frame !count! processed ) ) rem pause
No. pts_time dts_time type Frame#
0 0.000000 0.000000 1 I 0
1 0.033367 0.033367 0 B 3
2 0.066733 0.066733 0 B 2
3 0.100100 0.100100 0 B 4
4 0.133467 0.133467 0 P 1
...
492 16.416416 16.416416 0 P 489
493 16.449783 16.449783 0 P 493
494 16.483150 16.483150 0 B 496
495 16.516517 16.516517 0 B 495
496 16.549883 16.549883 0 B 497
497 16.583250 16.583250 0 P 494
498 16.616617 N/A 0 B 499
499 16.649983 N/A 0 P 498
frame 497 is 0.033367 away from frame 498
frame 498 is 0.033366 away from frame 499
It is the second field (pts_time) that you need to check. Also make sure your videos start with an I frame (type 1 I)
Yours looks okay but mismatches in audio can also cause a lot of weird problems when joined
29.97 duration is noemally 0.033367 so 0.033366 on the last frame may be normal depending on several factor. It just means that frame will be 1 milluionth of a second shorter. Most bad videos, especially FFMpeg based, will be double or more and you will notice that when joined. Also if the first frame is so far out of wack (I've seen 1+ seconds PTS for frame 0) many players will play without noticeable problems but when joined, that area will become a dead frame for that duration.
FFprobe is not a speed demon so give it a chance. When it is almost done you will see entries show up on the CMD screen
C:\Users\Bud\Desktop>setlocal enabledelayedexpansion
Frame 100 processed
Frame 200 processed
Press any key to continue . . .Last edited by Budman1; 11th Nov 2021 at 23:07. Reason: changed ending to show progress
-
The problem is the variable frame rate (VFR)on the one file.
Remux as a fixed FR then attempt the join.
Play back the file to ensure correct sync before joining. -
Similar Threads
-
batch merge videos and audios with ffmpeg
By m0ck in forum Video ConversionReplies: 6Last Post: 27th May 2021, 08:12 -
Cannot merge 2 videos after encoding one
By Budman1 in forum Video ConversionReplies: 3Last Post: 14th Nov 2020, 03:06 -
How Merge 1 Video to 100 Videos (Intro + Multiple Main Videos) help
By Squid Ward in forum EditingReplies: 0Last Post: 4th Sep 2020, 10:27 -
Merge intro to Videos in bulk without re-encoding
By M00nsp3ll in forum Newbie / General discussionsReplies: 2Last Post: 4th Apr 2020, 19:22 -
How to merge two videos of the same tape?
By videon00b in forum EditingReplies: 4Last Post: 15th Jan 2018, 00:20