Is there a way to set a track name like element in dash/mpd manifests? - http-live-streaming

at my .mpd file I have a lang="en" element, sadly in VideoJS this is not displayed as "English", instead it's displayed as is and the player simply shows "en" and "de" for example when it comes to language selection. Now I would like to know if there is a track_name like object that I can set in the mpd similar to what I can do in a HLS m3u8 playlist e.g.:
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-4",NAME="English",CHANNELS=2,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="en",URI="a-aac-en-mp4a.40.2_128000/master.m3u8"
NAME="English" is what gets displayed in VideoJS and LANGUAGE="en" indicated the actual real language. What's the equivalent in Dash/mpd here?
Thanks in advance

After some more searching I gave up finding the relevant information and checked onto the DASH-IF Slack channel where I finally got a response that could help me out with my problem.
In mpd manifests there is no direct attribute such as track or track_name or label... Instead, you can simply just add a Label element like so:
<?xml version="1.0" encoding="utf-8"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" id="master.mpd" minBufferTime="PT1.500S" type="static" mediaPresentationDuration="PT0H22M11.000S" profiles="urn:mpeg:dash:profile:isoff-main:2011">
<ProgramInformation moreInformationURL="https://strics.io">
<Copyright>Blablablallala ...</Copyright>
</ProgramInformation>
<Period duration="PT0H22M11.000S">
<AdaptationSet contentType="audio" mimeType="audio/mp4" segmentAlignment="true" lang="de" maxBandwidth="64000" minBandwidth="25600">
<Label>Deutsch</Label>
<Representation id="0_a" codecs="mp4a.40.5">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></AudioChannelConfiguration>
<BaseURL>a-aac_he_v2-de-mp4a.40.5_64000/</BaseURL>
<SegmentList timescale="1000" startNumber="0" duration="9000">
<Initialization sourceURL="init-a-aac_he_v2-de-mp4a.40.5_64000.m4s"></Initialization>
<SegmentURL media="f-0000.m4s" duration="9.002667"></SegmentURL>
<SegmentURL media="f-0001.m4s" duration="9.002667"></SegmentURL>
<SegmentURL media="f-0002.m4s" duration="9.002667"></SegmentURL>
...

Related

Create kml file to display al bitmap vertically in Google Earth

I have seen examples where it is possible to display a bitmap as a vertical profile in Google Earth. Like this:
However, I have not been able to find any kml/kmz examples of this. Does anyone have a simple example of how to do this?
Does it include using the dae (collada) file format too?
One method to do this would be to use a KML "Photo Overlay". They are designed to place landscape photographs vertically in the world, so that they can be viewed with the Earth terrain & imagery as matching background. You could use that technique to place images like these on vertical planes. There is a basic tool in Earth Pro to create Photo Overlays (Add menu >> Photo). Or you can create them manually or programmatically by writing the appropriate KML (reference links below), though it can get pretty complex with all the placement and field of view parameters. Also note that Photo Overlays work in Earth Pro (Earth v7.x), but do not currently work in Earth for web & mobile (Earth v9.x).
You could also do this using 3D models (yes, collada based) where you have a model representing your vertical plane(s), and the images as textures on the models. 3D models also only work in Earth Pro at this time. Which technique is easier will depend on the tools and skills you have available.
https://developers.google.com/kml/documentation/photos
https://developers.google.com/kml/documentation/kmlreference#photooverlay
My PhotoOverlay example is just here.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">
<Document id="7">
<visibility>0</visibility>
<PhotoOverlay id="8">
<name>PhotoOverlay Test</name>
<visibility>0</visibility>
<Camera>
<longitude>-122.3599987260313</longitude>
<latitude>47.62949781133496</latitude>
<altitude>100</altitude>
<heading>-90</heading>
<tilt>90</tilt>
<roll>0</roll>
</Camera>
<Icon id="10">
<href>foo.png</href>
</Icon>
<ViewVolume>
<leftFov>-45</leftFov>
<rightFov>45</rightFov>
<bottomFov>-45</bottomFov>
<topFov>45</topFov>
<near>20000</near>
</ViewVolume>
</PhotoOverlay>
</Document>
</kml>
My kml example using collada is here.
You have to prepare your_prepared_square.dae and your_prepared.png in same folder. The square size is 1m x 1m. This model is scaling base.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">
<Document id="1">
<Placemark id="2">
<name>My billboard</name>
<Model id="3">
<altitudeMode>absolute</altitudeMode>
<Location>
<longitude>140.037</longitude>
<latitude>36.84895</latitude>
<altitude>500</altitude>
</Location>
<Orientation>
<heading>90</heading>
<tilt>0</tilt>
<roll>0</roll>
</Orientation>
<Scale>
<x>1</x>
<y>10000</y>
<z>3500</z>
</Scale>
<Link id="4">
<href>your_prepared_square.dae</href>
</Link>
<ResourceMap>
<Alias>
<targetHref>your_prepared.png</targetHref>
<sourceHref>mapping.png</sourceHref>
</Alias>
</ResourceMap>
</Model>
</Placemark>
</Document>
</kml>
And mapping.png is texture filename in the collada model. This has
to be defined in the model. following fragment is a part of your_prepared_square.dae. But you don't need to prepare mapping.png. KML replaces it to your_prepared.png.
:
:
<library_images>
<image id="texture" name="texture">
<init_from>mapping.png</init_from>
</image>
</library_images>
:
:
folllowing image is applied this method.

