Send frame number over udp

Hi, we are developing a video encoding and streaming app, and we want the app that receives and plays the video, to get the frame number for each frame

we think about two solutions:

  1. get the PTS(wireshark knows it) and send a seperate “PTS to frame number” message

  2. inject the frame number into the transport stream as metadata

which way is easier to implement and how do we implement it?

by the way, our pipeline is as follows

filesrc location=fifo.h265 do-timestamp=true ! h265parse ! mpegtsmux alignment = 7 ! udpsink host=IP port=PORT

thanks for any help

You could store an SMPTE timecode in the H265 bitstream inside a SEI. For H264, h264parse would do that if it finds a GstVideoTimeCodeMeta on the buffers (which the timecodestamper element could provide). For H265 this is not implemented in h265parse (yet) and also not available in another way other than a custom implementation.