flutter_rtmppublisher icon indicating copy to clipboard operation
flutter_rtmppublisher copied to clipboard

Streaming disconnecting when switching Camera

Open sathya4code opened this issue 4 years ago • 7 comments

Hi,

I am exploring this for my streaming project. i am using Wowza cloud. Given example(in this repo) working perfectly. But when i switch the camera while streaming, the stream got disconnecting.

I am using the example which is given in this repo. Can someone help me here.

Note: I don't know whether it is bug or not.

Thank you.

sathya4code avatar Jul 15 '20 12:07 sathya4code

When you switch cameras it recreates the controller so right now this will cause the whole stream to terminate. It has to recreate the camera2 session on android no matter what, on iOS this might be a little easier to solve, definitely working as intended right now however.

On Wed, 15 Jul 2020 at 05:28, Sathya [email protected] wrote:

Hi,

I am exploring this for my streaming project. i am using Wowza cloud. Given example(in this repo) working perfectly. But when i switch the camera while streaming, the stream got disconnecting.

I am using the example which is given in this repo. Can someone help me here.

Note: I don't know whether it is bug or not.

Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pinkfish/flutter_rtmppublisher/issues/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATOMMNXVYFZI373GX6ZHRLR3WOGVANCNFSM4O2PRUWA .

pinkfish avatar Jul 15 '20 16:07 pinkfish

When you switch cameras it recreates the controller so right now this will cause the whole stream to terminate. It has to recreate the camera2 session on android no matter what, on iOS this might be a little easier to solve, definitely working as intended right now however. On Wed, 15 Jul 2020 at 05:28, Sathya @.***> wrote: Hi, I am exploring this for my streaming project. i am using Wowza cloud. Given example(in this repo) working perfectly. But when i switch the camera while streaming, the stream got disconnecting. I am using the example which is given in this repo. Can someone help me here. Note: I don't know whether it is bug or not. Thank you. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#20>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATOMMNXVYFZI373GX6ZHRLR3WOGVANCNFSM4O2PRUWA .

Any solution for this?

sathya4code avatar Jul 16 '20 05:07 sathya4code

Anybody know how to fix this issue?

sathya4code avatar Jul 23 '20 05:07 sathya4code

I am with same issue here. There are the way to do this without the streaming disconnect ?

nitoba avatar Aug 07 '20 17:08 nitoba

@sathya4code did you find any solutions to get it work?

aravindhkumar23 avatar Jul 01 '21 15:07 aravindhkumar23

@sathya4code did you find any solutions to get it work?

No Bro... Sorry for the late reply.

sathya4code avatar Aug 01 '21 06:08 sathya4code

same here, my solution is:

  • _cameraController.stopVideoStreaming()

  • When switch camera initializate new controller with new camera import 'package:camera_with_rtmp/camera.dart' as camera; _cameraController = camera.CameraController()

  • _cameraController.initialize()

  • _cameraController.startVideoStreaming()

and here all works. But in general I have also app crash, idk why... Something wrong with Android Native library

andreidevo avatar Dec 06 '21 17:12 andreidevo