jellyfin / jellyfin-mpv-shim

MPV Cast Client for Jellyfin
Other
1.5k stars 88 forks source link

Possible missing dependency in flatpak: yt-dlp #303

Open MayeulC opened 1 year ago

MayeulC commented 1 year ago

Describe the bug Trying to play live TV, I have some output in the log regarding missing yt-dlp.

To be clear, I am not entirely certain if that's the actual issue here. In jellyfin-media-player, live tv errors out for me, and offers me to restart with transcoding. If I select "retry", it works. On the jellyfin side, I use rtsp-simple-proxy to proxy the rtsp stream provided by my ISP (udp-only, iliad/free) to the jellyfin docker container (tcp).

To Reproduce (may require a specific environment)

  1. Play a live TV stream from jellyfin
  2. See error in the console

Expected behavior

Desktop (please complete the following information):

Error Messages

mpv logs ``` 2022-12-10 20:41:46,836 [ DEBUG] event_handler: Handled Event Play: {'ItemIds': ['c75beaab0387b27e78de61ebbabcf42a'], 'PlayCommand': 'PlayNow', 'ControllingUserId': '12f4889afdba4325b266578894971c68', 'ServerId': '2076c728cb514044b540ab1325bc0123'} 2022-12-10 20:41:46,838 [ DEBUG] urllib3.connectionpool: Resetting dropped connection: jellyfin.example.com.net 2022-12-10 20:41:46,978 [ DEBUG] urllib3.connectionpool: https://jellyfin.example.com.net:443 "GET /Users/12f4889afdba4325b266578894971c68/Items/c75beaab0387b27e78de61ebbabcf42a HTTP/1.1" 200 None 2022-12-10 20:41:47,004 [ DEBUG] urllib3.connectionpool: Starting new HTTPS connection (1): checkip.amazonaws.com:443 2022-12-10 20:41:47,146 [ DEBUG] urllib3.connectionpool: https://checkip.amazonaws.com:443 "GET / HTTP/1.1" 200 14 2022-12-10 20:41:47,147 [ DEBUG] charset_normalizer: Encoding detection: ascii is most likely the one. 2022-12-10 20:41:47,147 [ DEBUG] event_handler: EventHandler::playMedia 2022-12-10 20:41:47,147 [ DEBUG] media: Bandwidth: local=True, bitrate=None, force=False 2022-12-10 20:41:47,168 [ DEBUG] urllib3.connectionpool: https://jellyfin.example.com.net:443 "POST /Items/c75beaab0387b27e78de61ebbabcf42a/PlaybackInfo HTTP/1.1" 500 None 500 Server Error: Internal Server Error for url: https://jellyfin.example.com.net/Items/c75beaab0387b27e78de61ebbabcf42a/PlaybackInfo 2022-12-10 20:41:47,169 [ ERROR] Jellyfin.jellyfin_apiclient_python.http: 500 Server Error: Internal Server Error for url: https://jellyfin.example.com.net/Items/c75beaab0387b27e78de61ebbabcf42a/PlaybackInfo --[ 500 response ] 500 Server Error: Internal Server Error for url: https://jellyfin.example.com.net/Items/c75beaab0387b27e78de61ebbabcf42a/PlaybackInfo 2022-12-10 20:41:47,169 [ ERROR] Jellyfin.jellyfin_apiclient_python.http: --[ 500 response ] 500 Server Error: Internal Server Error for url: https://jellyfin.example.com.net/Items/c75beaab0387b27e78de61ebbabcf42a/PlaybackInfo 2022-12-10 20:41:47,169 [ ERROR] websocket: error from callback . at 0x7fa96a63c790>: 'NoneType' object is not subscriptable 2022-12-10 20:41:47,169 [ ERROR] JELLYFIN.jellyfin_apiclient_python.ws_client: 'NoneType' object is not subscriptable 2022-12-10 20:41:47,169 [ DEBUG] event_handler: Unhandled Event WebSocketError: 'NoneType' object is not subscriptable 2022-12-10 20:41:59,640 [ DEBUG] event_handler: Handled Event Play: {'ItemIds': ['6cab1feadadeb4ac9a3dff27fc32ffb3'], 'PlayCommand': 'PlayNow', 'ControllingUserId': '12f4889afdba4325b266578894971c68', 'ServerId': '2076c728cb514044b540ab1325bc0123'} 2022-12-10 20:41:59,651 [ DEBUG] urllib3.connectionpool: https://jellyfin.example.com.net:443 "GET /Users/12f4889afdba4325b266578894971c68/Items/6cab1feadadeb4ac9a3dff27fc32ffb3 HTTP/1.1" 200 None 2022-12-10 20:41:59,676 [ DEBUG] urllib3.connectionpool: Starting new HTTPS connection (1): checkip.amazonaws.com:443 2022-12-10 20:41:59,846 [ DEBUG] urllib3.connectionpool: https://checkip.amazonaws.com:443 "GET / HTTP/1.1" 200 14 2022-12-10 20:41:59,847 [ DEBUG] charset_normalizer: Encoding detection: ascii is most likely the one. 2022-12-10 20:41:59,848 [ DEBUG] event_handler: EventHandler::playMedia 2022-12-10 20:41:59,848 [ DEBUG] media: Bandwidth: local=True, bitrate=None, force=False 2022-12-10 20:42:03,842 [ DEBUG] urllib3.connectionpool: https://jellyfin.example.com.net:443 "POST /Items/6cab1feadadeb4ac9a3dff27fc32ffb3/PlaybackInfo HTTP/1.1" 200 None 2022-12-10 20:42:03,843 [ DEBUG] media: Using direct url. 2022-12-10 20:42:03,924 [ WARNING] mpv: ffmpeg: https: HTTP error 400 Bad Request 2022-12-10 20:42:03,924 [ ERROR] mpv: stream: Failed to open https://jellyfin.example.com.net/Videos/6cab1feadadeb4ac9a3dff27fc32ffb3/stream?static=true&MediaSourceId=02c63bf7bf82eacb51f770e0ed1db536&api_key=REDACTED. 2022-12-10 20:42:03,926 [ ERROR] mpv: ytdl_hook: 2022-12-10 20:42:03,927 [ ERROR] mpv: ytdl_hook: youtube-dl failed: not found or not enough permissions 2022-12-10 20:42:03,927 [ INFO] mpv: cplayer: 2022-12-10 20:42:33,844 [ ERROR] player: Timeout when waiting for media duration. Stopping playback! ```
iwalton3 commented 1 year ago

Generally MPV only tries to use Youtube-DLP only after failing to load the stream normally. I haven't done anything special in MPV Shim to support live TV, so there may need to be a fix applied for this.