hls.js | JavaScript library that plays HLS | Video Utils library
kandi X-RAY | hls.js Summary
kandi X-RAY | hls.js Summary
HLS.js is a JavaScript library that implements an HTTP Live Streaming client. It relies on HTML5 video and MediaSource Extensions for playback. It works by transmuxing MPEG-2 Transport Stream and AAC/MP3 streams into ISO BMFF (MP4) fragments. Transmuxing is performed asynchronously using a Web Worker when available in the browser. HLS.js also supports HLS + fmp4, as announced during WWDC2016. HLS.js works directly on top of a standard HTML element. HLS.js is written in ECMAScript6 (*.js) and TypeScript (*.ts) (strongly typed superset of ES6), and transpiled in ECMAScript5 using Babel and the TypeScript compiler. Webpack is used to build the distro bundle and serve the local development environment.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of hls.js
hls.js Key Features
hls.js Examples and Code Snippets
Community Discussions
Trending Discussions on hls.js
QUESTION
So I have a small website that shows different streams from web cameras around the city. (ex: https://camstream.alteco.lv:8443/live/camera1.m3u8). The stream can be viewed here: https://camstream.alteco.lv/camera/76d4b7f895df
This is a simple page with just the video player trying to play the stream using hls.js where it can be used and native tag for iOS devices.
All was working well until iOS 15 rolled out which broke the streams, so they are not viewable anymore. It simply shows that it's loading but nothing happens. Interestingly enough, that if I try to open the video in full screen and try seeking, the video instantly shows up. I also checked the incoming .m3u8 and .ts files using Inspect Element and everything seems to be fine.
At first, I thought that the issue is with the stream itself, but that doesn't seem to be the case, as I've tried all kinds of different options and profiles (baseline, main, high) but nothing changes, so it almost feels like a bug with the safari video player, but other streams from different sites I've found work fine. I've also tested the stream using the VLC app on iPhone and it works fine there. It only doesn't work on Safari.
I'm using nginx with the nginx-rtmp module to server the stream to clients.
...ANSWER
Answered 2022-Jan-31 at 22:12In the end I couldn't solve the problem with nginx-rtmp module and I simply switched to Node-Media-Server https://github.com/illuspas/Node-Media-Server
With this, the streams work great on all iOS versions
QUESTION
I have a .mov file which I run through ffmpeg
to create HLS segments / chunks. However, when I playback the HLS video it is too bright.
For a sanity check, I ran the same .mov video file through the FlowPlayer processing pipeline and the results were the same, the output video is too bright!
I have a number of videos. Most do not have this problem but some (and only some) of the .mov files exhibit this issue.
A broken video stream reports (see below for full output):
...ANSWER
Answered 2022-Jan-04 at 14:38caniuse.com explains that:
The High Efficiency Video Coding (HEVC) compression standard is a video compression format intended to succeed H.264
and further reveals that browser support for HEVC is currently very poor.
@Gyan comments that:
Your source video is HDR. You'll have to tonemap it to SDR.
Now I assume @Gyan knows it HDR based on the fact that its using HEVC. This article explains HDR (High Dynamic Range) and talks in detail how it impacts brightness, color and contrast.
Finally, this article explains that HDR looks bad - e.g. brightness, contrast and color issues - on devices that do not support HDR. Thankfully it also gives an ffmpeg
fix by using this filter:
QUESTION
I have three HTML5 media tags. One video and two audios. I stream them by HLS. I have the following code for the HLS setup.
The audios are good on major browsers except Safari. Audios are choppy for Safari on both macOS and iOS. I wonder if I'm missing something setting up HLS?
...ANSWER
Answered 2021-Nov-15 at 04:54I had three HTML media tags, one video and two audios:
QUESTION
I have:
...ANSWER
Answered 2021-Nov-09 at 14:01As pointed out by @DDomen , what I didn't understand was the fact that HTML5 element
play/pause/stop
methods are still valid with AudioContext
:
Note: As a consequence of calling createMediaElementSource(), audio playback from the HTMLMediaElement will be re-routed into the processing graph of the AudioContext. So playing/pausing the media can still be done through the media element API and the player controls.
QUESTION
I'm rather new to backend stuff, so please excuse, if my question is trivial.
For an Intranet project, I want to present a video element in a webpage (React, HLS.js Player).
The video sources are mpeg-ts streams delivered as udp multicast.
A small node.js / express server should handle the ffmpeg commands, to transcode the multicast to hls to display them in a browser.
Problem is the Output:
The output is emitted on stderr... even the process is working as expected.
Here is the respective code I wrote for transcoding so far:
ANSWER
Answered 2021-Sep-05 at 10:19You don't need to worry about that output if it works as it should.
Using spawn
you've created a wrapper around a specific process, the output that comes through stream.stderr
it's triggered by a warn/error
of the inherited process, a warn
is not something to be concerned off, especially if your app behaves correctly.
I've put below a simple demo on how to trigger the warn
& error
so you can see more clearly what happens:
index.js
QUESTION
So I have managed to inject hls.js to work with nuxtjs $root element and this
I did so doing it like this (hls.client.js):
...ANSWER
Answered 2021-Oct-28 at 14:39Replace your functions like
QUESTION
I'm trying to convert some videos (in the different formats, e.g., mp4, mkv, avi) with multiple audio streams to HLS with only one audio. I've tried different solutions with ffmpeg but non of them seem to be ideal.
For example ffmpeg -i in.mkv -codec: copy -f hls out.m3u8
from this gist works only if in.mkv
has one audio stream (at least this is my understanding).
I've then tried:
...ANSWER
Answered 2021-Oct-05 at 16:28How to convert a video to HLS with only one selected audio stream?
Most basic command:
QUESTION
I am serving my hls videos on S3 with Cloudfront and play them with hls.js library
ProblemSometimes I am getting CORS errors, the weird part is if I disable cache in the browser, it's working fine, but when it's use the cached version it returns the CORS error
...ANSWER
Answered 2021-Sep-16 at 13:10I found the solution for this issue, it's only happening for Chromium based browsers, and to fix this issue you should send the vary header in non CORS requests as well.
in AWS you can use Lambda functions to do it, here is the example: https://stackoverflow.com/a/57189635/3970050
Chromium issue: https://bugs.chromium.org/p/chromium/issues/detail?id=409090
AWS issue: https://forums.aws.amazon.com/thread.jspa?threadID=342401&tstart=0
QUESTION
Although WebRTC is meant for conference calls, it's possible to capture a MediaStream
and use that as a source for an RTCPeerConnection
. As it happens, this could be a solution to a problem I'm facing: displaying a live-stream in a WebGL app that doesn't support them.
(The idea is to use a library like HLS.js to handle assembling and remuxing the live-stream, and then stream that video into my WebGL app. The app's built in Unity, the game engine, which has introduced a package for WebRTC, so I'd be able to display that.)
According to the docs, a server is required to act as a middleman between clients. From what I understood, however, this is essentially to help them find each other and agree to connect over a P2P network. Since the two apps—the WebGL app and a Node app/JS script—live on the same client, even the same browser window, maybe I could omit the middelman and connect directly?
Unfortunately, I haven't been able to find anything regarding this method—probably because it's such an unusual use-case. Is it possible? If so, is it feasible, and how might it be done?
...ANSWER
Answered 2021-Jul-02 at 00:59If I understood your question correctly, you want to achieve WebRTC connection without having an actual signaling server.
WebRTC itself does not care how you provide it with Offer, Answer and Ice Candidates, but I don't see a "normal" way of exchanging this information without using a signaling server.
QUESTION
I've got this code and it works with the direct links. I've even got the parser working, so it pulls the free2viewtv list, however when i click on one of the links created using the parser, it doesnt work..
However if i click on 247 Retro TV, that works perfectly, i know thats due to the 247 Retro TV being the direct link.
But for the life of me, i just cannot see what is going wrong with
...ANSWER
Answered 2021-Jun-22 at 16:50You need to put the href value in quote marks and echo the value with PHP (just like you echo other values) e.g.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install hls.js
Build all flavors (suitable for prod-mode/CI):. Build and watch (customized dev setups where you'll want to host through another server than webpacks' - for example in a sub-module/project).
AudioStreamController
AudioTrackController
CuesInterface
EMEController
SubtitleStreamController
SubtitleTrackController
TimelineController
CmcdController
Prepackaged builds are included with each release. Or install the hls.js as a dependency of your project:.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page