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.93k stars 448 forks source link

iphone 11 pro and 12 non pro stream is choppy using any rtmp streaming software except larix brodcaster #487

Closed e2950 closed 1 year ago

e2950 commented 1 year ago

when testing using iphones if i use larix broadcaster everything works just like it should but any other software like prism or Litchi or dji fly rtmp out, then Restreamer's video out in Passthrough mode buffers. i have run Restreamer on a pi4 and a synology nas. in both cases the results are the same. tested with an android with prism and everything works as it should. i feel there is something to do with how iphone is encoding the h264 that Restreamer just doesn't like. i would love to use this software but this needs to work with iphone. btw MonaServer2 work 100% with iphone's but doesn't have your nice interface but maybe you could look at their settings to make Restreamer work better with iphone's

svenerbeck commented 1 year ago

We only process tickets with error logs. Here you can see how to get the log file: https://www.youtube.com/watch?v=mZMGrweFCsM — Thank you for being so understanding.

e2950 commented 1 year ago

We only process tickets with error logs. Here you can see how to get the log file: https://www.youtube.com/watch?v=mZMGrweFCsM — Thank you for being so understanding.

i sent in 2 reports. report prism is what every app that is not Larix does. report Larix shows everything working fine. also i know report larix is at 25 fps not 30 but i can set larix to 30 60 and do 40000Kb with out a problem

reportLarix.txt reportprism.txt

danskycode commented 1 year ago

I have a similar issue with DJI Osmo Action stream. The input from that camera is 1280x720 29.97p H.264 2 or 4Mbit. Inside Restreamer the video plays 2s, then stops for 2s - it appears buffering without network problems or dropped frames.

Speed is shown as ca. 2.35x inside the stats which is odd, the framerate however is shown correctly around 30fps so it appears that Restreamer does not handle a wrong(?) framerate from the Osmo Action well. Everything is set to pass-through. Testing the stream with Twitch Inspector shows a "0" framerate, steady badwidth so maybe the Osmo Action output is problematic.

However, the same Osmo Action stream appears smooth in Twitch directly. Restreaming the RTMP stream will also make it choppy on Twitch. It appears that pass-through or HLS conversion is introducing a framerate issue. OBS streaming to the Restreamer instance is flawless. This issue could be related to #367

ioppermann commented 1 year ago

I tested it and was able to reproduce the issue with the Prism Live app and it should be fixed now (in the dev branch).

The problem was that the encoder of the Prism app produces packets with timestamps that jump in time. One packet jumps around 700ms ahead and 15 packets later it jumps back 1.1 seconds (with 30 fps). The RTMP server tried to fix that and ended messing up the stream. FFmpeg started to drop packets resulting in a framerate of about 15 (that's why @danskycode sees a speed of 2x).

This is probably the same with the other apps.

e2950 commented 1 year ago

I tested it and was able to reproduce the issue with the Prism Live app and it should be fixed now (in the dev branch).

The problem was that the encoder of the Prism app produces packets with timestamps that jump in time. One packet jumps around 700ms ahead and 15 packets later it jumps back 1.1 seconds (with 30 fps). The RTMP server tried to fix that and ended messing up the stream. FFmpeg started to drop packets resulting in a framerate of about 15 (that's why @danskycode sees a speed of 2x).

This is probably the same with the other apps.

how would i get this fix or install it in my copy? thank you

jstabenow commented 1 year ago

Replace the official datarhei/restreamer:latest with datarhei/restreamer:dev.

svenerbeck commented 1 year ago

Hello

We are closing your ticket https://github.com/datarhei/restreamer/issues/487.

This may be due to the following reasons:

You can reopen this ticket at any time!

Please only open related tickets once! Always answer/ask in the original ticket with the same issue!

With kind regards, Your datarhei team