Have you read the FAQ and checked for duplicate open issues?:
Yes
What version of Shaka Player are you using?: 2.4
Can you reproduce the issue with our latest release version?:
Yes
Can you reproduce the issue with the latest code from master?:
Are you using the demo app or your own custom app?:
Demo app. But using my own .mpd file which was made from .mp4 using mp4box
If custom app, can you reproduce the issue using our demo app?:
What browser and OS are you using?:
Browser : Chrome. OS: Windows 10
What are the manifest and license server URIs?:
What did you do?
I have a video file (.mp4) in my system in C drive i have converted it into .mpd using mp4box and i copy-pasted the .mpd file path in javascript var manifest = "" variable.
What did you expect to happen?
I expected that the video would play
What actually happened?
Error 1000 in console was the output.
Can you please tell me where and how to put these .mpd files so that they would get played on the browser
@hanumantha03 are you trying to load it with a file:// url? If so, that won't work.
The content needs to be hosted in order to play, but thankfully running a local web server will solve that. If you don't want to install a web server, python actually makes it really easy to run a web server and server any directory. Here's the documentation that I've used in the past to do that.
Yes I was using file:// url.
Thank you very much for the reply.
Can I use Nodejs to create a server and host the .mpd and dashinit.mp4 on the server?
I don't see any reason why that would not work. But you may run into some CORS issues if you are hosting the content from a different domain than the site (i.e. you host the content but use our hosted demo page). Normally I'll build the demo page and host the demo page and content locally when I am testing to ensure that I don't run into an CORS issues.
Actually I want to test it locally first.
was it easy when you were working with python web server?
and how did you host your media files on the python web server?
Yup. Just run python -m SimpleHTTPServer 8000 in a directory that contains both the content and the demo. Then you should be able to go to localhost:8000 and browser until you find the demo.
when I do that what should I assign in manifest variable?
I am assigning like this var manifestUrl = http://localhost:8000/samplevideo/sample1.mpd.
whole project is in shakaPlayer folder and in that itself I have kept the content.
is it correct?
thank you vaage it is working!!
If I want to play N number of videos, do I have to create N number of javascript files for them?
or can I create one common xml file for all the .mpd files?
For N videos, you would need N MPD files. But you can easily create one HTML & JS page with N video elements and N instances of Shaka Player controlling them.
Does that help?
I am able to play .mpd file but i need thumbnail for my video......How can I create a thumbnail for newly created .mpd file????
I mean as we see in you tube videos while hovering mouse on video streaming line, some pictorial scenes appear, how can we do it?
How can i add and play subscript along with the video and subscript should be highlighted as video progress?
How can we achieve video fragmentation and text extraction?
@joeyparrish @vaage @johan please help...................
@shabab11 Since your new question strays beyond the scope of the original topic, could you please open a new issue for it. This will make it easier to others to find solutions to similar problems and will make it easier on us to track issues.
Creating a thumbnail for your content is also beyond the scope of what Shaka Player offers. You may want to do a search for "ffmpeg thumbnail". Here's a link that may help: https://superuser.com/questions/477340/how-to-create-a-thumbnail-from-the-middle-of-a-video-with-ffmpeg
thanks @joeyparrish that is helpful...........it will be very much appreciated if u can give some insight on How can i add and play subscript along with the video and subscript should be highlighted as video progress?
@vaage sure i will open a new issue on that... thanks for the response
@shabab11, I'm sorry, but I don't understand your question. What do you mean by "subscript"? Do you mean "subtitles"?
@joeyparrish yes i mean to say "subtitles".....Thanks
@joeyparrish subtitle issue has been resolved........I am able to play video with subtitle without any error 馃 .............can u confirm that shaka only allow .vtt format subtitle because .txt and .srt was not playing in my case. Also I need a download option for the video am playing, so that user can download the video as well........ can u give some insight on download feature by shaka please??
As far as I know, txt is not a web standard for subtitles.
SRT predates WebVTT, and VTT seems to be derived from SRT. SRT, however, has no standard character set or header, whereas WebVTT is always in UTF-8 and has a header.
So it would not be possible to support SRT without additional character set info and conversion routines. If you want to support SRT, you might be able to write a text parsing plugin for that, but my guess is that it would be much easier to convert your subs to VTT on the backend.
As for download, you can store content in a database for offline playback, but it's not the same as downloading the files to your filesystem. In general, web pages don't have access to your filesystem for playback. (At least not through standard APIs across browsers.)
We have an API for offline storage and playback, with a fairly detailed tutorial here:
https://shaka-player-demo.appspot.com/docs/api/tutorial-offline.html
Now that your original questions have been resolved (locally hosting content, plus subtitles), may we close this ticket? Please feel free to open a new one for further help with offline or for other issues. Thanks!
@joeyparrish thank you so much for your help and i am sorry for not creating a new issue..... I will create a new issue for rest of my queries.... Thank you once again. We can close this issue now :)
No problem. I'm glad we could help.
Most helpful comment
For
Nvideos, you would needNMPD files. But you can easily create one HTML & JS page withNvideo elements andNinstances of Shaka Player controlling them.Does that help?