Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate MPD file for DVB playback #635

Closed
huangsherry opened this issue Sep 14, 2016 · 8 comments
Closed

Generate MPD file for DVB playback #635

huangsherry opened this issue Sep 14, 2016 · 8 comments

Comments

@huangsherry
Copy link

huangsherry commented Sep 14, 2016

I want to generate a MPD file for DVB playback through HDTV. May I ask does Mp4box -dash support generating MPD for DVB and how?

A example of worked MPD file.
<?xml version="1.0" encoding="UTF-8"?> <MPD type="static" xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:dvb:dash:profile:dvb-dash:2014,urn:dvb:dash:profile:dvb-dash:isoff-ext-live:2014" minBufferTime="PT1.253S" mediaPresentationDuration="PT1M31.460S" maxSegmentDuration="PT3.840S"> <Period duration="PT1M31.460S" start="PT0S"> <AdaptationSet startWithSAP="2" segmentAlignment="true" par="16:9" frameRate="100" sar="1:1" id="1" mimeType="video/mp4" scanType="progressive" contentType="video" > <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/> <SegmentTemplate startNumber="1" timescale="1000" duration="3840" media="$RepresentationID$/$Number%06d$.m4s" initialization="$RepresentationID$/IS.mp4" /> <Representation bandwidth="35995992" codecs="hev1.2.4.L156.00" width="3840" id="3840x2160p100" height="2160" /> <Representation bandwidth="23107032" codecs="hev1.2.4.L153.00" width="2560" id="2560x1440p100" height="1440" /> <Representation bandwidth="7144720" codecs="hev1.2.4.L120.00" width="1024" id="1024x576p100" height="576" /> <Representation bandwidth="12096712" codecs="hev1.2.4.L123.00" width="1280" id="1280x720p100" height="720" /> <Representation bandwidth="17527152" codecs="hev1.2.4.L150.00" width="1920" id="1920x1080p100" height="1080" /> </AdaptationSet> </Period> </MPD>

The profiles should be dvb-dash:2014, if I am correct.

Thanks in advance.

@rbouqueau
Copy link
Member

We don't have a ready-to-use latest dashif, dvb-dash and hbbtv2 profiles in GPAC. We'd be happy to add them :)

One first step could be to use the hbbtv 1.5 profile, modify the MPD by hand to make it more similar to your manifest and test it works on the target device?

@huangsherry
Copy link
Author

huangsherry commented Oct 18, 2016

Do you know how to write the -profile parameter? I tried with the following sentence. However, it does not work.
MP4Box -dash 960 -profile -urn:hbbtv:dash :profile:isoff-live:2012 -bs-switching no -rap -frag-rap -url-template -out HEVC_Live.mpd -segment-name ./new/Resolution$RepresentationID$-$Number$ -out final3.mpd ebu-576-cbr-dash.mp4 ebu-720-cbr-dash.mp4

@huangsherry
Copy link
Author

huangsherry commented Oct 18, 2016

According to my experience, the profile should be "urn:dvb: dash:profile:dvb-dash:2014,urn:dvb: dash:profile:dvb-dash:isoff-ext-live:2014"

I tried with this one, but it is not working.

@rbouqueau
Copy link
Member

Do you know how to write the -profile parameter?

> MP4Box - dash
[...]
 -profile NAME        specifies the target DASH profile: "onDemand",
                       "live", "main", "simple", "full",
                       "hbbtv1.5:live", "dashavc264:live", "dashavc264:onDemand"
                       * This will set default option values to ensure conformance to the desired profile
                       * Default profile is "full" in static mode, "live" in dynamic mode
 -profile-ext STRING  specifies a list of profile extensions, as used by DASH-IF and DVB.
                       The string will be colon-concatenated with the profile used
[...]

According to my experience, the profile should be "urn:dvb💨profile:dvb-dash:2014,urn:dvb💨profile:dvb-dash:isoff-ext-live:2014"

I tried with this one, but it is not working.

From my experience, the data is more important than the profile string. Could you make anything work on a TV already as I suggested in my last message?

@mcflyuk
Copy link

