Why this dash manifest keeps the player stuck until streams are downloaded? - video.js

I have this manifest file below . The issue is that the player waits for the streams to download completely before to start playing which is bad for the user experience. Any idea how to fix it? I expected the player to start range requests and feed media source with partial requests instead to wait for the streams to completely download.
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediaPresentationDuration="PT30M67.6S" minBufferTime="PT2S">
<ProgramInformation></ProgramInformation>
<Period id="0" start="PT0.0S">
<AdaptationSet id="0" contentType="video" segmentAlignment="true" bitstreamSwitching="true" lang="und">
<Representation id="0" mimeType="video/webm" codecs="vp9" bandwidth="770153" width="854" height="480" frameRate="23421/1000">
<BaseURL>https://liveradio.s3.eu-central-1.amazonaws.com/video.webm</BaseURL>
<SegmentList duration="1840613" startNumber="1">
<Initialization range="0-219"/>
<SegmentURL indexRange="220-6592"/>
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet id="1" contentType="audio" segmentAlignment="true" bitstreamSwitching="true" lang="und">
<Representation id="1" mimeType="audio/webm" codecs="opus" bandwidth="115412" audioSamplingRate="48000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<BaseURL>https://liveradio.s3.eu-central-1.amazonaws.com/audio.webm</BaseURL>
<SegmentList duration="1840641" startNumber="1">
<Initialization range="0-258"/>
<SegmentURL indexRange="259-3444"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>

