mp4box.js | JavaScript version of GPAC 's MP4Box tool | Audio Utils library
kandi X-RAY | mp4box.js Summary
kandi X-RAY | mp4box.js Summary
JavaScript version of GPAC's MP4Box tool
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 mp4box.js
mp4box.js Key Features
mp4box.js Examples and Code Snippets
Community Discussions
Trending Discussions on mp4box.js
QUESTION
I'm using MediaSource
extension to play videos. However,MediaSource
only supports fragmented MP4 videos.
How can I convert a non-fragmented MP4 video into a fragmented MP4 video in JavaScript so that I can use MediaSource
to play the video?
MP4Box's isFragmented
boolean returns false
on non-fragmented videos:
ANSWER
Answered 2021-Jan-14 at 22:42You could use ffmpeg.wasm
, it's basically ffmpeg for the browser but with native performance. This way you could integrate the fragmentation into your front end which is what you are trying to do, if I understand correctly.
I am afraid I can't help you with the actual fragmentation part using ffmpeg, but this post discusses it for normal ffmpeg.
QUESTION
I want to find a npm package, or a tool for getting information such as mp4 video frame rate on the front end. Then introduce the npm package into the vue project. This tool should look like this. It gets the address of the video, and outputs information such as the frame rate of the video (this information must be present). The more other information, the better. I have found a map4box.js, "https://github.com/gpac/mp4box.js/". But I can't find the frame rate information I want on his official website. So I want to ask if anyone knows about this tool. It would be better if there is a demo code.thank you all.
...ANSWER
Answered 2021-Jan-13 at 14:34I would try doing it myself like shown in this Stackoverflow article. In my opinion an npm package would be overkill.
QUESTION
Base problem: display a H264 live stream in a browser.
Solution: let's just convert it to fragmented mp4 and load chunk-by-chunk via websocket (or XHR) into MSE.
Sounds too easy. But I want to do the fragmentation on client side with pure JS.
So I'm trying to use MP4Box.js. On its readme page it states: it has a demo: "A player that performs on-the-fly fragmentation".
That's the thing I need!
However the onSegment callbacks which should feed MSE are not called at all:
...ANSWER
Answered 2020-Feb-09 at 15:37The problem was using the nextBufferStart in a wrong way.
This should be the correct one:
QUESTION
I have a live stream of raw h264 (no container) coming from a remote webcam. I wanna stream it live in browser using DASH. DASH requires creating mpd file (and segmentation). I found tools (such as mp4box) that accomplish that in static files, but i'm struggling to find a solution for live streams. any suggestions - preferably using node.js modules?
Threads i have checked:
- mp4box - from one hand i saw this comment that states " You cannot feed MP4Box with some live content. You need to feed MP4Box -live with pre-segmented chunks." on the other hand there's a lot of people directing to this bitmovin tutorial which does implement a solution using mp4box. In the toturial they are using mp4box (which has a node.js api implementation) and x264 (which doesn't have node.js module? or is contained in ffmpeg/mp4box?)
- ngnix - ngnix has a module that support streaming to DASH using rtmp. for exemple in this toturial. I prefer not to go this path - as mention i'm trying to do it all in node.js.
Although i read couple of posts with similar problem, I couldn't find a suitable solution. Help would be much appreciated!
...ANSWER
Answered 2017-Apr-03 at 21:22The typical architecture is to send your live stream to a streaming server which will then do the heavy lifting to make the stream available to other devices, using streaming protocols such as HLS and DASH.
So the client devices connect to the server rather than to your browser.
This allows the video to be encoded and packaged to reach as many devices as possible with the server doing any transcoding necessary and potentially also creating different bit rate versions of your stream to allow for different network conditions, if you want to provide this level of service.
The typical structure is encoded stream (e.g. h.264 video), packaged into a container (e.g. mp4 fragmented) and delivered via a streaming protocol such as HLS or DASH.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mp4box.js
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