mcflyuk commented Oct 30, 2018

I am also interested in using mp4box to generate DVB dash compliant streams - profiles="urn:dvb:dash:profile:dvb-dash:2014" or profiles="urn:dvb:dash:profile:dvb-dash:2017".

Currently I'm using the 'live' profile but finding I'm having to manually edit each manifest afterwards to make them compliant. https://conformance.dashif.org/ can be used for compliance checking.

Searching google for the DVB specification shows it is available for referencing if you need a source - "ETSI TS 103 285 2018", 2nd link.

Is there any possibility of mp4box being updated to support DVB profile? Or making mp4box more customisable so a developer could specify the profile for mp4box to follow?

@rbouqueau
Copy link
Member

Currently I'm using the 'live' profile but finding I'm having to manually edit each manifest afterwards to make them compliant.

What do you edit?

You can manually add the profile name to the manifest using the -profile-ext option:

-profile-ext STRING  specifies a list of profile extensions, as used by DASH-IF and DVB.
                     The string will be colon-concatenated with the profile used

Note that this just adds the string but do not make any conformance check or trigger any specific flags to ensure conformance.

Does it fulfill your need?

@mcflyuk
Copy link

mcflyuk commented Oct 31, 2018

From trial and error I've found the "-profile dashavc264:live" parameter provide the closest representation to the dvb-dash requirement.

I'm using the -profile-ext to add "urn:dvb:dash:profile:dvb-dash:2017", but then going back in and manually removing the other profile text included by default.

Here are some of the other changes I'm having to manually make:

  • removing lang="und" from video AdaptationSets. Video doesn't really require a language, only audio.
  • changing lang="eng" to lang="en", language uses a two character code for DVB

I don't know whether mp4box checks the video encoding information? If you have video encoded with HLG10 or PQ10 it requires additional EssentialProperty descriptors which is specified in 5.2.6 and 5.2.7 from the DVB DASH spec. I've tried to include these with :desc_as but it ended up with a "can't find the video" error. I tried using the formatting described in gpac/tile-player#1 for desc_as but couldn't get it to work. Any suggestions?

HLG10
<EssentialProperty schemeIdUri="urn:mpeg:mpegB:cicp:ColourPrimaries" value="9"/> <EssentialProperty schemeIdUri="urn:mpeg:mpegB:cicp:MatrixCoefficients" value="9"/> <EssentialProperty schemeIdUri="urn:mpeg:mpegB:cicp:TransferCharacteristics" value="14"/> <SupplementalProperty schemeIdUri="urn:mpeg:mpegB:cicp:TransferCharacteristics" value="18"/>

PQ10
<EssentialProperty schemeIdUri="urn:mpeg:mpegB:cicp:ColourPrimaries" value="9"/> <EssentialProperty schemeIdUri="urn:mpeg:mpegB:cicp:MatrixCoefficients" value="9"/> <EssentialProperty schemeIdUri="urn:mpeg:mpegB:cicp:TransferCharacteristics" value="16"/>

I'm also adding:
<SupplementalProperty schemeIdUri="urn:dvb:dash:highest_temporal_id:2017" value="2"/>
for HFR video encoded with temporal layers but I think that's quite specific, I'm not sure whether mp4box could detect that automatically? Perhaps with a if (frame_rate >= 50), check for number of temporal layers and if found, set descriptor value to number of temporal layers. Just a thought.

Hope this is all useful feedback.

@jeanlf
Copy link
Member

jeanlf commented May 26, 2023

'm using the -profile-ext to add "urn:dvb💨profile:dvb-dash:2017", but then going back in and manually removing the other profile text included by default.

now possible in latest master using --profX=+NEW_PROFILE_STRING

removing lang="und" from video AdaptationSets. Video doesn't really require a language, only audio.
changing lang="eng" to lang="en", language uses a two character code for DVB

done in latest master

HDR cicp code points have been in master for a while now.

The HFR highest TID is not exposed by the demuxers so it's best to add it manually.

Sorry for the long delay on this one ...

@jeanlf jeanlf closed this as completed May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants