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

Media source hangs (RTSP), but OBS is unaware #11537

Open
dzek69 opened this issue Nov 19, 2024 · 0 comments
Open

Media source hangs (RTSP), but OBS is unaware #11537

dzek69 opened this issue Nov 19, 2024 · 0 comments

Comments

@dzek69
Copy link

dzek69 commented Nov 19, 2024

Operating System Info

Ubuntu 24.04

Other OS

KDE Neon 6.2, based on Ubuntu 24.04

OBS Studio Version

30.2.3

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/rJKXLhOZLn5wgVuh

OBS Studio Crash Log URL

No response

Expected Behavior

OBS should be able to find out that the source streams stopped producing frames and restart the source reading

Current Behavior

RTSP stream may stop producing frames, but underlying FFMPEG probably keeps going. The result is the stream being stuck forever. I have to change some property to make OBS restart the source.

Steps to Reproduce

  1. Find a RTSP stream
  2. Add it as source media
  3. Wait for the source media to stop producing frames, while not stopping FFMPEG at the same time (this can be tricky I guess and take forever, making reproduction impossible)

Anything else we should know?

In the OBS log there is no log from ffmpeg, so the event that occured it's basically invisible in the log. The stream died at around 03:06:59 am, in the log file there is nothing between 02:14:58 and 09:40:20. Can I enable more logging somehow?

Anyway.

I was working on a hobby project once that was recording streams using FFMPEG. I had a situation where the stream stopped producing frames, but FFMPEG kept running. As a result, nothing was recorded and this situation was ignored.

So I made a fix and I was observing frame= lines:

frame=    0 fps=0.0 q=0.0 size=       0kB time=N/A bitrate=N/A speed=N/A    
frame=   30 fps= 20 q=33.0 size=    1024kB time=00:00:00.46 bitrate=17976.4kbits/s speed=0.314x    
frame=   58 fps= 29 q=33.0 size=    1536kB time=00:00:00.93 bitrate=13482.1kbits/s speed=0.468x    

And if no such line in the ffmpeg log was produced for 5 seconds - I was considering the recording broken and I was restarting ffmpeg. I think OBS should do the same. The timeout can be configurable I guess, but usually no frames for 5 seconds means the stream is dead.

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