bpking1 / embyExternalUrl

some emby/jellyfin scripts
MIT License
801 stars 138 forks source link

embyTV for andriod v2.1.16g部分视频直链黑屏仅有声音 #426

Open syq0806 opened 2 days ago

syq0806 commented 2 days ago

客户端:Emby for Android TV v2.1.16g 链接:https://t.me/SaltSoupGarage/696 问题:部分视频如白夜追凶第一季,格式4K HEVC,播放黑屏,只有声音,可以复现,其他视频无问题,切回8096端口无问题,手机客户端无问题 烦请帮忙排查下到底什么原因 log: 2024/11/24 15:08:46 [warn] 22#22: 1401 js: try to fetch alist path from /115/影视/电视剧/白夜追凶 (2017)/Season 1/白夜追凶 - S01E09 - 2160p.mp4 2024/11/24 15:08:46 [warn] 22#22: 1401 js: fetchAlistPathApi add Host: 172.17.0.1:5244 2024/11/24 15:08:46 [warn] 22#22: 1401 js: redirect to: https://cdnfhnfile.115.com/xxx 2024/11/24 15:08:46 [warn] 22#22: 1401 js: routeL1Dict add: [/emby/videos/1004795/stream.mp4:ab3ebe208167d345e179dee69f378b4e:Emby/2.1.16g (Linux;Android 11) ExoPlayerLib/2.18.7] : [https://cdnfhnfile.115.com/xxx] 2024/11/24 15:08:46 [warn] 22#22: 1401 js: === redirect2Pan: /emby/videos/1004795/stream.mp4, the NJS VM is destroyed === 2024/11/24 15:08:47 [warn] 22#22: 1401 js: redirect2Pan, UA: Emby/2.1.16g (Linux;Android 11) ExoPlayerLib/2.18.7 2024/11/24 15:08:47 [warn] 22#22: 1401 js: hit cache routeL1Dict: https://cdnfhnfile.115.com/xxx 2024/11/24 15:08:47 [warn] 22#22: 1401 js: redirect to: https://cdnfhnfile.115.com/xxxx 2024/11/24 15:08:47 [warn] 22#22: 1401 js: === redirect2Pan: /emby/videos/1004795/stream.mp4, the NJS VM is destroyed === 2024/11/24 15:08:48 [warn] 22#22: 1401 js: redirect2Pan, UA: Emby/2.1.16g (Linux;Android 11) ExoPlayerLib/2.18.7 2024/11/24 15:08:48 [warn] 22#22: 1401 js: hit cache routeL1Dict: https://cdnfhnfile.115.com/xxxx 2024/11/24 15:08:48 [warn] 22#22: 1401 js: redirect to: https://cdnfhnfile.115.com/xxxx 2024/11/24 15:08:48 [warn] 22#22: 1401 js: === redirect2Pan: /emby/videos/1004795/stream.mp4, the NJS VM is destroyed === 2024/11/24 15:09:15 [notice] 23#23: 1317 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000198, client: 192.168.1.188, server: default, request: "POST /emby/Items/1004795/PlaybackInfo?format=json HTTP/1.1", host: "192.168.1.2:8091" 2024/11/24 15:09:15 [warn] 23#23: 1317 js: playbackinfo proxy uri: /proxy/emby/Items/1004795/PlaybackInfo 2024/11/24 15:09:15 [warn] 23#23: 1317 js: playbackinfo proxy query string: format=json 2024/11/24 15:09:15 [warn] 23#23: 1317 js: origin playbackinfo: {"MediaSources":[{"Protocol":"File","Id":"ab3ebe208167d345e179dee69f378b4e","Path":"/clouddrive/115/影视/电视剧/白夜追凶 (2017)/Season 1/白夜追凶 - S01E09 - 2160p.mp4","Type":"Default","Container":"mp4","Size":9090884452,"Name":"白夜追凶 - S01E09 - 2160p","IsRemote":false,"HasMixedProtocols":false,"RunTimeTicks":28843830000,"SupportsTranscoding":true,"SupportsDirectStream":false,"SupportsDirectPlay":false,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"RequiresLooping":false,"SupportsProbing":false,"MediaStreams":[{"Codec":"hevc","CodecTag":"hev1","Language":"und","ColorTransfer":"bt709","ColorPrimaries":"bt709","ColorSpace":"bt709","TimeBase":"1/90000","VideoRange":"SDR","DisplayTitle":"4K HEVC","IsInterlaced":false,"BitRate":25009002,"BitDepth":10,"RefFrames":1,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":1746,"Width":4096,"AverageFrameRate":60,"RealFrameRate":60,"Profile":"Main 10","Type":"Video","AspectRatio":"2048:873","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Protocol":"File","PixelFormat":"yuv420p10le","Level":183,"ExtendedVideoType":"None","ExtendedVideoSubType":"None","ExtendedVideoSubTypeDescription":"None","AttachmentSize":0},{"Codec":"aac","CodecTag":"mp4a","Language":"und","TimeBase":"1/44100","DisplayTitle":"AAC stereo (默认)","IsInterlaced":false,"ChannelLayout":"stereo","BitRate":189588,"Channels":2,"SampleRate":44100,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Profile":"LC","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Protocol":"File","ExtendedVideoType":"None","ExtendedVideoSubType":"None","ExtendedVideoSubTypeDescription":"None","AttachmentSize":0}],"Formats":[],"Bitrate":25214084,"RequiredHttpHeaders":{},"DirectStreamUrl":"/videos/1004795/master.m3u8?DeviceId=0d8541edfbb8904f&MediaSourceId=ab3ebe208167d345e179dee69f378b4e&PlaySessionId=26 2024/11/24 15:09:15 [warn] 23#23: 1317 js: modify direct play supports all true 2024/11/24 15:09:15 [warn] 23#23: 1317 js: modify direct play info 2024/11/24 15:09:15 [warn] 23#23: 1317 js: 4ms, transfer playbackinfo: {"MediaSources":[{"Protocol":"File","Id":"ab3ebe208167d345e179dee69f378b4e","Path":"/clouddrive/115/影视/电视剧/白夜追凶 (2017)/Season 1/白夜追凶 - S01E09 - 2160p.mp4","Type":"Default","Container":"mp4","Size":9090884452,"Name":"白夜追凶 - S01E09 - 2160p","IsRemote":false,"HasMixedProtocols":false,"RunTimeTicks":28843830000,"SupportsTranscoding":false,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"RequiresLooping":false,"SupportsProbing":false,"MediaStreams":[{"Codec":"hevc","CodecTag":"hev1","Language":"und","ColorTransfer":"bt709","ColorPrimaries":"bt709","ColorSpace":"bt709","TimeBase":"1/90000","VideoRange":"SDR","DisplayTitle":"4K HEVC","IsInterlaced":false,"BitRate":25009002,"BitDepth":10,"RefFrames":1,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":1746,"Width":4096,"AverageFrameRate":60,"RealFrameRate":60,"Profile":"Main 10","Type":"Video","AspectRatio":"2048:873","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Protocol":"File","PixelFormat":"yuv420p10le","Level":183,"ExtendedVideoType":"None","ExtendedVideoSubType":"None","ExtendedVideoSubTypeDescription":"None","AttachmentSize":0},{"Codec":"aac","CodecTag":"mp4a","Language":"und","TimeBase":"1/44100","DisplayTitle":"AAC stereo (默认)","IsInterlaced":false,"ChannelLayout":"stereo","BitRate":189588,"Channels":2,"SampleRate":44100,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Profile":"LC","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Protocol":"File","ExtendedVideoType":"None","ExtendedVideoSubType":"None","ExtendedVideoSubTypeDescription":"None","AttachmentSize":0}],"Formats":[],"Bitrate":25214084,"RequiredHttpHeaders":{},"DirectStreamUrl":"/videos/1004795/stream.mp4?format=json&api_key=xxxxx&MediaSourceId=ab3ebe208167d345e 2024/11/24 15:09:15 [warn] 23#23: *1317 js: === transferPlaybackInfo: /emby/Items/1004795/PlaybackInfo, the NJS VM is destroyed === 脚本为最新版

syq0806 commented 2 days ago

https://115.com/s/swhi6vh33e3?password=g992# 白夜追凶 (2017) 访问码:g992 这是出问题的视频格式,白夜追凶,第一季

chen3861229 commented 14 hours ago

因为脚本默认禁用了转码功能,官方的Emby for Android TV看来部分高级的视频编码格式/色彩空间支持也不是太好,开启服务端允许转码后,将交给原始 emby 实时转码处理(中转流量),与直链是互斥的行为, 配置项位于emby2Alist\nginx\conf.d\config\constant-transcode.jstranscodeConfig.enable = true

// 转码配置,默认 false,将按之前逻辑禁止转码处理并移除转码选项参数,与服务端允许转码配置有相关性
const transcodeConfig = {
  enable: true, // 此大多数情况下为允许转码的总开关
  ...
}