RootEncoder icon indicating copy to clipboard operation
RootEncoder copied to clipboard

How to remove Background from live steaming?

Open hemant-novotrax opened this issue 3 years ago • 5 comments

Hello Please help , I want to remove background of object from live streaming .can i remove background using filters?

hemant-novotrax avatar Feb 01 '22 07:02 hemant-novotrax

Hello,

For now, the only similar filter added by default is chroma filter. With this filter you can replace a chroma (green background) with an image.

For example. Reproduce this video on a PC: https://www.youtube.com/watch?v=aWyge8HfF4Q&list=PLTH1W-kYjBQPMw0T2Oa9aNlWlPzAkYQmM Using OpenGl RTMP example, enable chroma filter and focus the camera on the video and you will see on the preview that the green background is replaced by an image.

pedroSG94 avatar Feb 02 '22 09:02 pedroSG94

Hello padro,

First of all thanks for given us to wonderful Streaming library . This this helpful to us.

You are talking about chroma filter but I am telling about deeplabv3 (Please see this :- @.***/image-segmentation-for-android-smart-background-replacement-with-fritz-a09d8b0592a4) .

I am just want to know that can we implement this effect in rtmp streaming. If yes, please respond me.

Thanks you

@./image-segmentation-for-android-smart-background-replacement-with-fritz-a09d8b0592a4> Image Segmentation for Android — Smart Background Replacement with Fritz AI | by Eric Hsiao | @./image-segmentation-for-android-smart-background-replacement-with-fritz-a09d8b0592a4> All of our Vision APIs follow a similar format in order to run prediction on an image. This is a high-level overview but if you’d like more details, you can take a look at our Image Segmentation ... medium.com


From: Pedro Sánchez @.> Sent: Wednesday, February 2, 2022 3:10 PM To: pedroSG94/rtmp-rtsp-stream-client-java @.> Cc: Hemant Bharti @.>; Author @.> Subject: Re: [pedroSG94/rtmp-rtsp-stream-client-java] How to remove Background from live steaming? (Issue #1047)

Hello,

For now, the only similar filter added by default is chroma filter. With this filter you can replace a chroma (green background) with an image.

For example. Reproduce this video on a PC: https://www.youtube.com/watch?v=aWyge8HfF4Q&list=PLTH1W-kYjBQPMw0T2Oa9aNlWlPzAkYQmM Using OpenGl RTMP example, enable chroma filter and focus the camera on the video and you will see on the preview that the green background is replaced by an image.

— Reply to this email directly, view it on GitHubhttps://github.com/pedroSG94/rtmp-rtsp-stream-client-java/issues/1047#issuecomment-1027750561, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVUMTIILARWI572EMMINYADUZD3YZANCNFSM5NIM4PIQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>

hemant-novotrax avatar Feb 04 '22 07:02 hemant-novotrax

Hello,

I can't see your link but I think that you mean this: https://medium.com/@hsiaoer/image-segmentation-for-android-smart-background-replacement-with-fritz-a09d8b0592a4

In this case, It can't be implemented because it is using a bitmap to work. Implement it to work on fly is not possible because it take too much time to process and the result could be less than 10fps using good devices in 1080p.

Also, I'm not sure if that library provide you a way to know where you need to replace a pixel. It is designed to work as post process image filter not a real time filter.

pedroSG94 avatar Feb 04 '22 10:02 pedroSG94

Hello, I want help from you . After change activity Can I send continued frame send to server in rtmp ?


From: Pedro Sánchez @.> Sent: Friday, February 4, 2022 4:15 PM To: pedroSG94/rtmp-rtsp-stream-client-java @.> Cc: Hemant Bharti @.>; Author @.> Subject: Re: [pedroSG94/rtmp-rtsp-stream-client-java] How to remove Background from live steaming? (Issue #1047)

Hello,

I can't see your link but I think that you mean this: @.***/image-segmentation-for-android-smart-background-replacement-with-fritz-a09d8b0592a4

In this case, It can't be implemented because it is using a bitmap to work. Implement it to work on fly is not possible because it take too much time to process and the result could be less than 10fps using good devices in 1080p. Also, I'm not sure if that library provide you a way to know where you need to replace a pixel. It is designed to work as post process image filter not a real time filter.

— Reply to this email directly, view it on GitHubhttps://github.com/pedroSG94/rtmp-rtsp-stream-client-java/issues/1047#issuecomment-1029855654, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVUMTINJXZ7OIYX4YYDMJGTUZOU4PANCNFSM5NIM4PIQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>

hemant-novotrax avatar Feb 21 '22 11:02 hemant-novotrax

Yes, you can do it like in this example: https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/tree/master/app/src/main/java/com/pedro/rtpstreamer/backgroundexample

pedroSG94 avatar Feb 21 '22 12:02 pedroSG94