Opened 9 years ago

Closed 7 years ago

#5087 closed defect (needs_more_info)

Schematron validation not successful – DASH is not valid!

Reported by: verem Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: dash
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Created MPD manifest for DASH muxer not validated.

i use command string:

./bmd-streamer -v --fps-divider=2 --dst-width=640 --dst-height=360 | ffmpeg -f mpegts -i - \
    -flags +global_header \
    -vcodec libx264 -vb 2048k -preset:v veryfast \
    -acodec libfaac -ab 128k \
    -f dash /tmp/0/dash/stream1.mpd

outputs:

ffmpeg version N-77226-g1acc90e Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.6.3 (GCC) 20120306 (Red Hat 4.6.3-2)
  configuration: --prefix=/usr/local/enctools --enable-debug=3 --extra-cflags='-O0 -ggdb -I/usr/local/enctools/include -I/usr/local/src/Blackmagic_DeckLink_SDK_10.5.2/Linux/include' --extra-ldflags=-L/usr/local/enctools/lib --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-avfilter --enable-pthreads --enable-bzlib --enable-zlib --enable-libfaac --enable-libmp3lame --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libfreetype --enable-decklink --disable-stripping
  libavutil      55. 10.100 / 55. 10.100
  libavcodec     57. 17.100 / 57. 17.100
  libavformat    57. 20.100 / 57. 20.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 21.100 /  6. 21.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[2/7 1edb:bd43]: display mode: 720p 50
