castlabs / dashas Goto Github PK
View Code? Open in Web Editor NEWMPEG-DASH player written in ActionScript
Home Page: http://castlabs.github.io/dashas
License: Other
MPEG-DASH player written in ActionScript
Home Page: http://castlabs.github.io/dashas
License: Other
Bar
At the moment logging is controlled at the compilation level. A debug package has logging enabled. A production has logging disabled. Some examples are using the debug package to be able show log messages. However the debug package is very slow.
Logging should be controlled by a variable in runtime. By default logging will be disabled. Developer should be able to enable logging through HTML page.
Visible here for example:
https://castlabs-dl.s3.amazonaws.com/public/DASH/buffer_inc/Manifest.mpd
Create a page with custom URL field, so that people can start testing the player with their own streams.
ubuntu@ubuntu:~/Desktop/dashas-master$ gradle clean compile
Download http://dashas.castlabs.com/ivy/apache-flex-sdk-4.12.1.tar.gz
[copy] Copying 5682 files to /home/ubuntu/.gradle/gradleFx/sdks/86c6aa5c2c1084d7f4e8996be5c5cfa2e429cbe9
[copy] Copied 1034 empty directories to 144 empty directories under /home/ubuntu/.gradle/gradleFx/sdks/86c6aa5c2c1084d7f4e8996be5c5cfa2e429cbe9
get-data:
[get] Getting: http://flex.apache.org/installer/sdk-installer-config-4.0.xml
[get] To: /home/ubuntu/.gradle/gradleFx/sdks/86c6aa5c2c1084d7f4e8996be5c5cfa2e429cbe9/sdk-installer-config-4.0.xml
FAILURE: Build failed with an exception.
The following error occurred while executing this line:
/home/ubuntu/.gradle/gradleFx/sdks/86c6aa5c2c1084d7f4e8996be5c5cfa2e429cbe9/installer.xml:119: Reference air.sdk.path.linux.3.9 not found.
How can i solve this issue ? Please Verify the same
Message timestamp should be calculate as cumulative value from last seek. This should improve playback smoothness for manifest with SegmentList and SegmentTemplate definition.
how to do seek on DashNetStream?
Can you give sample code?
Play/pause is working fine.
I am trying to start development with dashas project . I couldn't reach dashas.castlabs.com DNS entry while building the source code (For example : http://dashas.castlabs.com/ivy/apache-flex-sdk-4.12.1.xml ) . I am trying to build the project on Ubuntu 17.04 with Gradle 1.1 . I want to know when DNS entry will be reachable or maybe can you suggest any different source to download this dependency . Please solve this issue . I am stuck in the middle .
Getting the plugin to work with provided SMP is easy and works really well, but the plugin doesn't seem to work with bespoke OSMF media players.
For example, the following is the source code for a simple OSMF player (built with the latest official OSMF SWC) that should work as a drop-in replacement for the SMP in the demo page, but it doesn't work; you can see that everything is loading, but it always results in playbackError
when a DASH URL is used.
package
{
import flash.display.Sprite;
import flash.events.Event;
import org.osmf.elements.VideoElement;
import org.osmf.events.MediaFactoryEvent;
import org.osmf.events.MediaPlayerStateChangeEvent;
import org.osmf.media.MediaPlayerSprite;
import org.osmf.media.URLResource;
public class DashTest extends Sprite
{
public var player:MediaPlayerSprite;
public function DashTest()
{
addEventListener(Event.ADDED_TO_STAGE, init);
}
protected function init(event:Event):void
{
player = new MediaPlayerSprite();
player.width = stage.stageWidth;
player.height = stage.stageHeight;
player.mediaPlayer.addEventListener(MediaPlayerStateChangeEvent.MEDIA_PLAYER_STATE_CHANGE, stateChangeHandler);
player.mediaFactory.addEventListener(MediaFactoryEvent.PLUGIN_LOAD, pluginHandler);
player.mediaFactory.addEventListener(MediaFactoryEvent.PLUGIN_LOAD_ERROR, pluginHandler);
player.mediaFactory.loadPlugin(new URLResource(loaderInfo.parameters.plugin_DashPlugin));
addChild(player);
}
protected function stateChangeHandler(event:MediaPlayerStateChangeEvent):void
{
// event.state outputs "playbackError"
}
protected function pluginHandler(event:MediaFactoryEvent):void
{
if (event.type == MediaFactoryEvent.PLUGIN_LOAD)
{
var resource:URLResource = new URLResource(loaderInfo.parameters.src);
// UPDATE: To fix this code, simple replace:
// var element:VideoElement = new VideoElement(resource); // ... with
var element:MediaElement = player.mediaFactory.createMediaElement(resource);
player.media = element;
}
}
}
}
In more complex OSMF players, I've tried embedding the plugin both as a SWF and as a class, but receive the following error, which occurs when OSMF is unable to populate the streamName
property of a NetStreamOptions
object before playback:
RangeError: Error #1125: The index 0 is out of range 0. at org.osmf.net::NetStreamPlayTrait/playStateChangeStart()
Have you modified the version of OSMF you've included with SMP (I noted that there was a mention of it being "tidied up" in response to a previous issue)? Or are there additional configuration options that need to be set before using the plugin with a bespoke player?
All help and/or examples gratefully received!
With commit 90becf7 lipsync issue has been introduced for certain stream.
The setup: ffmpeg (h264) -> rtmp -> nginx-rtmp -> (HLS | DASH). The video is playing fine in Chrome and IE11 using dash.js, but rarely plays in dashas player. Rarely = once in a while after unknown number of restarts/browser refreshes it will stream OK, but most of the time there is either a still image or it only plays the first fragment - almost like some kind of timing issue. My MPD - http://71.195.249.184:3106/dash/webcam.mpd (the stream is most of the time on, sometimes not - macbook goes to sleep - sorry, cheapo setup).
When the stream is playing OK in Chrome, I can see (in developer console, network requests) how it keeps refreshing manifest and periodically loads new fragments. With dashas - it keeps refreshing the manifest, but I don't see it load new fragments after the init/first one.
Some customers have a single MP4 file with all the audio/video tracks. Player should support this use case.
I'm missing the usage of DynamicStreamingIndex-Class of OSMF for the different Resolutions/Bandwidths.
Is there a way to use this, or can you implement?
Logging feature causes a high CPU usage. The root cause are number of ExternalInterface messages (about 40 per second) and chart library.
Actions:
Hi,
while testing a video (81 seconds), I see that audio suddenly cuts at 77 second. But it must take up to 79.
Here is the manifest file: http://10.0.0.28/videos/8137953/Manifest.mpd
I also tested the file at http://dashif.org/reference/players/javascript/1.0.0/index.html and there is no audio error that I mentioned above.
Is it about fragment handling or byte array processing?
Hi, I have done a preliminary round of integrating into our OSMF player. So far I see one error that's come up 2 times:
TypeError: Error #1083: The prefix "x" for element "xmptk" is not bound.
at com.castlabs.dash.loaders::ManifestLoader$/removeNamespacesAndBuildXml()[/Users/tomek/dashas/src/main/actionscript/com/castlabs/dash/loaders/ManifestLoader.as:67]
at com.castlabs.dash.loaders::ManifestLoader/onComplete()[/Users/tomek/dashas/src/main/actionscript/com/castlabs/dash/loaders/ManifestLoader.as:55]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
I assume it has to do with malformed or non-existent XML, but why is the error being triggered and is there any way to prevent it?
Thanks.
Hi, I would like, as a test, to integrate the DASH plugin into my OSMF player. Did you alter the Strobe player in order to load your DASH plugin? I can't imagine the out of the box Strobe player would know what to do with the plugin_DashPlugin flashvar.
Thanks.
Even example with live stream does not work:
http://dashas.castlabs.com/demo/try.html
http://dashas.castlabs.com/videos/bytes/bbb/Manifest.mpd
Аfter playing some time player shows error.
In my project I alsow tried to set up live stream and play it with dashas with the same result.
This case is handled by SegmentHandler.validateTracksNumber and an exception is thrown, but do you plan to add suport any time soon?
Log message: "
Creating manifest...
Couldn't find any representations, mimeType='audio/mp4' "
This bug should be fixed quickly because MPDs without audio representation cannot be loaded properly.
The player seems to be having trouble playing dash streams formatted like:
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" type="dynamic" minimumUpdatePeriod="PT2S" availabilityStartTime="2015-08-19T03:33:52" minBufferTime="PT4S" suggestedPresentationDelay="PT20S" timeShiftBufferDepth="PT1M0S" profiles="urn:mpeg:dash:profile:isoff-live:2011">
<Period start="PT0S" id="1">
<AdaptationSet mimeType="video/mp4" codecs="avc1.4d401f,mp4a.40.5" frameRate="25/1" segmentAlignment="true" subsegmentAlignment="true" startWithSAP="1" subsegmentStartsWithSAP="1" bitstreamSwitching="true">
<ContentComponent contentType="video" id="1"/>
<ContentComponent contentType="audio" id="2"/>
<SegmentTemplate timescale="90000" media="ch09$Time$.mp4" initialization="ch09init.mp4">
<SegmentTimeline>
<S t="47608740000" d="180000" r="29"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation id="1" width="1024" height="576" bandwidth="4500000">
<SubRepresentation contentComponent="1" bandwidth="4500000" codecs="avc1.4d401f"/>
<SubRepresentation contentComponent="2" bandwidth="64000" codecs="mp4a.40.5"/>
</Representation>
</AdaptationSet>
</Period>
</MPD>
The console produces the following errors at try.js:56
:
Loading manifest, url='http://sohiptvlb2.soh.com/sdtv/ch09.mpd'
Loaded manifest, url='http://sohiptvlb2.soh.com/sdtv/ch09.mpd'
Creating manifest...
Couldn't find media presentation duration
The DASH standard seems to support a lot of different representations
Is there a way to call the subtitles in a live streaming? If so what's the method I need to use to grab the captions data?
Some classes use static references. This is tight coupling and prevent from writing unit tests.
Actions:
dashencrypt
is available at: https://github.com/castlabs/dashencrypt
Hi,
as seen in the url http://10.0.0.28/videos/8115637/Manifest.mpd audio tracks are longer than video tracks. Last 10 seconds there is only audio (still video image). But, altough manifest duration (that is audio duration) is 01:48, stream stops playing at 01:39 (when video tracks complete). I think need a flag addition for longer audio tracks (for example like silent audio).
I'm flow instruction in https://github.com/castlabs/dashas/wiki/IntelliJ-IDEA#instructions.
But get this error:
Can't get http://swfobject.googlecode.com/files/swfobject_2_2.zip to /root/.gradle/gradleFx/sdks/dd5c593309c00182cd7720bce5c480c6b749087f/in/swfobject_2_2.zip
I’m using GradleFx. In Gradle get error in line 10 of build.gradle file (apply plugin: 'gradlefx').
Right click menu on player to link to castlabs.com for more info on player, etc.
At the moment player isn't verbose whilst parsing manifest or segments. External developers found this annoying.
Actions:
There should be additional log messages in the following areas:
... additionally well-known issues (such as missing crossdomain.xml or .htaccess files) should be highlighted with a reference to a documentation page.
Convert project from OSMF plugin into vanilla standalone player. New player shouldn't have user interface. An user interface should be deliver through videojs integration.
We have audio and video segments separated. We tried with audio fragments having LC AAC audio but its not playing.
Can you help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.