You seem to be using a mix of the DASH 'live' profile approach and the 'on-demand' profile one - you can see the profile in the profiles="urn:mpeg:dash:profile:isoff-live:2011" at the top of your manifest.
At a very high level the difference is:
'live' profile manifests contain a list of urls for each segment to be downloaded.
'on-demand' profile manifests contain a URL to a file and an index to where the segments can be found in the file, so the client can download chunks as it wants.
DASH is a complex specification and it may be that some players will accept some mixes of profiles and others not, and not all players support all features - for example Shaka player claims not to support 'indexRange' (or did in 2017: https://github.com/google/shaka-player/issues/765)

Related

How to play hls inside VAST 4.2 using open-source players?

My site uses video.js with the videojs-ima plugin, but it didn't work with hls inside VAST.
I tested the xml using the Google service https://googleads.github.io/googleads-ima-html5/vsi/ and I see the error Ad error: AdError 400: There was an error playing the video ad. Caused by: Error: Error: There was an error playing the video ad.
I tried the videojs-vast-vpaid plugin, but it throws an error about the inability to work with VAST 4.2.
I tried other free players - plur, openplayerjs, fluid player-but none of them worked with my xml.
my VAST 4.2 sample xml looking like that (Warning! NSFW content inside):
<VAST xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.iab.com/VAST" version="4.2">
<Ad id="1" adType="video">
<InLine>
<AdSystem version="1">stripcash.com</AdSystem>
<AdTitle>Naked girl get cum on face</AdTitle>
<Creatives>
<Creative sequence="1" id="1">
<Linear skipoffset="00:00:05">
<Duration>00:00:05</Duration>
<MediaFiles>
<MediaFile id="1" delivery="progressive" type="video/mp4" width="480" height="640">
<![CDATA[ https://b-hls-25.strpst.com/hls/48371204/48371204.m3u8 ]]>
</MediaFile>
</MediaFiles>
<VideoClicks>
<ClickThrough id="1">
<![CDATA[ https://go.xxxjmp.com/api/goToTheRoom?campaignId=59eb46ec7c05df0507091.......]]>
</ClickThrough>
</VideoClicks>
</Linear>
<UniversalAdId idRegistry="unknown">unknown</UniversalAdId>
</Creative>
</Creatives>
<Impression id="">
<![CDATA[ https://go.xxxjmp.com/eye.gif?campaignId=59eb46ec7c05df0507091cccc8a....... ]]>
</Impression>
</InLine>
</Ad>
</VAST>
The IMA SDK creates it's own video element to play the creative. That will only be able to formats the browser can natively support. HLS would work on Safari.

RTI DDS creating own data types

I am working on a .Net example where I define my own data type using RTI Connext DDS.
Instead of creating the application from the beginning, I got help from the source code of the hello_world_xml_dynamic example in rti_workspace directory. I have made several changes to the USER_QOS_PROFILES.xml file to create my own data type and changes its name to MY_PROFILES.xml
But when I compile the application and run it from the command line, I get the following error:
DDS_DomainParticipantFactory_create_participant_from_config_w_paramsI:ERROR: Profile library 'MyParticipantLibrary::PublicationParticipant' not found
! Unable to create DDS domain participant
The line of code that catching the error:
if (this.participant == null)
{
this.participant = DDS.DomainParticipantFactory.get_instance().
create_participant_from_config(
"MyParticipantLibrary::PublicationParticipant");
if (this.participant == null)
{
Console.Error.WriteLine("! Unable to create DDS domain participant");
return;
}
}
this is the configuration file MY_PROFILES.xml :
<!--
RTI Data Distribution Service Deployment
-->
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/6.0.1/rti_dds_profiles.xsd">
<!-- Qos Library -->
<qos_library name="qosLibrary">
<qos_profile name="DefaultProfile">
</qos_profile>
</qos_library>
<!-- types -->
<types>
<struct name="FlightData">
<member name="Latitude" type="double"/>
<member name="Longitude" type="double"/>
<member name="Altitude" type="double"/>
</struct>
</types>
<!-- Domain Library -->
<domain_library name="MyDomainLibrary" >
<domain name="FlightDataDomain" domain_id="0">
<register_type name="FlightDataType"
type_ref="FlightData" />
<topic name="FlightDataTopic"
register_type_ref="FlightDataType">
<topic_qos name="FlightData_qos"
base_name="qosLibrary::DefaultProfile"/>
</topic>
</domain>
</domain_library>
<!-- Participant library -->
<domain_participant_library name="MyParticipantLibrary">
<domain_participant name="PublicationParticipant"
domain_ref="MyDomainLibrary::FlightDataDomain">
<publisher name="MyPublisher">
<data_writer name="FlightDataWriter"
topic_ref="FlightDataTopic"/>
</publisher>
</domain_participant>
<domain_participant name="SubscriptionParticipant"
domain_ref="MyDomainLibrary::FlightDataDomain">
<subscriber name="MySubscriber">
<data_reader name="FlightDataReader"
topic_ref="FlightDataTopic">
<datareader_qos name="FlightData_reader_qos"
base_name="qosLibrary::DefaultProfile"/>
</data_reader>
</subscriber>
</domain_participant>
</domain_participant_library>
</dds>
where am i making a mistake?
Your XML file looks correct. From the 'not found' error message, it seems that you may not have taken the right steps to instruct your application to load that profiles-file MY_PROFILES.xml to actually learn about your desired Participant. You can easily verify that this is the case by introducing an error in your XML file (for example by incorrectly renaming one tag) and rerun your application. If it does not complain about the syntax or schema of the XML, then your file did not get loaded and this hypothesis is correct.
If that turns out to be your problem indeed, then you have several options to fix that. They are listed in the User's Manual section 18.5 How to Load XML-Specified QoS Settings.

How could include javascript libraries on a wirecloud operator

I am trying to develop a wirecloud operator but I don't know how to include a javascript library (i.e. jquery) on the config.xml except the main.js file. I tried to include the jquery library on the config.xml just like the main.js way, using different wire:index, but it did not work.
Is there any way to include a second JS library?
Yes, you can have more than one javascript file in operators. I think your problem is related to the RDF syntax that is a bit weird. Anyway, the following snippet is an example of how to include jquery and a main.js file using RDF/XML:
<usdl:utilizedResource>
<usdl:Resource rdf:about="js/jquery.min.js">
<wire:index>0</wire:index>
</usdl:Resource>
</usdl:utilizedResource>
<usdl:utilizedResource>
<usdl:Resource rdf:about="js/main.js">
<wire:index>1</wire:index>
</usdl:Resource>
</usdl:utilizedResource>
Alternatively, if you are using the Mashup portal at FIWARE Lab, you can make use of the new XML format that is going to be available on WireCloud 0.7.0 (currently the Mashup portal is running release candidate of that version). This is an example of the new format:
<?xml version='1.0' encoding='UTF-8'?>
<operator xmlns="http://wirecloud.conwet.fi.upm.es/ns/macdescription/1" vendor="CoNWeT" name="ngsi-source" version="3.0">
<details>
<title>NGSI source</title>
<homepage>https://github.com/wirecloud-fiware/ngsi-source</homepage>
<authors>Álvaro Arranz García <aarranz#conwet.com></authors>
<email>aarranz#conwet.com</email>
<image>images/catalogue.png</image>
<description>Retrieve Orion Context Broker entities and their updates in real time.</description>
<longdescription>DESCRIPTION.md</longdescription>
<license>AGPLv3+ w/linking exception</license>
<licenseurl>http://www.gnu.org/licenses/agpl-3.0.html</licenseurl>
<doc>doc/userguide.md</doc>
<changelog>doc/changelog.md</changelog>
</details>
<requirements>
<feature name="NGSI"/>
</requirements>
<preferences>
<preference name="ngsi_server" type="text" label="NGSI server URL" description="URL of the Orion Context Broker to use for retrieving entity information" default="http://orion.lab.fi-ware.org:10026/"/>
<preference name="ngsi_proxy" type="text" label="NGSI proxy URL" description="URL of the Orion Context Broker proxy to use for receiving notifications about changes" default="http://mashup.lab.fi-ware.org:3000/"/>
<preference name="ngsi_entities" type="text" label="NGSI entity types" description="A comma separated list of entity types to use for filtering entities from the Orion Context broker. Thies field cannot be empty." default="Node, AMMS, Regulator"/>
<preference name="ngsi_id_filter" type="text" label="Id pattern" description="Id pattern for filtering entities. This preference can be empty, in that case, entities won't be filtered by id." default=""/>
<preference name="ngsi_update_attributes" type="text" label="Monitored NGSI Attributes" description="Attributes to monitor for updates. Currently, the Orion Context Broker requires a list of attributes to monitor for changes, so this field cannot be empty." default="Latitud, Longitud, presence, batteryCharge, illuminance, ActivePower, ReactivePower, electricPotential, electricalCurrent"/>
</preferences>
<wiring>
<outputendpoint name="entityOutput" type="text" label="Provide entity" description="Every change over each entity fires an event" friendcode="entity"/>
</wiring>
<scripts>
<script src="js/other.dependency.js"/>
<script src="js/main.js"/>
</scripts>
</operator>
You can found more documentation about this new format at this link.
Finally, I came off to include other JS files using RDF/XML on a wirecloud operator. Firstly, I use the following code on the config.xml file:
<usdl-core:utilizedResource rdf:about="js/jquery-1.10.2.min.js">
<wire:index>0</wire:index>
</usdl-core:utilizedResource>
<usdl-core:utilizedResource rdf:about="js/main.js">
<wire:index>1</wire:index>
</usdl-core:utilizedResource>
Also, the included JS files have to be declared as follows:
<wire:Operator rdf:about="http://wirecloud.conwet.fi.upm.es/ns/widget#Operator">
...
<usdl-core:utilizedResource rdf:resource="js/jquery-1.10.2.min.js"/>
<usdl-core:utilizedResource rdf:resource="js/main.js"/>
....
</wire:Operator>

is it possible to have dynamic tour from real time data kml

Is there a way to make a tour that is getting the coordinates from a script and updating the tour?
I am getting the data from a python script and then want to update the fly to coordiantes in the tour in real time but dont know how to do that
I tried using a network link but it wasnt working and im not sure if i use the animatedupdate or not
I haven't tried it, but it may be possible using a NetworkLinkControl in KML. You would need a total of four KML files to achieve it. In your scenario the first three could be hard coded, and the fourth could generate from your python script.
load-tour.kml - a NetworkLink file that loads tour.kml
tour.kml - a file that holds the original KML tour data
update-tour.kml - a NetworkLink file that loads the updated tour new-data.kml
new-data.kml - a NetworkLinkControl that updates the original tour.kml
Here are the four files, I have missed out the KML declaration and root element for brevity...
load-tour.kml
<NetworkLink>
<name>load</name>
<Link>
<href>tour.kml</href>
</Link>
</NetworkLink>
tour.kml
<Document>
<gx:Tour id="myTour">
<name>tour</name>
<gx:Playlist id="myPlaylist">
<!-- existing tour data goes here -->
</gx:Playlist>
</gx:Tour>
</Document>
update-tour.kml
<NetworkLink>
<name>update</name>
<Link>
<href>new-data.kml</href>
</Link>
</NetworkLink>
new-data.kml
<NetworkLinkControl>
<Update>
<targetHref>tour.kml</targetHref>
<Change>
<gx:Playlist id="myPlaylist">
<!-- new tour data goes here -->
</gx:Playlist>
</Change>
</Update>
</NetworkLinkControl>
Here is the documentation on the networklinkcontrol and its use in updating data.
https://developers.google.com/kml/documentation/kmlreference#networklinkcontrol
https://developers.google.com/kml/documentation/updates
You can have a NetworkLink update the camera position automatically by using flytoView. It's not an actual Tour but works similarly. Each time it loads the link, it flies to a new LookAt or Camera element in the linked KML.
root.kml
<NetworkLink>
<Link><href>new_camera.kml</href></Link>
...
<flyToView>1</flyToView>
</NetworkLink>
new_camera.kml
<Document>
<Camera>...
or
<LookAt>...
</Document>
I haven't had success updating a playing Tour from NetworkLink, other than changing the Tour name element. I tried starting a looping Tour and then changing the Playlist or FlyTo elements from NetworkLinkControl, but I only see the camera change if I manually restart the Tour.

list=alllinks confusion

I'm doing a research project for the summer and I've got to use get some data from Wikipedia, store it and then do some analysis on it. I'm using the Wikipedia API to gather the data and I've got that down pretty well.
What my questions is in regards to the links-alllinks option in the API doc here
After reading the description, both there and in the API itself (it's down and bit and I can't link directly to the section), I think I understand what it's supposed to return. However when I ran a query it gave me back something I didn't expect.
Here's the query I ran:
http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=google&rvprop=ids|timestamp|user|comment|content&rvlimit=1&list=alllinks&alunique&allimit=40&format=xml
Which in essence says: Get the last revision of the Google page, include the id, timestamp, user, comment and content of each revision, and return it in XML format.
The allinks (I thought) should give me back a list of wikipedia pages which point to the google page (In this case the first 40 unique ones).
I'm not sure what the policy is on swears, but this is the result I got back exactly:
<?xml version="1.0"?>
<api>
<query><normalized>
<n from="google" to="Google" />
</normalized>
<pages>
<page pageid="1092923" ns="0" title="Google">
<revisions>
<rev revid="366826294" parentid="366673948" user="Citation bot" timestamp="2010-06-08T17:18:31Z" comment="Citations: [161]Tweaked: url. [[User:Mono|Mono]]" xml:space="preserve">
<!-- The page content, I've replaced this cos its not of interest -->
</rev>
</revisions>
</page>
</pages>
<alllinks>
<!-- offensive content removed -->
</alllinks>
</query>
<query-continue>
<revisions rvstartid="366673948" />
<alllinks alfrom="!2009" />
</query-continue>
</api>
The <alllinks> part, its just a load of random gobbledy-gook and offensive comments. No nearly what I thought I'd get. I've done a fair bit of searching but I can't seem to find a direct answer to my question.
What should the list=alllinks option return?
Why am I getting this crap in there?
You don't want a list; a list is something that iterates over all pages. In your case you simply "enumerate all links that point to a given namespace".
You want a property associated with the Google page, so you need prop=links instead of the alllinks crap.
So your query becomes:
http://en.wikipedia.org/w/api.php?action=query&prop=revisions|links&titles=google&rvprop=ids|timestamp|user|comment|content&rvlimit=1&format=xml