0

I am having an unencrypted MPEG-Dash manifest file and I am trying to re-construct from the downloaded segments a playable video file.

I have so far tried to concatenate the initialization file to the video segments with ffmpeg but it didn't work out.

In my manifest.mpd file the video and audio streams are different and they have different durations. My video segments are always 2 seconds while my audio segments have a different duration every segment. I was thinking that perhaps I can create a video-only file first and then create another audio-only file and multiplex them together with ffmpeg again. But when I am trying to do that with concat:

$ ffmpeg -i "concat:initialization.m4s|segment_1.m4s|segment_2.m4s" -c copy test.mp4
ffmpeg version n4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[h264 @ 0x55bccabd3cc0] top block unavailable for requested intra mode -1
[h264 @ 0x55bccabd3cc0] error while decoding MB 0 0, bytestream 155579
[h264 @ 0x55bccabd3cc0] concealing 3600 DC, 3600 AC, 3600 MV errors in I frame
[h264 @ 0x55bccabd3cc0] cabac_init_idc 8 overflow
[h264 @ 0x55bccabd3cc0] decode_slice_header error
[h264 @ 0x55bccabd3cc0] no frame!
[h264 @ 0x55bccabd3cc0] concealing 3462 DC, 3462 AC, 3462 MV errors in B frame
[h264 @ 0x55bccabd3cc0] concealing 3591 DC, 3591 AC, 3591 MV errors in B frame
[h264 @ 0x55bccabd3cc0] co located POCs unavailable
[h264 @ 0x55bccabd3cc0] concealing 3560 DC, 3560 AC, 3560 MV errors in B frame
[h264 @ 0x55bccabd3cc0] cabac_init_idc 10 overflow
[h264 @ 0x55bccabd3cc0] decode_slice_header error
[h264 @ 0x55bccabd3cc0] no frame!
[h264 @ 0x55bccabd3cc0] co located POCs unavailable
[h264 @ 0x55bccabd3cc0] concealing 3431 DC, 3431 AC, 3431 MV errors in B frame
[h264 @ 0x55bccabd3cc0] concealing 3369 DC, 3369 AC, 3369 MV errors in B frame
[h264 @ 0x55bccabd3cc0] concealing 3330 DC, 3330 AC, 3330 MV errors in B frame
[h264 @ 0x55bccabd3cc0] cabac_init_idc 8 overflow
[h264 @ 0x55bccabd3cc0] decode_slice_header error
[h264 @ 0x55bccabd3cc0] no frame!
[h264 @ 0x55bccabd3cc0] top block unavailable for requested intra mode
[h264 @ 0x55bccabd3cc0] error while decoding MB 67 0, bytestream 10319
[h264 @ 0x55bccabd3cc0] concealing 3582 DC, 3582 AC, 3582 MV errors in B frame
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:initialization.m4s|segment_1.m4s|segment_2.m4s':
  Metadata:
    major_brand     : iso5
    minor_version   : 1
    compatible_brands: iso5
    creation_time   : 2014-12-05T17:27:58.000000Z
  Duration: 433:15:13.13, start: 1559709.207767, bitrate: 0 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 0 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2014-12-05T17:27:58.000000Z
Output #0, mp4, to 'test.mp4':
  Metadata:
    major_brand     : iso5
    minor_version   : 1
    compatible_brands: iso5
    encoder         : Lavf58.29.100
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 0 kb/s, 25 fps, 25 tbr, 90k tbn, 90k tbc (default)
    Metadata:
      creation_time   : 2014-12-05T17:27:58.000000Z
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=  100 fps=0.0 q=-1.0 Lsize=    2012kB time=00:00:03.88 bitrate=4248.9kbits/s speed= 399x    
video:2010kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.099968%

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.