2023-11-20, 04:03 AM
I try to use NextPVR Jellyfin plugin to access to my NextPVR Recordings. I try to set both default PIN 0000 and specified PIN, but with correct PIN it keeps return 401:
Log in NextPVR:
Log in Jellyfin:
if I enable Unauthenticated Access "Allow unauthenticated access for streaming Live TV / Recordings", I got 500 Error in ffmpeg:
Log in NextPVR. I don't understand what this error " Unexpected error streaming recording: System.Collections.Generic.KeyNotFoundException: The given key 'sid' was not present in the dictionary." means and how to fix it.
In Jellyfin it shows ffmpeg exit 1 as before.
I can't see where Jellyfin plugins use PIN to autherize, but unautherized stream does not work either.
Code:
/videos/a0504666-0a0f-58c5-058c-2c14b3ad5f90/live.m3u8
{"Protocol":1,"Id":"a05046660a0f58c5058c2c14b3ad5f90","Path":"http://localhost:8866/live?recording=862","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":null,"Size":null,"Name":"Live Curling: European Championships","IsRemote":false,"ETag":null,"RunTimeTicks":null,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[],"MediaAttachments":[],"Formats":[],"Bitrate":null,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}
/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device vaapi=va:/dev/dri/renderD128,driver=iHD -filter_hw_device va -autorotate 0 -i "http://localhost:8866/live?recording=862" -map_metadata -1 -map_chapters -1 -threads 0 -sn -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_base_url "hls/61abb11e41242ad4f0db9ab08cb06949/" -hls_segment_filename "/var/lib/jellyfin/transcodes/61abb11e41242ad4f0db9ab08cb06949%d.ts" -hls_playlist_type event -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/61abb11e41242ad4f0db9ab08cb06949.m3u8"
ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libsvtav1 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
http://localhost:8866/live?recording=862: Server returned 401 Unauthorized (authorization failed)
Log in NextPVR:
Code:
2023-11-20 11:41:13.455 [DEBUG][88] Got request [127.0.0.1]: /live
2023-11-20 11:41:13.456 [DEBUG][88] /live?recording=862
2023-11-20 11:41:13.456 [DEBUG][88] - recording: 862
2023-11-20 11:41:13.456 [DEBUG][88] range: bytes=0-
2023-11-20 11:41:13.456 [ERROR][88] Unauthenticated Stream Access is disabled
2023-11-20 11:41:13.638 [DEBUG][78] Got request [127.0.0.1]: /live
2023-11-20 11:41:13.638 [DEBUG][78] /live?recording=862
2023-11-20 11:41:13.638 [DEBUG][78] - recording: 862
2023-11-20 11:41:13.638 [DEBUG][78] range: bytes=0-
2023-11-20 11:41:13.638 [ERROR][78] Unauthenticated Stream Access is disabled
2023-11-20 11:41:15.457 [DEBUG][96] Got request [127.0.0.1]: /service (recording.list)
2023-11-20 11:41:15.457 [DEBUG][96] method=recording.list
2023-11-20 11:41:15.457 [DEBUG][96] parameters:
2023-11-20 11:41:15.457 [DEBUG][96] method: recording.list
2023-11-20 11:41:15.457 [DEBUG][96] filter: pending
2023-11-20 11:41:15.457 [DEBUG][96] sid: 26fd1e2bed3e495da869a7d5fd973589
2023-11-20 11:41:15.457 [DEBUG][96] format: json
2023-11-20 11:41:15.457 [DEBUG][96] client_ip: 127.0.0.1
2023-11-20 11:41:15.457 [DEBUG][96] user_agent: Jellyfin-Server/10.8.12
2023-11-20 11:41:15.457 [DEBUG][96] host_callback: ...
2023-11-20 11:41:15.457 [DEBUG][96] GetRecordingsList()
2023-11-20 11:41:15.457 [DEBUG][96] GetRecordingList@1.5)
2023-11-20 11:41:15.457 [DEBUG][96] GetRecordingsList@2
2023-11-20 11:41:15.457 [DEBUG][96] Matched 0 recordings
2023-11-20 11:41:15.457 [DEBUG][96] GetRecordingsList@exit
2023-11-20 11:41:15.457 [DEBUG][96] {
"recordings": [
]
}
Log in Jellyfin:
Code:
[2023-11-20 11:41:12.243 +08:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffprobe" "-analyzeduration 200M -i \"http://localhost:8866/live?recording=862\" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format"
[2023-11-20 11:41:12.322 +08:00] [ERR] Error in "ffprobe"
...
[2023-11-20 11:41:12.324 +08:00] [INF] User policy for "libot". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-11-20 11:41:12.324 +08:00] [INF] StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="http://localhost:8866/live?recording=862", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=ContainerBitrateExceedsLimit ) "media:/videos/a0504666-0a0f-58c5-058c-2c14b3ad5f90/master.m3u8?MediaSourceId=a05046660a0f58c5058c2c14b3ad5f90&VideoCodec=h264&AudioCodec=aac,mp3&VideoBitrate=14808000&AudioBitrate=192000&api_key=<token>&SubtitleMethod=Encode&TranscodingMaxAudioChannels=6&RequireAvc=false&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&TranscodeReasons=ContainerBitrateExceedsLimit"
[2023-11-20 11:41:12.675 +08:00] [INF] Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2023-11-20 11:41:12.675 +08:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -init_hw_device vaapi=va:/dev/dri/renderD128,driver=iHD -filter_hw_device va -autorotate 0 -i \"http://localhost:8866/live?recording=862\" -map_metadata -1 -map_chapters -1 -threads 0 -sn -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_base_url \"hls/e547d0b36624fa05a3283bb2f8f62a10/\" -hls_segment_filename \"/var/lib/jellyfin/transcodes/e547d0b36624fa05a3283bb2f8f62a10%d.ts\" -hls_playlist_type event -hls_list_size 0 -y \"/var/lib/jellyfin/transcodes/e547d0b36624fa05a3283bb2f8f62a10.m3u8\""
[2023-11-20 11:41:12.711 +08:00] [ERR] FFmpeg exited with code 1
[2023-11-20 11:41:12.800 +08:00] [ERR] Error processing request. URL "GET" "/videos/a0504666-0a0f-58c5-058c-2c14b3ad5f90/live.m3u8".
MediaBrowser.Common.FfmpegException: FFmpeg exited with code 1
if I enable Unauthenticated Access "Allow unauthenticated access for streaming Live TV / Recordings", I got 500 Error in ffmpeg:
Code:
......
[http @ 0x560756717840] HTTP error 500 Internal Server Error
http://localhost:8866/live?recording=862: Server returned 5XX Server Error reply
Log in NextPVR. I don't understand what this error " Unexpected error streaming recording: System.Collections.Generic.KeyNotFoundException: The given key 'sid' was not present in the dictionary." means and how to fix it.
Code:
2023-11-20 11:49:04.660 [DEBUG][53] Got request [127.0.0.1]: /live
2023-11-20 11:49:04.660 [DEBUG][53] /live?recording=862
2023-11-20 11:49:04.660 [DEBUG][53] - recording: 862
2023-11-20 11:49:04.660 [DEBUG][53] range: bytes=0-
2023-11-20 11:49:04.660 [DEBUG][53] StreamNative@1..
2023-11-20 11:49:04.660 [DEBUG][53] StreamNative@2
2023-11-20 11:49:04.660 [DEBUG][53] StreamNative@3
2023-11-20 11:49:04.660 [DEBUG][53] StreamNative@4
2023-11-20 11:49:04.660 [DEBUG][53] RollingFile.Open(/home/libot/recordings/Live Curling European Championships/Live Curling European Championships_20231119_22000100.ts) ..
2023-11-20 11:49:04.660 [DEBUG][53] About to stream recording: /home/libot/recordings/Live Curling European Championships/Live Curling European Championships_20231119_22000100.ts
2023-11-20 11:49:04.660 [DEBUG][53] Request had range request
2023-11-20 11:49:04.660 [DEBUG][53] Requested Range: 0- (8143404084 bytes)
2023-11-20 11:49:04.661 [ERROR][53] Unexpected error streaming recording: System.Collections.Generic.KeyNotFoundException: The given key 'sid' was not present in the dictionary.
at NShared.Streaming.StreamingHelper.StreamNativeRecording(ServiceResponseStream responseStream, Dictionary`2 parameters)
In Jellyfin it shows ffmpeg exit 1 as before.
Code:
[2023-11-20 11:49:05.065 +08:00] [ERR] FFmpeg exited with code 1
[2023-11-20 11:49:05.161 +08:00] [ERR] Error processing request. URL "GET" "/videos/a0504666-0a0f-58c5-058c-2c14b3ad5f90/live.m3u8".
MediaBrowser.Common.FfmpegException: FFmpeg exited with code 1
I can't see where Jellyfin plugins use PIN to autherize, but unautherized stream does not work either.