Jump to content

BUG: ffmpeg streaming rtsp


Recommended Posts

Posted

Server: Ubuntu 18.04 with NVidia card and kernel 4.20.5, headless

So, I've had no issue streaming rtsp from a local dvr via Emby for... well over a year. Then I got an Emby update a few months back, and suddenly it starts having goofy behavior. Stream would pause on start for anywhere from ten to twenty seconds, finally begin playing, then abruptly freeze in about another ten seconds. Oddly enough, there was never anything apparent in the system or ffmpeg logs, and ffmpeg would still be happily transcoding the file in the background until the client window was closed. Other weird issues involving transcoding would occasionally pop up, such as lagged local video or delayed start, but the local rtsp streaming issue was consistent and replicable.

I've been troubleshooting this off-and-on as a completely backburner issue, trying new nvidia drivers, turning off hardware acceleration, blacklisting video drivers altogether, etc. Seeing that you guys upgraded your bundled ffmpeg version with at least the latest update, I decided today to start there:
 

ffmpeg version 4.0.2-emby_2018_12_09 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (crosstool-NG crosstool-ng-1.23.0)

I downloaded the source and compiled from jonathonf's ppa, with nv-codec-headers from the ffmpeg git repo, and wound up with a newer version:
 

ffmpeg version 4.1-1~18.04.york0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)

Which displays none of the errant behavior; after of course modifying your startup script to point to the newly-compiled binaries.

I suspect some oddball bug was introduced in ffmpeg 4.0.2 that, based on exetnsive searching, only a few people have noticed. Thankfully it appears to have been corrected up-stream. I suggest you upgrade your bundled binaries as soon as it is convenient to do so. Thanks for all the hard work!

Posted

Hi, thanks for the investigation. Are all the embedded libraries the same, is the command line used by Emby exactly the same?  

Posted

Yes; nothing under /opt/emby-server was changed short of the startup shell script, and all that was changed therein was the exec line to point ffmpeg and ffprobe to the system binaries.

Posted

but is your build static?

Posted

Oh... no, it appears dynamically linked. Is that problematic?

Posted

I just want to know what libraries it is built with compared to what libraries ours is built with.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...