[2/7 1edb:bd43]: configuring and starting encoder
Input #0, mpegts, from 'pipe:':
  Duration: N/A, start: 1.020000, bitrate: N/A
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 640x368 [SAR 1:1 DAR 40:23], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 256 kb/s
[libx264 @ 0x1335c40] using SAR=1/1
[libx264 @ 0x1335c40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
[libx264 @ 0x1335c40] profile High, level 3.0
[libx264 @ 0x1335c40] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 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=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=abr mbtree=1 bitrate=2048 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, dash, to '/tmp/0/dash/stream1.mpd':
  Metadata:
    encoder         : Lavf57.20.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x368 [SAR 1:1 DAR 40:23], q=-1--1, 2048 kb/s, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.17.100 libx264
    Stream #0:1: Audio: aac (libfaac) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s
    Metadata:
      encoder         : Lavc57.17.100 libfaac
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (libfaac))
^Cframe=15147 fps= 25 q=-1.0 Lsize=N/A time=00:10:05.80 bitrate=N/A dup=1 drop=0
video:149846kB audio:6499kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x1335c40] frame I:122   Avg QP:12.52  size: 49409
[libx264 @ 0x1335c40] frame P:7340  Avg QP:15.75  size: 15701
[libx264 @ 0x1335c40] frame B:7685  Avg QP:18.61  size:  4186
[libx264 @ 0x1335c40] consecutive B-frames: 17.1% 40.0% 17.1% 25.7%
[libx264 @ 0x1335c40] mb I  I16..4:  7.8% 15.0% 77.2%
[libx264 @ 0x1335c40] mb P  I16..4:  4.7%  5.3%  3.7%  P16..4: 41.5% 18.0% 18.6%  0.0%  0.0%    skip: 8.2%
[libx264 @ 0x1335c40] mb B  I16..4:  0.5%  0.4%  0.2%  B16..8: 28.4% 12.4%  4.2%  direct:15.8%  skip:38.0%  L0:31.7% L1:41.9% BI:26.4%
[libx264 @ 0x1335c40] final ratefactor: 14.06
[libx264 @ 0x1335c40] 8x8 transform intra:36.2% inter:39.6%
[libx264 @ 0x1335c40] coded y,uvDC,uvAC intra: 78.8% 76.6% 43.7% inter: 40.7% 30.9% 3.4%
[libx264 @ 0x1335c40] i16 v,h,dc,p: 25% 43% 26%  6%
[libx264 @ 0x1335c40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 53% 22%  2%  2%  1%  3%  2%  6%
[libx264 @ 0x1335c40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 47% 13%  3%  4%  3%  6%  3%  7%
[libx264 @ 0x1335c40] i8c dc,h,v,p: 51% 30% 13%  6%
[libx264 @ 0x1335c40] Weighted P-Frames: Y:4.9% UV:1.4%
[libx264 @ 0x1335c40] kb/s:2026.03
Exiting normally, received signal 2.
[2/7 1edb:bd43]: stopping encoder
[2/7 1edb:bd43]: closing device

it generate file stream1.mpd

i checked that file against MPEG-DASH MPD Validator at http://www-itec.uni-klu.ac.at/dash/?page_id=605 and it reports

Start Schematron validation
===========================

<svrl:failed-assert test="if (@type=’dynamic’ and not(@id)) then false() else true()"
location="/*[local-name()='MPD' and namespace-uri()='urn:mpeg:dash:schema:mpd:2011']">
<svrl:text>If the MPD type is dynamic, the id shall be present </svrl:text>
</svrl:failed-assert>
<svrl:failed-assert test="if (not(@id) and ancestor::dash:MPD/@type = ‘dynamic’) then false() else true()"
location="/*[local-name()='MPD' and namespace-uri()='urn:mpeg:dash:schema:mpd:2011']/*[local-name()='Period' and namespace-uri()='urn:mpeg:dash:schema:mpd:2011']">
<svrl:text>If the MPD is dynamic the Period element shall have an id.</svrl:text>
</svrl:failed-assert>
<svrl:failed-assert test="if ((@profiles and descendant::dash:Representation/@profiles) or (@width and descendant::dash:Representation/@width) or (@height and descendant::dash:Representation/@height) or (@sar and descendant::dash:Representation/@sar) or (@frameRate and descendant::dash:Representation/@frameRate) or (@audioSamplingRate and descendant::dash:Representation/@audioSamplingRate) or (@mimeType and descendant::dash:Representation/@mimeType) or (@segmentProfiles and descendant::dash:Representation/@segmentProfiles) or (@codecs and descendant::dash:Representation/@codecs) or (@maximumSAPPeriod and descendant::dash:Representation/@maximumSAPPeriod) or (@startWithSAP and descendant::dash:Representation/@startWithSAP) or (@maxPlayoutRate and descendant::dash:Representation/@maxPlayoutRate) or (@codingDependency and descendant::dash:Representation/@codingDependency) or (@scanType and descendant::dash:Representation/@scanType)) then false() else true()"
location="/*[local-name()='MPD' and namespace-uri()='urn:mpeg:dash:schema:mpd:2011']/*[local-name()='Period' and namespace-uri()='urn:mpeg:dash:schema:mpd:2011']/*[local-name()='AdaptationSet' and namespace-uri()='urn:mpeg:dash:schema:mpd:2011'][1]">
<svrl:text>Common attributes for AdaptationSet and Representation shall either be in one of the elements but not in both.</svrl:text>
</svrl:failed-assert>
Schematron validation not successful – DASH is not valid! 

Attachments (2)

stream1.mpd.new2 (2.6 KB ) - added by verem 9 years ago.
dash_valid_dynamic.patch (3.0 KB ) - added by ligverd 8 years ago.

Download all attachments as: .zip

Change History (8)

by verem, 9 years ago

Attachment: stream1.mpd.new2 added

comment:1 by Carl Eugen Hoyos, 9 years ago

Component: undeterminedavformat
Keywords: dash added
Version: unspecifiedgit-master

Could this be a duplicate of ticket #4555?

Is specific input required to reproduce the issue or is it also reproducible with -f lavfi -i testsrc -f lavfi -i sine?
Is the issue only reproducible with -vcodec libx264 or also with a native FFmpeg encoder?
Is the issue only reproducible with libfaac or also with the native FFmpeg aac encoder?
Is the issue reproducible with -an or -vn?

Unrelated:
Your extra-cflags have very undesirable effects, is this intended?
The following configure options have no effect, consider to remove them:
--enable-avfilter --enable-pthreads --enable-bzlib --enable-zlib

comment:2 by FishB8, 9 years ago

I ran into this same validation fail also. It is not related to 4555.

The key info from the schema validator output is:

Common attributes for AdaptationSet and Representation shall either be in one of the elements but not in both.

The the AdapatationSet and Representation tags can contain the same attributes, but they have to be in only one or the other, they cannot co-exist in order to prevent conflict.

In my case, both tags contained the frameRate attribute. After manually removing it from one of the tags, the mpd file validates successfully.

comment:3 by Carl Eugen Hoyos, 8 years ago

Is this still reproducible?

comment:4 by ligverd, 8 years ago

dash_valid_dynamic.patch

This patch create valide manifest and calculates current bitrate.
about movflags not sure, but I have when receiving rtsp stream works better.

by ligverd, 8 years ago

Attachment: dash_valid_dynamic.patch added

comment:5 by FishB8, 7 years ago

Bump. This is still very much an issue with the dynamic dash profile. I can't generate valid dynamic dash content that is compatible with dash.js without this patch applied.

comment:6 by Carl Eugen Hoyos, 7 years ago

Resolution: needs_more_info
Status: newclosed

I believe this was fixed but since I cannot (exactly) reproduce the original issue it is difficult to say. Please open a new ticket with all information needed to reproduce if the validator is still unhappy.

Note: See TracTickets for help on using tickets.