Customize Video Frame after Encoding

Skip to first unread message

Ivan Hutomo

Jul 20, 2022, 3:23:59 PMJul 20
to discuss-webrtc
Hi, currently I am trying to modify webRTC for specialized purposes in Android. I saw your discussion here. I need help with how we could use this interface to modify our frame after encoding.

For now I just really want to XOR the frame after encoding before sending it through PeerConnection. Since I am not familiar with C++, I tried to implement my own method inherited from this interface but it did not work. 

Could anyone give me a code example for doing this? because seems that someone here has already successfully mutated the frame here. My purpose is to use this one on android, that's why I could not use insertable stream on the web, so I should modify it directly in native C++. 

I really appreciate any help! Thanks so much.


Jul 20, 2022, 9:40:00 PMJul 20
I'm using FrameEncryptorInterface instead as recommended by Philipp and it works fine for me. Dead easy to use


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
To view this discussion on the web visit

Ivan Hutomo

Jul 21, 2022, 2:59:24 AMJul 21
to discuss-webrtc
Could anyone give me the clue where I should add to the corresponding sender?
I think we should add this kind of code to set the frame encryptor, but I do not know where to place it. Thank you.

rtc::scoped_refptr<HCCrypto> frame_encryptor( new HCCrypto());
// sender->

I tried to place it in but to be exact in conductor::ReinitializePeerConnectionForLoopback()  but it did not work.
Thanks, appreciate any help

Ivan Hutomo

Jul 25, 2022, 1:07:09 AMJul 25
to discuss-webrtc
Hello everyone, maybe someone could help me to show me where I could add my XOR FrameEncryptor based on this flow:

Screen Shot 2022-07-25 at 13.05.59 PM.png
I am a bit stuck with C++, thank you so much for help

Reply all
Reply to author
0 new messages