Problem with style validation in geoserver

Try to set a style in geoserver styles editor.
but the validation fails
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>capitals</Name>
<UserStyle>
<Name>fix_histogram</Name>
<Title>Fix Histogram</Title>
<FeatureTypeStyle>
<Rule>
<Title>Capitals</Title>
<RasterSymbolizer>
<ContrastEnhancement>
<Normalize>
<VendorOption name="algorithm">StretchToMinimumMaximum</VendorOption>
<VendorOption name="minValue">50</VendorOption>
<VendorOption name="maxValue">100</VendorOption>
</Normalize>
</ContrastEnhancement>
</RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
line 19: cvc-complex-type.2.1: Element 'Normalize' must have no character or element information item [children], because the type's content type is empty.
but this code was taken from the example for RasterSymbolizer:
https://docs.geoserver.org/latest/en/user/styling/sld/reference/rastersymbolizer.html
Thanks,
It is possible that the schema that the editor is using has not been updated to recognise the vendor options you are using.
Does the style work if you apply it?

MP4 Box - Initialization segments, Base-URL and independent MPDs

I have an original video coded in several resolutions with its associated bitrates:
CanalMetroLivinglab3DTV-HD-Musica_384x216.mp4
CanalMetroLivinglab3DTV-HD-Musica_640x360.mp4
CanalMetroLivinglab3DTV-HD-Musica_720x406.mp4
CanalMetroLivinglab3DTV-HD-Musica_1280x720.mp4
CanalMetroLivinglab3DTV-HD-Musica_1920x1080.mp4
I used GPAC MP4 Box to split into segments these contents and to create the MPD file as follows:
MP4Box -dash 1000 -rap -segment-name %s_ -out CanalMetroLivinglab3DTV-HD-Musica.mpd ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_384x216.mp4 ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_640x360.mp4 ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_720x406.mp4 ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_1280x720.mp4 ..\..\Dem3DTV\CanalMetroLivinglab3DTV-HD-Musica\CanalMetroLivinglab3DTV-HD-Musica_1920x1080.mp4
I obtained the following manifest file:(it isn't complete)
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500000S" type="static" mediaPresentationDuration="PT0H0M45.02S" profiles="urn:mpeg:dash:profile:full:2011">
<ProgramInformation moreInformationURL="http://gpac.sourceforge.net">
<Title>
CanalMetroLivinglab3DTV-HD-Musica.mpd generated by GPAC
</Title>
</ProgramInformation>
<Period duration="PT0H0M45.02S">
<AdaptationSet segmentAlignment="true" bitstreamSwitching="true" maxWidth="1920" maxHeight="1080" maxFrameRate="25" par="16:9" lang="eng">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<ContentComponent id="1" contentType="video"/>
<ContentComponent id="2" contentType="audio"/>
<SegmentList>
<Initialization sourceURL="CanalMetroLivinglab3DTV-HD-Musica_init.mp4"/>
</SegmentList>
<Representation id="1" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="384" height="216" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="479651">...</Representation>
<Representation id="2" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="640" height="360" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="930072">...</Representation>
<Representation id="3" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="720" height="408" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="1123428">...</Representation>
<Representation id="4" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="1280" height="720" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="2470344">...</Representation>
<Representation id="5" mimeType="video/mp4" codecs="avc3.640028,mp4a.40.2" width="1920" height="1080" frameRate="25" sar="1:1" audioSamplingRate="44100" startWithSAP="1" bandwidth="4327645">
<SegmentList timescale="1000" duration="1001">
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_1.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_2.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_3.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_4.m4s"/>
...
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_42.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_43.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_44.m4s"/>
<SegmentURL media="CanalMetroLivinglab3DTV-HD-Musica_1920x1080_45.m4s"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>
However, I have several questions:
First, I think there should be an initialization segment for each representation and it will be listed in the first position of the SegmentList.
How can I do it?
Second, in my case all segments (.m4s), the initialization segment(.mp4) and the manifest file (.mpd) are stored in the same location in a server. According to this, isn't it neccessary the Base-URL element?
In other DASH sequences that I saw, all the segments of each representation are stored in an independent folder together to its associated initialization segment and the manifest file of that representation. And then, there is a global MPD. What parameters of MP4 Box do I have to use to do it in this way?
Thank you!
First Question: It seems that GPAC is using only one initialization segment that contains all initialization information for all representations. Therefore a SegmentList element with the Initialization element is present in the AdaptationSet element. According to the MPEG-DASH standard, this technique is used to express default values and all SegmentList elements inside of the Representation elements will inherit the attributes and elements from the higher level SegmentList. Basically this means that each SegmentList on the Representation level contains an initialization segment.
Second Question: If no BaseUrl element is present on the MPD level then all requests will be relative to the MPD location. So if the MPD is located on the same server there is no need to use a BaseUrl. It makes it also more comfortable when you move the content from one folder to another because you do not need to modify the MPD, i.e., changing the BaseUrl.
Third Question: This is possible and other services are structuring the content in that way and using SegmentTemplate, while providing MPDs for all individual Representations. This makes it easier to remove or add Representations. With MP4Box you can use the -segment-name flag and enable a subdirectory for each Representation with, e.g., $RepresentationID$/CanalMetroLivinglab3DTV-HD-Musica_$Number$.m4s. Anyway there is no need to do it like that. I would strongly recommend to use SegmentTemplate as it makes your MPD more compact (less bytes, reduces startup delay). Possible with MP4Box and the -url-template flag. Btw. your content as generated with MP4Box seems valid, at least from the MPEG-DASH MPD perspective. You can always check if your MPD is valid with the MPD-Validator from the University Klagenfurt.

Geoserver point symbology with jpg, gif or png, not display in openlayer

I would like to update graphic symbolize in geoserver style from svg to png, gif or jpg. However, the symbol doesn't display when I view in openlayer. Svg symbol works fine.
Here is my code:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>map_seed_source_site </se:Name>
<UserStyle>
<se:Name>map_seed_source_site </se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>Single symbol </se:Name>
<se:PointSymbolizer>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:type="simple" xlink:href="http://www.opendevelopmentcambodia.net/wp-content/themes/opendata/images/seed-sources-legend.gif" />
<se:Format>image/gif</se:Format>
</se:ExternalGraphic>
<se:Size>100 </se:Size>
</se:Graphic>
</se:PointSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
When you tried, have you also changed this line?
from
<se:Format>image/gif</se:Format>
to
<se:Format>image/png</se:Format>
I'm also not sure if you can use <size> tag with non-vector graphic files. So try to change the gif to PNG and also to remove the size. The SLD will use the original size of the PNG. I'm not 100% sure it helps but it is worth a try...

How can I upload a KML file to a website for an organization with multiple locations?

I am trying to update a KML file for a website that has a multiple locations and having some trouble. I want to use it accordance with schema.org to get rich snippets in Google search results. My problem is I can't find a solid answer on how to relate multiple listings to the proper pages.
I think I understand how to create the KML file from these resources.
https://developers.google.com/kml/documentation/kml_tut
http://sixrevisions.com/web-development/5-little-known-web-files-that-can-enhance-your-website/
Here is my example code:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Hospital 1</name>
<description>Our first hospital</description>
<Style id="pin"><IconStyle><Icon><href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href></Icon></IconStyle></Style>
<Placemark>
<LookAt>
<longitude>-0.13642</longitude>
<latitude>50.819522</latitude>
<altitude>0</altitude>
<tilt>0</tilt>
<range>5500</range>
</LookAt>
<styleUrl>#pin</styleUrl>
<Point><coordinates>-0.13642,50.819522,0</coordinates></Point>
</Placemark>
</Document>
</kml>
I know that it has to be in the root folder and named after the site. But how do I name different locations or associate them to a certain page? Can I put the kml file on the different location pages?
I might be thinking about this in the wrong way so any help would be greatly appreciated.Thank you.
From your sixrevisions.com link, the part you are missing is that you have to reference this KML file on your webpage with a LINK tag:
<link rel="alternate" type="application/vnd.google-earth.kml+xml" href="SixRevisions.kml" />
The location and name of the file aren't important (as long as you update the href attribute). You can put this tag on whatever page you want so you can point each page at a separate file.

Resources