Push rtmp use CMSampleBuffer #1009
-
Hello everyone, I'm a newbie in swift. I follow an example from DeepAR Sdk. This example pushes CMSampleBuffer to Agora, but I want to push DeepAR's result to my own rtmp server. How to push rtmp using CMSampleBuffer? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi. You can create an effect inherited from the VideoEffet and process your buffer in method override func execute(_ image: CIImage, info: CMSampleBuffer?) -> CIImage |
Beta Was this translation helpful? Give feedback.
-
Hi, Thank you for your reply. Can you give me more information? I have create MyEffect. But I don't know what to do in execute.
|
Beta Was this translation helpful? Give feedback.
-
You should store and keep updated your CMSampleBuffer from DeepAR as member of MyEffect, or you can render CIImage from CMSampleBuffer and keep it as a buffer in MyEffect, then in execute method you just return it as is. |
Beta Was this translation helpful? Give feedback.
You should store and keep updated your CMSampleBuffer from DeepAR as member of MyEffect, or you can render CIImage from CMSampleBuffer and keep it as a buffer in MyEffect, then in execute method you just return it as is.