Questions tagged [media-source]

MediaSource JavaScript API extends the HTMLMediaElement to allow JavaScript to generate media streams for playback.

325 questions
8
votes
1 answer

How to download (or get as a blob) a MediaSource used for streaming HTML5 video?

I'm streaming a dynamically-generated MP4 into a webpage over a WebSocket. I assemble a MediaSource (https://developer.mozilla.org/en-US/docs/Web/API/MediaSource) as the fragments come in, use that for the HTML5 video element, and my video plays…
user2333829
  • 1,301
  • 1
  • 15
  • 25
8
votes
0 answers

How to use "segments" mode at SourceBuffer of MediaSource to render same result at Chomium, Chorme and Firefox?

Reference to my original question: How to use Blob URL, MediaSource or other methods to play concatenated Blobs of media fragments? In lieu of the potential for deprecation of the "sequence" mode for multiple tracks, which the current code is using…
guest271314
  • 1
  • 15
  • 104
  • 177
7
votes
1 answer

TypeError: Failed to execute 'appendBuffer' on 'SourceBuffer': No function was found that matched the signature provided

Edit: To help illustrate the error I keep getting I have created a CodePen of the issue I am seeing. Open up the console and you will see the error. [https://codepen.io/FifthCloud/pen/eYpqJLN] I wanted to design my own streaming camera service in my…
Fifth Cloud
  • 110
  • 1
  • 9
6
votes
2 answers

How to use Media Source Extension (MSE) low-latency mode

I read about MSE has this low-latency mode where provides zero-buffering for decoding. Regardless of the unstable performance this might bring, it should theoretically offers lower latency when used in real-time streaming. Does anybody know what…
Zip
  • 809
  • 2
  • 14
  • 30
6
votes
1 answer

Does a track run in a fragmented MP4 have to start with a key frame?

I'm ingesting an RTMP stream and converting it to a fragmented MP4 file in JavaScript. It took a week of work but I'm almost finished with this task. I'm generating a valid ftyp atom, moov atom, and moof atom and the first frame of the video…
stevendesu
  • 15,753
  • 22
  • 105
  • 182
6
votes
1 answer

Load MPEG-DASH Segments Non-Sequentially for Seeking

Building an MPEG-DASH player in JavaScript. However, I'm having an issue implementing seek, and there doesn't appear to be much reference material out there in how to handle it with MSE and the corresponding Source Buffer object. As far as I can…
Chris Calo
  • 346
  • 4
  • 14
6
votes
0 answers

MediaSource randomly stops video

I am working on a project where I want to getUserMedia -> MediaRecorder -> socketIO -> MediaSource appendbuffer I got it to work, however after a few seconds it randomly stops. I know about WebRTC, but in the project I am working on it's based on…
Steve
  • 337
  • 2
  • 10
6
votes
1 answer

Smooth representation change using Media Source API

I am currently working on DASH player using JavaScript and MediaSource API Streaming is working fine but I am stuck with changing representation. Probably the most bruteforced way to change representation during playback is about replacing
skwarek
  • 63
  • 1
  • 3
6
votes
0 answers

mediaSource API not working on Chrome but works smoothly on Firefox

I am trying to stream a WebM format video being generated using gstreamer and individual frame being sent over websockets. A typical byte arrangement of webm file is like this (you may be already familiar with this). EBML (head size: 12 bytes, data:…
6
votes
2 answers

Media Source Extensions Not Working

I am trying to use the MediaSource API to append separate WebM videos to a single source. I found a Github project that was attempting the same thing, where a playlist of WebMs is loaded, and each one is appended as a SourceBuffer. But it was last…
Hugh Guiney
  • 1,309
  • 2
  • 19
  • 34
6
votes
3 answers

H264 video works using src attribute. Same video fails using the MediaSource API (Chromium)

http://www.youtube.com/html5 indicates that Google Chrome is compliant with MediaSource Extensions & H.264. I make a simple test checking that my video is supported by Chromium, using the
6
votes
2 answers

Could not append segments by Media Source API, get "InvalidStateError : An attempt was made to use an object that is not, or is no longer, usable

I use following sample program to append media files, but get "Uncaught InvalidStateError : An attempt was made to use an object that is not, or is no longer, usable" error at the first instant it hits code…
User5791
  • 61
  • 1
  • 6
5
votes
1 answer

Is there a way to send video data from a video tag/MediaStream to an OffscreenCanvas?

Basically I want to be able to perform effectively this same code: const video = document.getElementById('video'); const canvas = document.getElementById('canvas'); const context = canvas.getContext('2d'); const draw = () => { …
Jacob Greenway
  • 461
  • 2
  • 8
  • 15
5
votes
2 answers

If Blob URLs are immutable, how does Media Source Extension API use them to stream videos?

Let's start with an example: You visit youtube.com, which uses Media Source Extension (MSE) with HTML5 for certain devices. MSE injects the
user3667125
  • 725
  • 1
  • 7
  • 17
5
votes
1 answer

Different between fragmented mp4 files generated by ffmpeg and by code

Currently I have a problem when generating fragmented MP4 file from code using libavformat. My file can be played using VLC, but can't be streamed (via WebSocket) and played (via MediaSource) in (Chrome) browser. (I used this to test streaming…
dinhnguyen
  • 61
  • 2
  • 5
1 2
3
21 22