Git Product home page Git Product logo

Comments (10)

ThibaultBee avatar ThibaultBee commented on July 19, 2024

Hi,

If you want to get a live stream in portrait, the live stream must start in portrait, if you want to get a live stream in landscape, the live stream must start in portrait. The live stream orientation can't be changed during a live.

This is the same behaviour as the native camera application on my Pixel phone (and others devices).

The reason behind this is that most containers, decoders, players doesn't handle well a change in the orientation.

Best regards,
Thibault

from streampack.

Squall-Huang avatar Squall-Huang commented on July 19, 2024

Hi ThibaultBee:
But when I start live stream with mobile in landscape direction, my VLC player still start in portrait and image in VLC show 90 degree direction(wrong direction).

My video config below:

val videoConfig =
                    VideoConfig(
                        startBitrate = 2000000,
                        fps = 30,
                        mimeType = MediaFormat.MIMETYPE_VIDEO_AVC
                    )

from streampack.

ThibaultBee avatar ThibaultBee commented on July 19, 2024

Hi,
What streamer do you use ? Camera or screen or custom? RTMP or SRT?

I have tested with the camera demo with RTMP and SRT Camera streamer, I can't reproduce it.
My guess is either you have lock your phone orientation in portrait, either you have set requireActivity().requestedOrientation.

from streampack.

Squall-Huang avatar Squall-Huang commented on July 19, 2024

I use CameraRtmpLiveStreamer()
Yes, I locked my app orientation in portrait.
My app must be locked in portrait orientation,Could I use live streaming in mobile landscape with locked in portrait and player can show in correct direction?

from streampack.

ThibaultBee avatar ThibaultBee commented on July 19, 2024

Hi,

My app must be locked in portrait orientation,Could I use live streaming in mobile landscape with locked in portrait and player can show in correct direction?

It is not supported.
Could you lock your application in portrait and lock in landscape the only activity that contains CameraRtmpLiveStreamer?
I don't understand the usage. Could you explain why you want to lock in portrait while filming in landscape? Could you send me a screenshot of the activity that contains CameraRtmpLiveStreamer?

from streampack.

Squall-Huang avatar Squall-Huang commented on July 19, 2024

Hi:
Did you mean when rotate in portrait or in landscape each time then new a CameraRtmpLiveStreamer() at that orientation then have correct direction image?

from streampack.

ThibaultBee avatar ThibaultBee commented on July 19, 2024

No, not sure what you said will offer a nice user experience.

You can force the streaming Activity to landscape and let the rest of the application in portrait.

from streampack.

Squall-Huang avatar Squall-Huang commented on July 19, 2024

Hi:
I would like to let live streaming could be in portrait and landscape.

from streampack.

ThibaultBee avatar ThibaultBee commented on July 19, 2024

Lock your application or your activity in portrait or in landcape with:

requireActivity().requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT

or

requireActivity().requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE

There is no other way.

from streampack.

Squall-Huang avatar Squall-Huang commented on July 19, 2024

OK. Thank you for your enthusiastic answer for all my question,ThibaultBee😄

from streampack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.