I certainly understand why this not a priority ATM. Unless serviio maintains the ffmpeg service spun from a renderer with its corresponding ip address in its internal database as well as keep up with the changes as they occur, I would think it will be tough to kill the correct ffmpeg process. The timeout and kill option discussed above has huge potential to break the legit streams to other renderers, I am not sure that’s the way to go. I now understand the issue exists due to the shortcoming of DLNA specification itself than that of Serviio or any other DLNA products.
This issue is a non-issue when playing local movies, TV Shows or Music as they usually have fix time for the streams. But with addition of online streaming feature in serviio, this issue has a big potential to create a headache for lot of people with limited bandwidth, capped bandwidth plan, serviio server with limited resource etc.. I assume some the online streams could go days and days if the stream is not stop properly; maybe I am wrong on my assumption.
May I suggest an idea to see if can be implemented down the road to fix the issue? How about adding a check box to console to lets say “Show Stop” in video container. When this option is checked, the renderer will show “STOP” as pick in video or online container. When user select the “STOP”, the renderer then sends valid well formed ffmpeg arguments to play the invalid or non-existent video file which will cause the ffmpeg service to crash intentionally hence not sending data stream to the renderer. Approaching this issue from the renderer to instead of serviio server guarantees only ffmpeg spun by the given renderer gets killed other legit streams from other renderers stay intact.
Workaround:
I am no serviio expert or ffmpeg or dlna expert but it appears, the serviio by design adds only valid media into its database by reading “ffmpeg –i” outputs. Meaning, the stream has to be valid when you add it the console for this workaround to actually work.
The method
Cerberus mentioned above works but it kills all legit streams as well. Here is how you can kill or let is stop the stream right from the renderer you are currently using.
1.Create a folder called “STOP” then add a 20 seconds video file (eg: STOP.avi) and a thumbnail called Stop.jpg to the folder. Next add this folder to serviio console and marked as “Video”. If or when you want to stop the ffmpeg service for this renderer, you simply go click “STOP” -> STOP.avi. A new ffmpeg process will kick in killing previous process and also this new process with stop as soon as it’s done streaming stop.avi (20 sec).
OR
2. Find a short youtube video, add it to serviio console per youtube single video
wiki instruction, and name it “STOP”. If or when you want to stop the stream to a renderer, simply go to that folder and click play “STOP”. The ffmpeg stop the current stream and spun a new stream for the renderer for the length of the youtube video and stop.
OR
3.Find a temporary valid stream (veetle stream), add it to the console, name it “STOP”, and finally add a thumbnail for it (eg: STOP.jpg). Once the veetle stream becomes invalid use it to stop the ffmpeg process by intentionally invoking stream to play that does not exist which causes ffmpeg process to crash. And again doing so, it will only effect current renderer all other active renderers and its corresponding ffmpeg process stays intact.
NPuser