hls.js | JavaScript library that plays HLS | Video Utils library

 by   video-dev TypeScript Version: 1.5.8-0.canary.10049 License: Non-SPDX

kandi X-RAY | hls.js Summary

kandi X-RAY | hls.js Summary

hls.js is a TypeScript library typically used in Telecommunications, Media, Media, Entertainment, Video, Video Utils applications. hls.js has no bugs, it has no vulnerabilities and it has medium support. However hls.js has a Non-SPDX License. You can download it from GitHub.

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

            kandi-support Support

              hls.js has a medium active ecosystem.
              It has 12981 star(s) with 2479 fork(s). There are 313 watchers for this library.
              There were 10 major release(s) in the last 6 months.
              There are 164 open issues and 2404 have been closed. On average issues are closed in 70 days. There are 17 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of hls.js is 1.5.8-0.canary.10049

            kandi-Quality Quality

              hls.js has 0 bugs and 0 code smells.

            kandi-Security Security

              hls.js has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              hls.js code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              hls.js has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              hls.js releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of hls.js
            Get all kandi verified functions for this library.

            hls.js Key Features

            No Key Features are available at this moment for hls.js.

            hls.js Examples and Code Snippets

            No Code Snippets are available at this moment for hls.js.

            Community Discussions

            QUESTION

            Why is my HLS stream infinitely loading on iOS 15 safari but works fine on iOS 14?
            Asked 2022-Feb-28 at 17:16

            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:12

            In 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

            Source https://stackoverflow.com/questions/70592081

            QUESTION

            ffmpeg why is output video contrast / brightness too bright?
            Asked 2022-Jan-04 at 14:38

            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:38

            caniuse.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:

            Source https://stackoverflow.com/questions/70544342

            QUESTION

            HLS audio is choppy on Safary, but good on other major browsers
            Asked 2021-Nov-15 at 04:54

            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:54

            I had three HTML media tags, one video and two audios:

            Source https://stackoverflow.com/questions/69848818

            QUESTION

            noteOn is not a function
            Asked 2021-Nov-09 at 14:01

            I have:

            ...

            ANSWER

            Answered 2021-Nov-09 at 14:01

            As 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.

            Source https://stackoverflow.com/questions/69897876

            QUESTION

            node.js ffmpeg spawn child_process unexpected data output
            Asked 2021-Nov-01 at 00:43


            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:19

            You 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

            Source https://stackoverflow.com/questions/69016938

            QUESTION

            Nuxt plugin cannot access Vue's 'this' instance in function blocks
            Asked 2021-Oct-28 at 15:32

            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:39

            Replace your functions like

            Source https://stackoverflow.com/questions/69752158

            QUESTION

            How to convert video to hls with selected audio streams?
            Asked 2021-Oct-05 at 16:28

            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:28

            How to convert a video to HLS with only one selected audio stream?

            Most basic command:

            Source https://stackoverflow.com/questions/69446738

            QUESTION

            Getting CORS error on CloudFront + hls.js
            Asked 2021-Sep-16 at 13:10
            Scenario

            I am serving my hls videos on S3 with Cloudfront and play them with hls.js library

            Problem

            Sometimes 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:10

            I 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

            Source https://stackoverflow.com/questions/69199174

            QUESTION

            Can a WebRTC connection be established between two apps on the same client and window?
            Asked 2021-Jul-02 at 19:04

            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:59

            If 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.

            Source https://stackoverflow.com/questions/68214735

            QUESTION

            Not Playing indirect link, however direct link is working
            Asked 2021-Jun-22 at 16:50

            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:50

            You need to put the href value in quote marks and echo the value with PHP (just like you echo other values) e.g.

            Source https://stackoverflow.com/questions/68086805

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install hls.js

            First, checkout the repository and install the required dependencies. The dev server will host files on port 8000. Once started, the demo can be found running at http://localhost:8000/demo/. Before submitting a PR, please see our contribution guidelines. Join the discussion on Slack via video-dev.org in #hlsjs for updates and questions about development.
            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

            For details on the HLS format and these tags' meanings, see https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08. The following properties are added to their respective variants' attribute list but are not implemented in their selection and playback. The following tags are added to their respective fragment's attribute list but are not implemented in streaming and playback.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link