What does Shaka player do that the <video> tag alone doesn't do? - html5-video

As I understand it, modern browsers have progressed to the point where a <video> tag can play an HLS or MPEG-DASH stream with no JavaScript.
Shaka Player (https://github.com/google/shaka-player) seems to be a JS library for... doing what the <video> tag already does. And yet it's actively maintained.
What does Shaka provide that <video> doesn't? When/why would I use it?

As I understand it, modern browsers have progressed to the point where a tag can play an HLS or MPEG-DASH stream with no JavaScript.
Nope, that's not really the case. Safari supports HLS natively, but that's about it.
JavaScript libraries for DASH and HLS use MediaSource Extensions (MSE) to push data to the browser's codec handling, meaning the manifests/playlists and segments can be fetched in whatever way the script wants. While more complex, this is better for everyone as we can now use whatever distribution protocol/method we want without a years-long process of browser standardization.

Related

Play .m3u8 video in the react native video

I am playing HLS streaming in the react native using react-native-video and it is working fine. And I want to know that can I play .m3u8 video from Local storage of mobile. Like I have downloaded m3u8 stream in the mobile storage and then I want to play it from the app. So how can I play it. Please let me know if there is anyway to play it from mobile storage in react-native-video.
Also I want to know if there is any good way to download m3u8 streaming in the mobile.
OK... so:
The original answer suggested to use this library in order to support HLS videos
It's easy to see that this library is at the end of its life and will be deprecated and replaced soon by a newer library
When I wrote in my comment that this question is seems like a duplicate, I meant that the solution suggested is framework-agnostic (e.g. - it's supports all frameworks that let you include external JS module which is practically all platforms). That is also why I didn't mark this question as duplicate, despite the similarity.
In short: you may use this solution in your project and probably end up with a little react component for a video element to wrap all logic in a single re-usable unit. To get this right - I suggest you take a look at video.js react guidelines and use the sample provided there as a base to your component
Happy development ya all! 🤠

video/mp2t browser live streaming support

Is there any way we could live stream "video/mp2t" content in the browser? I'm building a live stream app where some urls don't have any mimetype specified but the content is "video/mp2t". I've tried to use the major html 5 players: jwplayer, shaka-player, video.js, and none of them seem to support this kind of content out of the box. I've read that might be possible to transmux on the fly to mp4, do you guys know any example or some guidelines?
Android and ios seem to support this but the browser not, why is that? Do you think it's something to be incorporated in the future?
Thanks!
I've read that might be possible to transmux on the fly to mp4
Yes, you can write the code yourself, or base it on a another library like mux.js. But as you said, nothing does this out of the box.
Android and ios seem to support this but the browser not, why is that?
There are dozens or hundreds of container formats. Supporting them all would be ridiculous. Different companies, and different standard bodies make different decisions on what they think their users will require.
Do you think it's something to be incorporated in the future?
No, I don't.

Can I sync multiple live radio streams with video?

Is it possible to sync multiple live radio streams to a pre-recorded video simultaneously and vary the volume at defined time-indexes throughout? Ultimately for an embedded video player.
If so, what tools/programming languages would be best suited for doing this?
I've looked at Gstreamer, WebChimera and ffmpeg but am unsure which route to go down.
This can be done with WebChimera, as it is open source and extremely flexible.
The best possible implementation of this is in QML by modifying the .qml files from WebChimera Player directly with any text editor.
The second best implementation of this is in JavaScript with the Player JS API.
The difference between these two methods would firstly be resource consumption.
The second method that would use only JavaScript would require adding one <object> tag for the video, and one more for each audio file you need to play. So for every media source you add to the page, you will need to call a new instance of the plugin.
While the first method made only in QML (mostly knowing JavaScript would be needed here too, as that handles the logic part behind QML), would load all your media sources in one plugin instance, with multiple VlcVideoSurface components that each has it's own Plugin QML API.
The biggest problem I can foresee for what you want to do is the buffering state, as all media sources need to be paused as soon as one video/audio starts buffering. Synchronizing them by time should not be to difficult though.
WebChimera Wiki is a great place to start, it has lots of demos and examples. And at WebChimera Questions we've helped developers modify WebChimera Player to suit even the craziest of needs. :)

Embedded ASS subtitle track in streamed video?

We'd like to build a small specialized clone of the ill-fated popcorn-time project, that is to say a node-webkit frontend for peerflix. The videos we'd like to play are mkv files that have embedded ASS subtitle tracks, and we can't seem to get the embedded subtitles to show up: while VLC nicely shows them, html5 video players in webkit-based things don't, not even in Google Chrome (so it's not a matter of Chromium's reduced codec support).
Now, I'm a bit out of our depths here, I don't really know much about these things, but it seems to me the media engine underneath webkit just ignores the ASS subtitle track here. Is it because it's ASS? Is it a matter of codecs somehow? Or is it, after all, a html5 thing? Now, the html5 video "living standard" mentions that "captions can be provided, either embedded in the video stream or as external files using the track element" - so the feature is at least planned, but I do realize that implementation is lacking. However, given that node-webkit uses ffmpeg as the underlying engine, it seems strange to me that the subtitles are not picked up at all.
Could someone more knowledgeable please advise us the problem? Also, is there anything we could do about it?
Extracting the subtitles beforehand is not an option, though I have been playing with the idea of extracting the subtitles on the fly, and feeding that stream back to the player - I had some modest success with this, and it looks like it could be done with some effort, but I'm really out of my depth here, and the whole idea is pretty contrived anyway.
However, I find it improbable that nobody has run into this problem before, hence this question: is there any way to show embedded (ASS) subtitle tracks in a streamed video in node-webkit?
Not sure if this would help but according to this page node-webkit doesn't ship with codec for patented media formats. They do have a few suggestions on the page, one of which is to compile your own node-webkit.
You could try using Popcorn Time's ffmpegsumo file which is what I used when I needed mp3 support and Chrome's version didn't work. Although, I don't know if that supports ASS subtitle format(considering its use, I would think it has to).
Note: I would have commented this answer but unfortunately I don't have commenting privileges yet. A couple of upvotes sure would be nice ;)

Is DRM supported in HTML5 audio/video? [duplicate]

This question already has answers here:
Is there a way to use DRM on HTML5 video?
(7 answers)
Closed 8 years ago.
Does HTML5 audio/video support OMA DRM or any third party DRM?
No, it doesn't.
At least, not yet. But given the trouble we're having getting browser manufacturers to even agree on a standard format I can only imagine how hard it would be to get them all to support a standard DRM (or even to support it at all!)
It does now.
https://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html
Here is an example.
http://www.html5rocks.com/en/tutorials/eme/basics/
This is the best page that I could find on current browser support.
http://www.jwplayer.com/html5/mediasource/
At the time of writing this, EME is supported in
IE11 in Win8.1
Chrome (Desktop and mobile)
Safari 8 in OSX Yosemite
Let's think about what it is that you're trying to do.
HTML5 sends information over the HTTP protocol. This includes embedded flash videos, HTML5 {video} tags (if ever finished!), pictures, lyrics, text, links, and javascript.
All of these components are always transmitted in plaintext. If HTML5 were to include any form of protection on these elements (i.e. tags that indicate that you can't copy?... {drm}{/drm}, etc), it is still up to any software interpreting this HTTP data, to decide whether or not to enforce it.
You can look at a video tag such as youtube or dailymotion - the source it references is always accessible at a standard HTTP address - with or without DRM, the means of downloading this video are within everybody's reach!
This implies that the protocol, by design, does not allow for copy-protection.
For future reference, ask yourself "Is the data (and how it is operated upon) ever in the customer's hands?". If the answer is 'yes', DRM does not make sense to apply.