CrySoft 0 Posted 47 minutes ago Posted 47 minutes ago Hi team, I am experiencing an issue on Emby Server 4.9.5.0 where Live TV streams and their background transcode processes (ffmpeg) fail to close after a remote client disconnects or crashes during live playback. Issue Description: When a client stops/closes Live TV abruptly, the Emby Dashboard correctly updates to show 0 active sessions. However, the server does not terminate the input stream from the tuner nor the underlying ffmpeg process. As a result, Emby continues downloading the stream endlessly in the background, keeping the tuner on TVHeadend completely locked and unnecessarily consuming system resources. Technical Observations: Network Analysis: Running tcpdump on the server shows active TCP traffic between TVHeadend (localhost:9981) and Emby (localhost:60042). Emby continues to send TCP ACKs to TVHeadend, reading the stream into a local buffer/transcoder even though no active client session exists in the Emby UI. Tuner Types Tested: Tested with both HDHomeRun emulation mode and M3U Tuner mode from TVHeadend. The orphaned socket/process behavior occurs in both configurations. Kernel Keep-Alive: Tuned OS TCP keep-alive settings (tcp_keepalive_time = 60), but since Emby is actively ACKing the packets from TVHeadend, the TCP connection is seen as healthy by the OS and is never dropped. Transcoding: Inspection of the process table shows an orphaned ffmpeg instance spawned by Emby that continues to run indefinitely for the Live TV stream. Server Environment: Emby Server Version: 4.9.5.0 OS: Ubuntu Server 26.04 LTS Tuner Backend: TVHeadend (running on the same host) Steps to Reproduce: Start playing a Live TV channel on a remote client. Force-close the client app or simulate a abrupt network disconnect on the client side. Observe the Emby Dashboard: the active session disappears. Check TVHeadend / system processes (ss -tpn | grep 9981 or pgrep ffmpeg): the stream connection remains open and continues to pull data indefinitely. It seems that the cancellation token / process teardown for the ffmpeg pipeline and the tuner reader object is not being triggered upon client session termination. I have attached the embyserver.txt log file for review, no ffmpeg-transcode-* is generated for this specific issue.. Thanks in advance for your help! embyserver-3.txt
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now