Questions tagged [fmp4]

Fragmented MP4 ... MP4 (.mov, .mp4) files organized to allow live streaming.

Ordinary, unfragmented, MP4 has separate "boxes" for media metadata and data. It's often necessary to random-access such files, often to near the end, to play them correctly. That doesn't work for live streaming: the end is unknown because it's still in the future.

Most players can play both ordinary and fragmented mp4.

More description here.

51 questions
1
vote
0 answers

Using MP4box.js and onSegment callback is not called no websocket

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". However the onSegment callbacks which should feed MSE are not called at all: const getVideo = async () => { const…
1
vote
0 answers

How to play and seek fragmented MP4 audio using MSE SourceBuffer?

I am trying for quite some time now to be able to play an audio track on Chrome, Firefox, Safari, etc. but I keep hitting brick walls. My problem is currently that I am just not able to seek within a fragmented MP4 (or MP3). At the moment I am…
Stefan Falk
  • 18,764
  • 34
  • 144
  • 286
1
vote
1 answer

Chromecast HLS: Unable to derive timescale

I'm trying to get fmp4 HLS playing back on a new Chromecast (3rd gen I believe, not Ultra). I've tried encoding the content with ffmpeg using both x264 and h264 libraries. The main profile initially gives me a codec not supported error, remove the…
Scott
  • 13
  • 3
1
vote
0 answers

How to fix EXT-X-MAP:URI in m3u8 when specifying absolute hls_fmp4_init_filename using ffmpeg?

Today I found this blog post teaching me about fragmented mp4s (fmp4s). Using the ffmpeg docs, I've made great progress. I run this: '/usr/bin/ffmpeg' '-y' '-i' '/myproject/storage/app/sample_media/2020-02-27/Sample Videos 5.mp4' \ '-c:v' 'libx264'…
Ryan
  • 17,332
  • 24
  • 141
  • 270
1
vote
0 answers

Firefox is not able to play my fragmented MP4 file

I'm serving this fragmented mp4 file which was created by ffmpeg. Here is the client side code: WebSocket and MSE demo
1
vote
0 answers

How to play a live fmp4 stream from web api result

I have a sample script I am working on that can receive an fmp4 stream or an mpd xml response from an HTTP server. I can retrieve the mpd data with requests.get and it comes back no worries. If I use requests.get with stream = True for the fmp4 the…
The Frog
  • 51
  • 4
1
vote
1 answer

Using MP4box.js and onSegment callback is not called

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…
Daniel
  • 1,453
  • 13
  • 33
1
vote
1 answer

Why fmp4 files can't decode the audio with VLC, but they can play normally with PotPlayer

I have an fmp4 file (using h264 and aac frame codes). When playing with VLC, only video has no audio, but the audio can be parsed with PotPlayer. The AAC format is ADTS.The screenshot of my fmp4 audio-related box is as follows
YuanDa.Yu
  • 87
  • 6
1
vote
1 answer

How does the VLC player calculate the total length of the timeline of the fmp4 file?

use VLC player to play fmp4 file, the player shows the total length of the timeline port is 0, but video can play normally.How does the player calculate the total length of the timeline of the fmp4 file? How should I modify the time parameter of…
YuanDa.Yu
  • 87
  • 6
1
vote
1 answer

A question about the first mdat box of the fmp4 file

The header of the first mdat box of the fmp4 file has a section of file description information data, is this section of information necessary? If not, will it affect the decoding of the fmp4 file?
YuanDa.Yu
  • 87
  • 6
1
vote
1 answer

about fmp4 encoding , how to fill the mdat box wit H264 frame?

I used C language to encode H264 frames (just have I/P frame) into fmp4 files. When I fill the mdat box, I don't know how to fill the frame data. Is (I/P)frame data filled directly? Do the first 4 bytes need to be filled with frame length? I tried…
YuanDa.Yu
  • 87
  • 6
1
vote
0 answers

HLS/fMP4 (CMAF) redundant/fallback (Primary/Backup) workflow on Apple Devices is not working

I'm trying to publish my HLS/fMP4 (CMAF) stream to Akamai with Primary/Backup workflow. When I tested with Shaka player, it works fine: Whenever publishing to Primary entry point stopped, player will properly switch to Backup stream and keep playing…
Aki24x
  • 998
  • 1
  • 11
  • 26
1
vote
1 answer

How h264 NAL units to be corectly sampled inside fragmented MP4

Having a stream of NAL units of types [5 [1]+]+, how to correctly reference them in samples field of trun box of frgmented mp4 so they would decode and present correctly, without stuttering? The main issue here is that not every time single NAL unit…
Alexander Tumin
  • 1,431
  • 3
  • 20
  • 30
1
vote
2 answers

FFmpeg memory leak in fragmented MP4

When using the FFmpeg console for saving an RTSP stream to a fragmented MP4 file I noticed there is a small memory leak. It leaks approx 3-4 MB per hour (when each frame is a fragment and 30 fps). The following command was used: ffmpeg.exe -i…
1
vote
1 answer

Exo Player Unity Plugin for Android for HLS Fragmented MP4 (fmp4)

I am trying to integrate the Google Exoplayer in Unity and I am a newbie in Unity. I worked with Easy Move Textures Plugin but it does not support HLS FMP4 and I want to develop the plugin. How should I proceed.??
Devesh Vyas
  • 111
  • 1
  • 6