Sync video frame on receive side with external data

420 views
Skip to first unread message

Yuri

unread,
Jun 19, 2021, 2:21:38 PM6/19/21
to discuss-webrtc
Hi folks, I'm looking for way to sync. video frame in receiver with external data using webrtc c++. Is any way to add frame identification on "sender side" and then identify it on "receiver side"? (example: sync. subtitles for video stream)

I tried using:
- webrtc::VideoFrame::set_timestamp_ms() but it's change on received side
- webrtc::VideoFrame::set_ntp_time_ms() but get "-1" on received side
- webrtc::VideoFrame::set_id() but get "0" on received side

Any idea? 

Thanks

Yuri

unread,
Jun 30, 2021, 7:20:15 AM6/30/21
to discuss-webrtc
Any ideas? 
May using "RTP header extension" like: https://webrtc.github.io/webrtc-org/experiments/rtp-hdrext/abs-capture-time/ can helps? 

bin...@outlook.com

unread,
Jul 14, 2021, 10:42:42 PM7/14/21
to discuss-webrtc

Yuri

unread,
Jul 18, 2021, 7:21:37 AM7/18/21
to discuss-webrtc
Thanks for replay,
It's good solution but unfortunately how i see it augmented_video_frame_buffer and it's change video encoder name in SDP from "vp8/vp9/h264" to "multiplex" so i can't show it frame in chrome browser. 

bin...@outlook.com

unread,
Jul 25, 2021, 10:42:15 PM7/25/21
to discuss-webrtc
Yes, it will only works in custom native apps, web browsers support is a problem...

Yuri

unread,
Jul 27, 2021, 11:34:29 AM7/27/21
to discuss-webrtc
I listened to "abs-capture-time" seems it can helps me.
I thin it was added in m92 release. (https://bugs.chromium.org/p/webrtc/issues/detail?id=10739)
So I interesting if it really can helps me and how to use it

刘连响

unread,
Jul 29, 2021, 5:58:23 AM7/29/21
to discuss...@googlegroups.com
Hi  Yuri,You can use webrtc insertable stream to add some meta information to each frame.

Yuri <yu...@commonground-ai.com> 于2021年7月27日周二 下午11:34写道:
--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/82e3c424-33e0-4e0b-8dcc-467ce01ad3ddn%40googlegroups.com.

Yuri

unread,
Aug 12, 2021, 4:26:04 AM8/12/21
to discuss-webrtc
Hi leeoxiang, 

"insertable" is still experiment flag but i think it really good solution for me . Thanks you 

Yuri

unread,
Aug 18, 2021, 7:51:53 AM8/18/21
to discuss-webrtc
I found that create "insertable streams" from JS is simple (to example: https://levelup.gitconnected.com/adding-metadata-to-media-frames-via-insertable-streams-api-for-webrtc-47f7a740e457) but didn't found examples to C++. 

Folks share please with some example

V I

unread,
Aug 18, 2021, 8:36:13 AM8/18/21
to discuss...@googlegroups.com

Yuri

unread,
Aug 18, 2021, 9:32:52 AM8/18/21
to discuss-webrtc
Thanks for link but I listened to this and https://groups.google.com/a/chromium.org/g/blink-dev/c/XFO4OXrdSRA and https://groups.google.com/g/discuss-webrtc/c/GWH9ce94Eqw/m/M9uNccrxCQAJ thread  but still thinks it's not complete and maybe wrong ways

Christophe Chaillon

unread,
Aug 27, 2021, 11:31:57 AM8/27/21
to discuss...@googlegroups.com
Hi,

You should override webrtc::FrameTransformerInterface 2 times, one for the encoder, one for the decoder
And call SetEncoderToPacketizerFrameTransformer(MyFrameEncoder) or SetDepacketizerToDecoderFrameTransformer(myFrameDecryptor); on the video track
I have to add my information at the end of the pFrame otherwise I lose data but it works.

Christophe



Reply all
Reply to author
Forward
0 new messages