pedroSG94 / RTSP-Server

Plugin of rtmp-rtsp-stream-client-java to stream directly to RTSP player.
Apache License 2.0
214 stars 66 forks source link

Hello, I would like to ask how to set up horizontal screen streaming #95

Closed Tom-jia closed 1 year ago

Tom-jia commented 1 year ago

Is there any way to set it?

pedroSG94 commented 1 year ago

Yes, you can do it. You can just change the screen orientation to landscape in the project example and streaming will work in horizontal.

Also if you want change streaming orientation manually you can set the orientation to prepareVideo method with values of (0, 90, 180 or 270) but CameraHelper.getCameraOrientation(context) do it for you

Tom-jia commented 1 year ago

Hello, I set the resolution to 19201080 when pushing the stream. Use this method onTakePhoto to get the picture and save it to 10801920. Is there any way to solve this problem? @pedroSG94

pedroSG94 commented 1 year ago

Do you mean that using landscape with resolution 1920x1080 and saving image the result is 1080x1920? Because I tested it but it is working fine in the app example. Basically i replaced switch camera button to a take photo and it is working fine.

Tom-jia commented 1 year ago

This is the configuration code and the code to get the image image image image

pedroSG94 commented 1 year ago

Hello,

I tested again like you but the result is working fine:

image image image

I think you are not locking screen to landscape properly. Can you share me a screenshot of the app?

Tom-jia commented 1 year ago

Hi, I have found a solution to this problem. Thank you very much for your support