1

I am implement a proof of concept page with video player that uses DASH. I am having a difficult time getting the video right and I am not sure whether this is an encoding issue or MP4Box issue.

Since I am working on Ubuntu I had to change a few parameters for ffmpeg, but according to what I read this should be fine:

~/ffmpeg/ffmpeg -c:a aac -ar 44100 -ac 1 -codec:v libx264 \
  -profile:v baseline -level 13 -b:v 2000k video_transcoded.mp4 -i video.mp4

Then to create the MPD I am running this:

MP4Box -dash 10000 -dash-profile live \
  -segment-name video_transcoded video_transcoded.mp4

I am getting this response at the end, which might be why no player will play my video:

  [DASH] two languages in adaptation set: und will be kept eng will be ignored
  DASHing file video_transcoded.mp4
  [DASH]: Segment duration variation is higher than the +/- 50% allowed by DASH-IF (min 1.044, max 10.448) - please reconsider encoding

Here is the output of ffmpeg:

    ffmpeg version N-53477-g689211d-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 5.3.1 (Debian 5.3.1-10) 20160224
      configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --enable-librtmp --enable-libmfx --cc=gcc
      libavutil      55. 19.100 / 55. 19.100
      libavcodec     57. 28.100 / 57. 28.100
      libavformat    57. 28.100 / 57. 28.100
      libavdevice    57.  0.101 / 57.  0.101
      libavfilter     6. 39.102 /  6. 39.102
      libswscale      4.  0.100 /  4.  0.100
      libswresample   2.  0.101 /  2.  0.101
      libpostproc    54.  0.100 / 54.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'gladiator.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 1
        compatible_brands: isomavc1
        creation_time   : 2013-02-12 19:14:56
      Duration: 02:50:56.98, start: 0.000000, bitrate: 923 kb/s
        Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x544 [SAR 1:1 DAR 40:17], 823 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
        Metadata:
          creation_time   : 2013-02-12 19:14:56
          handler_name    : 2000.Extended.Remastered.720p.BluRay.x264-HDEVO.mkv.264#trackID=1:fps=23.976@GPAC0.5.1-DEV-rev4283
        Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 95 kb/s (default)
        Metadata:
          creation_time   : 2013-02-12 15:32:26
          handler_name    : Sound Media Handler
    [libx264 @ 0xaf12920] using SAR=1/1
    [libx264 @ 0xaf12920] frame MB size (80x34) > level limit (396)
    [libx264 @ 0xaf12920] DPB size (3 frames, 8160 mbs) > level limit (0 frames, 2376 mbs)
    [libx264 @ 0xaf12920] MB rate (65214) > level limit (11880)
    [libx264 @ 0xaf12920] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0xaf12920] profile Constrained Baseline, level 1.3
    [libx264 @ 0xaf12920] 264 - core 148 r236 a01e339 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'gladiator2.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 1
        compatible_brands: isomavc1
        encoder         : Lavf57.28.100
        Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x544 [SAR 1:1 DAR 40:17], q=-1--1, 2000 kb/s, 23.98 fps, 24k tbn, 23.98 tbc (default)
        Metadata:
          creation_time   : 2013-02-12 19:14:56
          handler_name    : 2000.Extended.Remastered.720p.BluRay.x264-HDEVO.mkv.264#trackID=1:fps=23.976@GPAC0.5.1-DEV-rev4283
          encoder         : Lavc57.28.100 libx264
        Side data:
          cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 0 vbv_delay: -1
        Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, mono, fltp, 69 kb/s (default)
        Metadata:
          creation_time   : 2013-02-12 15:32:26
          handler_name    : Sound Media Handler
          encoder         : Lavc57.28.100 aac
    Stream mapping:
      Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
      Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help

After transcoding is completed I get this:

frame=  132 fps= 15 q=25.0 Lsize=    1112kB time=00:00:05.31 bitrate=1713.0kbits/s speed=0.603x    
video:1062kB audio:45kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.414602%
[libx264 @ 0xab63de0] frame I:1     Avg QP:21.29  size:121187
[libx264 @ 0xab63de0] frame P:131   Avg QP:23.40  size:  7372
[libx264 @ 0xab63de0] mb I  I16..4:  9.2%  0.0% 90.8%
[libx264 @ 0xab63de0] mb P  I16..4:  0.9%  0.0%  0.3%  P16..4: 37.2%  7.0%  1.8%  0.0%  0.0%    skip:52.7%
[libx264 @ 0xab63de0] final ratefactor: 21.58
[libx264 @ 0xab63de0] coded y,uvDC,uvAC intra: 48.8% 72.2% 30.7% inter: 8.9% 14.6% 0.8%
[libx264 @ 0xab63de0] i16 v,h,dc,p: 28% 33% 18% 21%
[libx264 @ 0xab63de0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 16% 15%  8%  7%  8%  6% 12%  6%
[libx264 @ 0xab63de0] i8c dc,h,v,p: 52% 21% 19%  8%
[libx264 @ 0xab63de0] ref P L0: 92.9%  5.2%  1.8%
[libx264 @ 0xab63de0] kb/s:1646.80
[aac @ 0xab64c40] Qavg: 112.650

What can I do to make this work?

Tim Hysniu
  • 1,216
  • 9
  • 18
  • You should show the complete console output from your `ffmpeg` command. – llogan Mar 21 '16 at 18:17
  • I have updated the question with the output of ffmpeg. Thanks for your insight. – Tim Hysniu Mar 22 '16 at 15:40
  • That transcoding output doesn't compute. The output from ffmpeg is only 5.3 seconds long, which doesn't correspond to what the ffmpeg command at the top, should produce. – Gyan Mar 22 '16 at 18:02

0 Answers0