lplassman / V4L2-to-NDI

A video input (V4L2) to NDI converter that works with Raspberry Pi (32-bit and 64-bit), and Intel/AMD CPUs
MIT License
73 stars 15 forks source link

Timestamping frames #10

Closed glenne closed 1 year ago

glenne commented 1 year ago

I would like to add a visible timestamp to every frame sent to NDI. Can you provide general pointers on mods needed to this utility to achieve that? If I can create the pixels to represent the timestamp, how would you suggest injecting them>

lplassman commented 1 year ago

Inside the process_image function is where you would want to inject your timestamp. You would have to replace the actual image frame pixels with the pixels from your timestamp in the frame buffer.

glenne commented 1 year ago

Thanks! I will try that. My current issue is my ndi stream to OBS is stuttering. I'm using an hdmi2csi input. It runs for a second, stalls, and then resumes. Any tips for that?

G

On Tue, Jun 27, 2023, 8:46 AM Luke Plassman @.***> wrote:

Inside the process_image function is where you would want to inject your timestamp. You would have to replace the actual image frame pixels with the pixels from your timestamp in the frame buffer.

— Reply to this email directly, view it on GitHub https://github.com/lplassman/V4L2-to-NDI/issues/10#issuecomment-1609785924, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAITQ6FGEQLDBHY3YWBW5UDXNL55TANCNFSM6AAAAAAZVEGPT4 . You are receiving this because you authored the thread.Message ID: @.***>

lplassman commented 1 year ago

This could be any multitude of things, but I would suggest checking that the input frame rate and resolution into your hdmi2csi adapter match the given command line parameters. Also, it could be lack of power on the Raspberry Pi resulting in underclocking. I would check the network speed to ensure it is full gigabit between the Raspberry Pi and the machine running OBS. It could also be an issue with OBS - try the NDI Studio monitor application and see if the issue persists there.

glenne commented 1 year ago

Your guess was right on. My source was not sending 1080p/30 like I thought and was more like 1080p/15. Getting the properties dialed in allowed the video to operate nicely.