NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 … 8 9 10 11 12 … 37 Next »
Nextpvr unaccessable from Jellyfin with 401 error

 
  • 0 Vote(s) - 0 Average
Nextpvr unaccessable from Jellyfin with 401 error
Simonzzzz
Offline

Junior Member

China
Posts: 4
Threads: 1
Joined: Nov 2023
#1
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:

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.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 56,717
Threads: 996
Joined: May 2006
#2
2023-11-20, 04:07 AM (This post was last modified: 2023-11-20, 04:18 AM by mvallevand.)
https://forums.nextpvr.com/showthread.ph...#pid564960 explains this.  If you run on the same PC Jellyfin would use the filesystem if you enable it.

I can't explain the second error without zipped log but I would turn off thumb generation in both NextPVR as a start. Most of those snippets are because of unauthorized access.

Martin
Simonzzzz
Offline

Junior Member

China
Posts: 4
Threads: 1
Joined: Nov 2023
#3
2023-11-20, 04:41 AM
(2023-11-20, 04:07 AM)mvallevand Wrote: https://forums.nextpvr.com/showthread.ph...#pid564960 explains this.  If you run on the same PC Jellyfin would use the filesystem if you enable it.

I can't explain the second error without zipped log but I would turn off thumb generation in both NextPVR as a start.  Most of those snippets are because of unauthorized access.

Martin

Thanks for replying. I enable unauthorized access and Here is zipped log. How can I turn off thumb generation?


Attached Files
.zip   logs-20231120-1235.zip (Size: 286.98 KB / Downloads: 1)
Simonzzzz
Offline

Junior Member

China
Posts: 4
Threads: 1
Joined: Nov 2023
#4
2023-11-20, 06:20 AM
I set "Generate Thumbnail" to None in General and it still return 500 in ffmpeg.


Attached Files
.zip   logs-20231120-1417.zip (Size: 67.4 KB / Downloads: 1)
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 56,717
Threads: 996
Joined: May 2006
#5
2023-11-20, 08:13 AM
Testing with curl this appears to be a bug in NextPVR as it checks for sid parameter which doesn't have to be valid. As I noted you need to configure the addon for Direct Play in Jellyfin's addon settings and it will use the filesystem for playback.

You have quite a few other issues, no network on startup and you need to configure a valid Live TV buffer.

Martin
Simonzzzz
Offline

Junior Member

China
Posts: 4
Threads: 1
Joined: Nov 2023
#6
2023-11-20, 10:28 AM
(2023-11-20, 08:13 AM)mvallevand Wrote: Testing with curl this appears to be a bug in NextPVR as it checks for sid parameter which doesn't have to be valid.  As I noted you need to configure the addon for Direct Play in Jellyfin's addon settings and it will use the filesystem for playback.

You have quite a few other issues, no network on startup and you need to configure a valid Live TV buffer.

Martin

It works using filesystem. Thanks for your help!
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Can't update NextPVR to latest version. RAK 1 221 2026-08-06, 12:07 PM
Last Post: mvallevand
  nextpvr version 7.1 issues jnowski 4 378 2026-08-01, 12:30 AM
Last Post: jnowski
  Can't install new NextPVR verion 7.1.0 RAK 3 480 2026-06-18, 08:24 PM
Last Post: mvallevand
  NextPVR refuses to start ballfam 3 616 2026-02-27, 03:16 PM
Last Post: ballfam
  Migrated to new server, now nextpvr cant find recordings WagMan 7 986 2026-02-26, 01:45 AM
Last Post: WagMan
  NextPVR server EPG problem on LibreElec jcjefferies 35 4,003 2025-12-02, 04:47 PM
Last Post: jcjefferies
  Schedules Direct "Server offline for maintenance" error WagMan 1 593 2025-11-30, 01:41 AM
Last Post: jimil
  NextTool merge error Jack_Burton505 60 5,422 2025-10-23, 08:53 PM
Last Post: mvallevand
  NextPVR v7 Not retaining established SD source on EPG sources page acadng 12 2,812 2025-09-27, 01:50 AM
Last Post: acadng
  LibreElec NextPVR Server problem jcjefferies 9 2,409 2025-09-23, 04:31 PM
Last Post: jcjefferies

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode