-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Only last few dash chunks being played by shaka player #1729
Comments
We can't reproduce a live stream issue if you have a static snapshot of the live content. But I can take a guess at the problem. If you get correct chunks played in the hosted demo, but not your own application, you may be missing some configuration. In particular, the clock sync configuration. Clock sync is critical to live streaming. You can't trust your users to have the correct time set, and sometimes, even your own clock as a developer is wrong. Clock sync provides a way to correct the client clock to sync with the server clock. There are two main ways to accomplish clock sync: in the manifest, or through configuration. In the manifest, you can use the Without support from the packager to put player.configure(
'manifest.dash.clockSyncUri',
'https://shaka-player-demo.appspot.com/time.txt'); Does this help? |
I have generated the dash files using shaka packager on cloud machine, copied the files to my local machine and have hosted the server on the same local machine. So the manifest needs to sync the client clock with my local machine(acting as the server) or the cloud machine (where the dash files were generated)?
I am using shaka packager. Here is the command I used The value of utc_timing points to the current UTC time always. I thought this will work as the cloud machine I used to generate dash chunks has clock as per UTC Attaching the generated mpd in txt format. After running the above command and using the generated mpd (attached above), I still face the same issue of only the last few chunks being played.
Haven't tried this yet. In which file do I need to do this? Few additional questions:
|
You should put that configuration after creating the player, but before loading. So, as you said you were following the tutorial, you could end up with something like... function initPlayer() {
// Create a Player instance.
var video = document.getElementById('video');
var player = new shaka.Player(video);
// Configure to add a clock sync uri.
player.configure(
'manifest.dash.clockSyncUri',
'https://shaka-player-demo.appspot.com/time.txt');
// Attach player to the window to make it easy to access in the JS console.
window.player = player;
// Listen for error events.
player.addEventListener('error', onErrorEvent);
// Try to load a manifest.
// This is an asynchronous process.
player.load(manifestUri).then(function() {
// This runs if the asynchronous load is successful.
console.log('The video has now been loaded!');
}).catch(onError); // onError is executed if the asynchronous load fails.
} |
@parth2094 Does this answer all your questions? Can we close the issue? |
I tried this :
This is what I tried in myapp.js and this also didn't work. What else could I be missing. What else informartion can I provide you that will enable you to help with the root cause? |
We added a feature to ignore the Really, your packager should only generate content in real time. I think FFmpeg has an input flag of We currently don't have a way to disable this behavior, so we should add a flag. You can verify my guess by using the v2.4.x version locally instead of |
@parth2094 Does this answer all your questions? Can we close the issue? |
Was this added in v2.5.x ?
I am using shakapackager to generate dash output. I am a little confused here. Is it not possible to generate a 10 hr long dash output with a live manifest which should from the |
Thanks a lot for pointing this out. v2.4.5 version of shaka player worked for me with and without adding UTCTiming flag.
Thanks!! |
Let's say you have a manifest that has 3 hours of media in it that are from 2-5 hours into the live stream. The manifest specifies these segments for download by the client. Let's also say the
Most live content is being generated in real time. The manifest gets updated every few seconds, adding new segments for us to play. So we should start playing at the last segment in the first manifest so we have the shortest delay between generation and playback. But if you are generating a live stream from VOD that you have in advance, then your manifest may have many more segments than should be played. In this case, we should use the
You can't. I'm working on adding a flag to disable our new live fixing so your content will work (delays due to the holidays).
We don't know if we can trust The current "live edge" is equal to
Yep, I'll add it soon and it will appear before the v2.5 release. |
Have you read the FAQ and checked for duplicate open issues?: Yes
What version of Shaka Player are you using?: v2.5.0-beta2
Can you reproduce the issue with our latest release version?: Yes
Can you reproduce the issue with the latest code from
master
?: YesAre you using the demo app or your own custom app?: comparing the result of both
If custom app, can you reproduce the issue using our demo app?: No
What browser and OS are you using?: Chrome, mac OS
What are the manifest and license server URIs?:
What did you do?
Generated dash chunks and live manifest. The duration is 10 hr long and about 3601 chunks
What did you expect to happen?
Based on the current time offset from the time of generation, I expect the shaka player to calculate which chunk to play. So if it is 2 hrs from time of generation, I expect shaka player to play that chunk.
What actually happened?
The shaka player that I installed using instructions here plays only the last 3-4 chunks. I can see in the network tab it fetches 3598, 3599, 3600, 3601.m4a.
In the demo app i.e. https://shaka-player-demo.appspot.com/demo/#build=uncompiled it works fine as expected i.e. the chunks is played based on what the time offset is from the time of generation.
And the same issue repros with dash player as well what happens with the shaka player installed on my mac and being served by node js.
https://shaka-player-demo.appspot.com/demo/#asset=https://storage.googleapis.com/wvtemp/kqyang/514_user/master.mpd;lang=en-US;build=uncompiled
The above URL was tried by the shaka packager team to help me. And it worked. The dash data that I provided for this can be found here: https://drive.google.com/drive/folders/1h8hpazrUNANvJo0ozE8aLSHAK7IT5zMK?usp=sharing
The folder has master.mpd and the chunks to be played.
Can you please help me understand why is this behaviour happing on shaka player installed on my mac. Same happens with dash player but the files seem to be fine as the demo app can play them as expected.
The text was updated successfully, but these errors were encountered: