Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low quality video streaming #1570

Open
tunahsu opened this issue Mar 26, 2024 · 1 comment
Open

Low quality video streaming #1570

tunahsu opened this issue Mar 26, 2024 · 1 comment

Comments

@tunahsu
Copy link

tunahsu commented Mar 26, 2024

Why is the video streaming quality poor even though I've set the resolution to the highest resolution of the webcam in the media_stream_constraints? The quality is still worse than directly opening the camera using Windows.

Here is my code:

ctx = webrtc_streamer(
    key='stream-detection',
    video_processor_factory=VideoProcessor,
    media_stream_constraints={
        'video': {
            'width': 1920
            },
        'audio': False
    },
    rtc_configuration={
        'iceServers': [{'urls': ['stun:stun.l.google.com:19302']}]
    },
)
@tunahsu
Copy link
Author

tunahsu commented Mar 27, 2024

I noticed that it takes some time for the frame size to gradually increase, from 640x360 to 960x540 to 1280x720 to 1920x1080. I know that WebRTC adjusts the frame size adaptively based on network speed. Is there any way to fix it at 1920x1080 from the beginning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant