xteve-project / xTeVe

M3U Proxy for Plex DVR and Emby Live TV
MIT License
1.87k stars 238 forks source link

Leaving ffmpeg and vlc running after stream closed #187

Open troykelly opened 4 years ago

troykelly commented 4 years ago

Please first read the documentation. Problems affecting the client, e.g. Plex or Emby should be reported there in the forum.

Describe the bug xTeVe is leaving ffmpeg and vlc running when a stream fails from the server-side.

Server (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Watch a stream that is proxied by xTeVe
  2. Allow the stream to fail from the provider end
  3. See the new process start to restart the stream
  4. See the old process remain

Expected behavior The failed stream's ffmeg or vlc process should exit

Screenshots

root      1193  0.1  0.1  79000 23396 ?        S    01:54   0:16 /usr/bin/ffmpeg -user_agent xTeVe -hide_banner -loglevel info -i http://example.com:80/dir/key/3907 -codec copy -f mpegts pipe:1
root      1275  0.2  0.1  68884 23008 ?        S    02:20   0:19 /usr/bin/ffmpeg -user_agent xTeVe -hide_banner -loglevel info -i http://example.com:80/dir/key/3527 -codec copy -f mpegts pipe:1
root      1276  0.1  0.1  67056 22044 ?        S    02:20   0:15 /usr/bin/ffmpeg -user_agent xTeVe -hide_banner -loglevel info -i http://example.com:80/dir/key/3907 -codec copy -f mpegts pipe:1
root      1325  0.3  0.1  78408 23284 ?        S    02:51   0:27 /usr/bin/ffmpeg -user_agent xTeVe -hide_banner -loglevel info -i http://example.com:80/dir/key/3527 -codec copy -f mpegts pipe:1
root      1329  0.2  0.1  65036 20136 ?        S    03:00   0:15 /usr/bin/ffmpeg -user_agent xTeVe -hide_banner -loglevel info -i http://example.com:80/dir/key/3907 -codec copy -f mpegts pipe:1

Additional context NA

mar-mei commented 4 years ago

If you use FFmpeg or VLC, xTeVe is not involved with the network connection to the provider. As long as the provider sends data to FFmpeg / VLC, the process is not terminated. Only the connection between Clinet and xTeVe can be monitored, if the last client ends a stream from xTeVe, the FFmpeg / VLC process is also ended.

Provider --> FFmpeg / VLC --> xTeVe <--> Client