GNOME Bugzilla – Bug 778237
dash, mpdparser: problem with German DVB-T2 DASH preview streams
Last modified: 2017-04-11 08:20:24 UTC
Created attachment 345026 [details] sample manifest from akamai-progressive.irt.de When playing one of the German DVB-T2 preview DASH streames stream I get an error >> gstmpdparser.c:1645:gst_mpdparser_parse_mult_seg_base_type_ext: segment has neither duration nor timeline The manifest contains SegmentTemplate nodes both in the AdaptationSet and in the Representation nodes. The SegmentTemplate in AdaptationSet does not contain a duration attribute and therefore the parser bails out (without examining the sub-nodes). Partiell manifest: --- <AdaptationSet segmentAlignment="true" bitstreamSwitching="true" maxWidth="1280" maxHeight="720" maxFrameRate="50" par="16:9" lang="und"> <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/> <SegmentTemplate initialization="V-1280x720p50_ libx264_high_yuv420p_gop100_bit3584k_term5-2-5-14-1_set1_init.mp4"/> <Representation id="164950" mimeType="video/mp4" codecs="avc1.640020" width="1280" height="720" frameRate="50" sar="1:1" startWithSAP="1" bandwidth="3484245"> <SegmentTemplate timescale="12800" media="V-1280x720p50_6bar_2ch_libx264_high_yuv420p_gop100_bit3584k_max3584k_buf7M_term1-2-4-14-1_dash_track1_$Number$.m4s" startNumber="1" duration="25600"/> --- The complete manifest is attached and comes from http://akamai-progressive.irt.de/irt_avstandard_2014/M4S/1280x720p50/V-1280x720p50_libx264_high_yuv420p_gop100_bit3584k_term5-2-5-14-1/seg2_frag2_hbbtv15_live_multi/V-1280x720p50_libx264_high_yuv420p_gop100_bit3584k_term5-2-5-14-1.mpd
Created attachment 345027 [details] [review] proposed path to fix this issue The attached patch works for the claimed problem, but it should be reviewed by other gstreamer experts.
Review of attachment 345027 [details] [review]: ::: ext/dash/gstmpdparser.c @@ +1645,3 @@ + * no sub-SegmentTemplates: check timeline and duration + * all Representations have SegmentTemplates: don't check + */ Please explain in a bit more detail what you're doing here and why, and why it is valid to omit the check @@ +1646,3 @@ + * all Representations have SegmentTemplates: don't check + */ + do_sanity_check = 0x02; // no sub SegmentTemplates: do sanity check Instead of using magic bitflags, please use descriptive booleans (and don't use // comments)
Created attachment 347123 [details] [review] new proposal for recommented changes to fix this problem patch now based on commit ffbe6906565108f99fccdd65276c6134b43c7cdf @ master
Review of attachment 347123 [details] [review]: ::: ext/dash/gstmpdparser.c @@ +1668,3 @@ + } + if (have_segmenttemplate) + do_sanity_check &= ~SANITY_CHECK_REASON_NO_SUBTEMPLATES; Shouldn't this be done only if *all* Representations had a segment template? We could have one that had a segment template and others without (using the default values from the parent).
Yes, you're right, we have three different cases 1. *all* Representations have a SegmentTemplate: -> don't do the check (do_sanity_check==0) SANITY_CHECK_REASON_NO_SUBTEMPLATES is cleared in the loop SANITY_CHECK_REASON_TOPLEVEL_TEMPLATE never set 2. *not any* Representation has a SegmentTemplate (=all Representations don't have a SegmentTemplate) -> do the check (do_sanity_check==SANITY_CHECK_REASON_NO_SUBTEMPLATES | \ SANITY_CHECK_REASON_TOPLEVEL_TEMPLATE) SANITY_CHECK_REASON_NO_SUBTEMPLATES ist never cleared SANITY_CHECK_REASON_TOPLEVEL_TEMPLATE is set 3. *some, but not all" Representations have SegmentTemplate -> do the sanity check (do_sanity_check==SANITY_CHECK_REASON_TOPLEVEL_TEMPLATE) SANITY_CHECK_REASON_NO_SUBTEMPLATES is cleared in the loop SANITY_CHECK_REASON_TOPLEVEL_TEMPLATE is set on the 1st Representation not having a SegmentTemplate Please help me - I do not understand, where the problem is? Can you give a sample where the algorithm fails?
Sorry, you're right. Seems like this covers it all.
commit 270f97611c9ebeb1c3a9869894c2bff5de7dafdb Author: Jürgen Sachs <juergen.sachs@metz-ce.de> Date: Fri Mar 3 09:08:06 2017 +0100 dashdemux/mpdparser: Fix wrong false sanity check for manifests with nested SegmentTemplate nodes https://bugzilla.gnome.org/show_bug.cgi?id=778237