<p>I am currently working on a screen-sharing solution for an embedded system. Basically, I need to be able to see on my PC screen what happens on the device's display. I already have a solution that produces raw H264 frames which I can send over to the PC for presentation. I have experimented with the raw h264 stream format, but it does not allow me to detect the end of frame until the header for the next frame arrives. Since I only send frames in case anything is updated on the screen, there can be a substantial delay between separate frames. This means that the user will most likely see the one-before-last frame instead of the latest for an extended period of time.</p>

<p>I thought about using simple size prefix before each H264 frame, but such stream will be non-standard. For debugging ease (and user convenience) I would like to send stream that would be directly playable in major video player software (mplayer, vlc, etc.). Is there a simplistic but well-known video container format that is supported by major video players? It needs to be able to contain just a single H264 video stream (no audio or any other data, no further video streams). Ideally, I would like it to be simple enough to be able to implement the muxer myself without too much bother, as additional dependencies like ffmpeg are most unwelcome in the project.</p>

CC BY-SA 4.0
2019-10-26T20:08:01.747Z
For productive answers, the current and available A/V software stack on the device has to be known. Which AVC encoder are you using?
Gyan
CC BY-SA 4.0
2019-10-26T22:59:40.027Z
@Gyan My current solution uses libva (implementation of the VA API), and is roughly based on https://github.com/wayland-project/weston/blob/5.0/libweston/vaapi-recorder.c
j_kubik
<streaming><formats>
A simplistic video streaming container format
j_kubik
# A simplistic video streaming container format

(Asked by: username_0 on 2019-10-26)

I am currently working on a screen-sharing solution for an embedded system. Basically, I need to be able to see on my PC screen what happens on the device's display. I already have a solution that produces raw H264 frames which I can send over to the PC for presentation. I have experimented with the raw h264 stream format, but it does not allow me to detect the end of frame until the header for the next frame arrives. Since I only send frames in case anything is updated on the screen, there can be a substantial delay between separate frames. This means that the user will most likely see the one-before-last frame instead of the latest for an extended period of time.

I thought about using simple size prefix before each H264 frame, but such stream will be non-standard. For debugging ease (and user convenience) I would like to send stream that would be directly playable in major video player software (mplayer, vlc, etc.). Is there a simplistic but well-known video container format that is supported by major video players? It needs to be able to contain just a single H264 video stream (no audio or any other data, no further video streams). Ideally, I would like it to be simple enough to be able to implement the muxer myself without too much bother, as additional dependencies like ffmpeg are most unwelcome in the project.

**Tags:** streaming, formats

> **Comments:**
> **username_1**: For productive answers, the current and available A/V software stack on the device has to be known. Which AVC encoder are you using?  
> **username_0**: @username_1 My current solution uses libva (implementation of the VA API), and is roughly based on https://github.com/wayland-project/weston/blob/5.0/libweston/vaapi-recorder.c  

---

## 0 answers

