datarhei / restreamer

The Restreamer is a complete streaming server solution for self-hosting. It has a visually appealing user interface and no ongoing license costs. Upload your live stream to YouTube, Twitch, Facebook, Vimeo, or other streaming solutions like Wowza. Receive video data from OBS and publish it with the RTMP and SRT server.
https://docs.datarhei.com/restreamer/
Apache License 2.0
3.78k stars 438 forks source link

Incorrectly scaling a video with a non-normal aspect #797

Open begunfx opened 1 month ago

begunfx commented 1 month ago

Describe the bug I seem to be running into an issue where I'm trying to restream an IP RTSP camera with a resolution of 480x360 (I know it's a weird aspect - it's a doorbell camera - 4:3 ratio). Anyway, I expect to get bars on the left/right side (I also have other IP cameras that run at the resolution of 640x360). In the UI I see it as expected. However, if I try to embed it in a webpage or view the embed URL in a browser tab, the video is scaled in and requires that I scroll down to see the rest of it. This should be easily reproduceable. Note: when I add the video in question restreamer does seem to recognize the correct stream resolution. I'm running restreaming in Docker on a Synology NAS box. Any ideas on correcting this or is this a bug? Thanks in advance for your help! Also, note: that these streams are for local LAN purposes only. I'm not broadcasting anything.

This is reproducible on any browser. You just need a RTSP video streaming at 480x360 and another one at 640x360 to test.

additional context that might better clarify that this is most likely a bug. My cameras are IP security cameras. I am embedding them directly into a Smart Home tablet - which is browser based. I'm not using any kind of player just embedding using an iframe. The issue I'm seeing is also visible directly in restreamer. If I use the UI player it appears as expected (with horizontal black bars). However if I use the player url that is provided below the UI OR the iframe example code I am seeing the issue. This should eliminate any potential external source of the problem. To also validate this I've tried playing the video in incognito mode in Chrome as well as Firefox and Safari. The issue can be seen in all of these. This is the iframe I'm using as an example: Note: I've tried using a percentage for the width and height parameters and I also trying changing the width pixel dimensions to match the 480 width camera stream..no luck

ioppermann commented 3 weeks ago

This seems to be a bug with player configuration. We'll have a look into that.

begunfx commented 3 weeks ago

Thanks Ingo. Appreciate it.