Log in

View Full Version : Developing a video recorder from scratch


collenet
22nd March 2016, 20:23
ok i want to take this back to basics as i'm a complete newbie to video compression, streaming etc.

I have a h.264 video stream

I have a sensor which gives me the temperature

I want to overlay text of the temperature onto the video..BUT.. i dont want to compress them together. I want the temp to be contained as metadata within the container. The reason for this is because i want to be able to toggle the text overlay on/off on the player.

I then want to write that all to a circular 24 hr buffer file.

Any help?

I'm am just learning about all this so laymans terms would be helpful at this point.

kypec
23rd March 2016, 07:09
I'm not an expert on this either but your explanation of "temperature metadata overlay" seems like you could simply use text subtitles (SRT, ASS, SUB, TTXT) embedded or as a separate file with the main H264 stream. Any half-decent video player supports this solution.

collenet
23rd March 2016, 08:04
Hi thanks for the reply! I like the idea of embedding the text as subtitles, do you know of any good literature or links that would describe how this is done? I know how to write a regular .srt file, but i dont want the video and subtitles to be in different files. I want them to be part of the same stream. :)

minaust
24th March 2016, 15:59
Hi thanks for the reply! I like the idea of embedding the text as subtitles, do you know of any good literature or links that would describe how this is done? I know how to write a regular .srt file, but i dont want the video and subtitles to be in different files. I want them to be part of the same stream. :)Here's a plan - mux your h264 stream into any video container that suits you. Embed your temp data into a subtitle file. Any format that suits you. Download Media Player Classic Home Cinema (MPC-HC). Configure MPC-HC to display subtitles and to loop forever. The subtitle file must be named in such a manner that MPC-HC will know it's associated with the video.

The only thing left is to update the subtitle file in real time. MPC-HC will reload the subs in real time if they're updated. This is the simple solution.