jsmpeg | MPEG1 Video Decoder in JavaScript | Video Utils library

 by   phoboslab JavaScript Version: v0.2 License: MIT

kandi X-RAY | jsmpeg Summary

kandi X-RAY | jsmpeg Summary

jsmpeg is a JavaScript library typically used in Telecommunications, Media, Media, Entertainment, Video, Video Utils applications. jsmpeg has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can install using 'npm i jspmeg-player' or download it from GitHub, npm.

Adding an audio stream to the MPEG-TS can sometimes introduce considerable latency. I especially found this to be a problem on linux using ALSA and V4L2 (using AVFoundation on macOS worked just fine). However, there is a simple workaround: just run two instances of ffmpeg in parallel. One for audio, one for video. Send both outputs to the same Websocket relay. Thanks to the simplicity of the MPEG-TS format, proper "muxing" of the two streams happens automatically in the relay. In my tests, USB Webcams introduce about ~180ms of latency and there seems to be nothing we can do about it. The Raspberry Pi however has a camera module that provides lower latency video capture. To capture webcam input on Windows or macOS using ffmpeg, see the ffmpeg Capture/Webcam Wiki.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              jsmpeg has a medium active ecosystem.
              It has 6072 star(s) with 1440 fork(s). There are 220 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 171 open issues and 192 have been closed. On average issues are closed in 62 days. There are 11 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of jsmpeg is v0.2

            kandi-Quality Quality

              jsmpeg has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              jsmpeg is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              jsmpeg releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.
              jsmpeg saves you 7 person hours of effort in developing the same functionality from scratch.
              It has 21 lines of code, 0 functions and 20 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            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 jsmpeg
            Get all kandi verified functions for this library.

            jsmpeg Key Features

            No Key Features are available at this moment for jsmpeg.

            jsmpeg Examples and Code Snippets

            No Code Snippets are available at this moment for jsmpeg.

            Community Discussions

            QUESTION

            Import {jsmpeg} from 'jsmpeg-player'
            Asked 2021-Mar-16 at 13:25

            do you have any idea why import is not working in Angular?

            ERROR:

            Error: src/app/customers/customers.component.ts:4:22 - error TS7016: Could not find a declaration file for module 'jsmpeg-player'. 'C:/Users/adabi/OneDrive/Bureau/Angular/Aximum/angular11/node_modules/jsmpeg-player/build/jsmpeg-player.js' implicitly has an 'any' type. Try npm i --save-dev @types/jsmpeg-player if it exists or add a new declaration (.d.ts) file containing declare module 'jsmpeg-player';

            4 import {jsmpeg} from 'jsmpeg-player';

            ...

            ANSWER

            Answered 2021-Mar-16 at 12:29

            QUESTION

            Nodejs 'fs' methods running asynchronously
            Asked 2020-Jan-28 at 02:29

            Using the fs package in Node.js, I am getting some unexpected results I am hoping to have some light shed on here.

            I have the following code:

            ...

            ANSWER

            Answered 2020-Jan-28 at 02:29

            Node's fs writeFile and readFile are asynchronous functions. If you want synchronous functions, you should be using fs.writeFileSync and fs.readFileSync.

            Note that this means you will have to remove the existing callback functions you have hanging off writeFile and readFile.

            You can read up on the difference between the sync and non-sync functions in the Node.js docs here: https://nodejs.org/api/fs.html#fs_fs_readfilesync_path_options

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install jsmpeg

            For this example, ffmpeg and the WebSocket relay run on the same system. This allows you to view the stream in your local network, but not on the public internet. This example assumes that your webcam is compatible with Video4Linux2 and appears as /dev/video0 in the filesystem. Most USB webcams support the UVC standard and should work just fine. The onboard Raspberry Camera can be made available as V4L2 device by loading a kernel module: sudo modprobe bcm2835-v4l2. You should now see a live webcam image in your browser.
            Install ffmpeg (See How to install ffmpeg on Debian / Raspbian). Using ffmpeg, we can capture the webcam video & audio and encode it into MPEG1/MP2.
            Install Node.js and npm (See Installing Node.js on Debian and Ubuntu based Linux distributions for newer versions). The Websocket relay is written in Node.js
            Install http-server. We will use this to serve the static files (view-stream.html, jsmpeg.min.js), so that we can view the website with the video in our browser. Any other webserver would work as well (nginx, apache, etc.): sudo npm -g install http-server
            Install git and clone this repository (or just download it as ZIP and unpack)
            Change into the jsmpeg/ directory cd jsmpeg/
            Install the Node.js Websocket Library: npm install ws
            Start the Websocket relay. Provide a password and a port for the incomming HTTP video stream and a Websocket port that we can connect to in the browser: node websocket-relay.js supersecret 8081 8082
            In a new terminal window (still in the jsmpeg/ directory, start the http-server so we can serve the view-stream.html to the browser: http-server
            Open the streaming website in your browser. The http-server will tell you the ip (usually 192.168.[...]) and port (usually 8080) where it's running on: http://192.168.[...]:8080/view-stream.html
            In a third terminal window, start ffmpeg to capture the webcam video and send it to the Websocket relay. Provide the password and port (from step 7) in the destination URL:

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

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

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/phoboslab/jsmpeg.git

          • CLI

            gh repo clone phoboslab/jsmpeg

          • sshUrl

            git@github.com:phoboslab/jsmpeg.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link