ginomang
Posts: 3
Joined: Tue Jun 25, 2019 2:52 am

[Advice needed] live HDMI in + dynamic text => HDMI out, w/textual overlay

Tue Jun 25, 2019 3:05 am

Hello world,
Here looking for some pointers on a project I’m supposed to be working on for my buddy’s father. The details are pretty straightforward, but I’m specifically having trouble coming up with a setup that will support the project requirements.

The man's company produces hardware used for precision timing applications. The goal of the project is to overlay live timestamp data, sourced from one of their boxes, on top of an hdmi video feed, and output the result to a display.
- the ‘clock' has a cat5 port which can be used to query for current timestamp data (the overlaid timestamp string should show the most recent timestamp from the box)
- there needs to be an interface by which a user can configure the size and location of the overlaid string in the output video frame
- overall latency < 1s (ideally); latency here refers to the delay from receipt of the input data (video/current timestamp) until the composed frame is visualized on screen
- it’d be great to be able to switch between various streams as the input video

My original thought was to use a raspberry pi 3 to do the following:
- setup a node environment that runs an express server
- expose some api for allowing a user to manage attributes (x, y, height, width, color, background color, etc.) of the overlaid time-string
- host a basic webpage using plain html (or some suitable front-end framework) that offers some interface for leveraging the api mentioned above ^
- run an asynchronous loop that is constantly querying the external source for the current timestamp which gets stored in a variable
- use the ffmpeg node package to overlay the textual information on the input video stream

Given all that background; my main question is:
Does this seem like a reasonable approach to anyone here who might know what the hell they’re doing a bit better than I? At this point I’m not even sure a raspberry pi is a viable solution here, since:
- the pi has no hdmi input port
- there would be video quality limitations in doing an hdmi to usb conversion, which would also not support capturing audio from the hdmi

Is there a way to have the pi capture the hdmi input via ethernet connection? Would a hub allow me to both capture the hdmi input as well as query the ‘clock’?

My specialty is application software, but when it comes to hardware setup, and/or lower level config work, I’m a total newb.

Thanks for any and all thoughts, tips, pointers, prayers, and recommendations.

Cheers :)
Last edited by ginomang on Tue Jun 25, 2019 6:00 am, edited 1 time in total.

ghans
Posts: 7863
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: [Advice needed] live HDMI in + dynamic text => HDMI out, w/textual overlay

Tue Jun 25, 2019 5:08 am

How much latency is acceptable to your buddys father ? 400 ms ? 100 ms ? Less ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

ginomang
Posts: 3
Joined: Tue Jun 25, 2019 2:52 am

Re: [Advice needed] live HDMI in + dynamic text => HDMI out, w/textual overlay

Tue Jun 25, 2019 6:00 am

ghans wrote:
Tue Jun 25, 2019 5:08 am
How much latency is acceptable to your buddys father ? 400 ms ? 100 ms ? Less ?

ghans
Hey there, thanks for your reply! latency < 1000ms is ideal

User avatar
mihalop
Posts: 28
Joined: Thu Sep 03, 2015 7:04 am
Contact: Website

Re: [Advice needed] live HDMI in + dynamic text => HDMI out, w/textual overlay

Fri Jul 05, 2019 9:38 am

At Yodeck (uses the RPi), we support HDMI-in through the Lenkeng LKV373A Sender. It is a pretty decent 1080p HDMI-to-IP streamer at just $35. You could use a couple of these to show different content. Right now, switching streams on Yodeck across multiple LKVs might take some time, you can test it. Alternatively, you can probably use an HDMI switcher and select which HDMI input to feed to the LKV unit.

The text overlay is easily implemented. We have the ability to upload a Custom Widget which is HTML-based (supporting overlays on top of vide and transparencies) and has read-access to the filesystem. You can write the required code to read the live data and store it in a /tmp/data.txt file and have the widget check the file every half a second.

Hope I helped.
Yodeck - Digital Signage on the Raspberry Pi
Free Raspberry Pi 3 Player for all screens on Annual Plan

drgeoff
Posts: 9356
Joined: Wed Jan 25, 2012 6:39 pm

Re: [Advice needed] live HDMI in + dynamic text => HDMI out, w/textual overlay

Mon Jul 08, 2019 8:41 pm

Non-compressed 1080p has a bit rate which exceeds what even a RPi4B can take through its ethernet port.

User avatar
mihalop
Posts: 28
Joined: Thu Sep 03, 2015 7:04 am
Contact: Website

Re: [Advice needed] live HDMI in + dynamic text => HDMI out, w/textual overlay

Mon Jul 08, 2019 8:45 pm

drgeoff wrote:
Mon Jul 08, 2019 8:41 pm
Non-compressed 1080p has a bit rate which exceeds what even a RPi4B can take through its ethernet port.
It is not uncompressed. The video stream is H.264 encoded, with a bitrate that can be set IIRC. Picture is pretty decent.
Yodeck - Digital Signage on the Raspberry Pi
Free Raspberry Pi 3 Player for all screens on Annual Plan

Return to “Graphics, sound and multimedia”