honue / MoviePilot-Plugins

MoviePilot插件库
GNU General Public License v3.0
78 stars 17 forks source link

文件编码问题导致播放 strm 文件失败 #26

Open Logthm opened 5 months ago

Logthm commented 5 months ago

问题

使用 emby 播放 strm 文件失败,显示如下:

IMG_4050

emby 装在 winserver2022 上,代理走的 openwrt。测试了直接用浏览器打开strm文件内的内容可以下载到mp4,应该没有网络问题。

看了下日志似乎文件名显示为乱码了,估计是 windows 默认GBK编码导致的问题,不知道生成文件时能不能直接指定文件编码?

尝试

播放纯英文标题的 strm 文件,成功:

2024-04-24 20:23:10.877 Info HttpClient: GET https://aniopen.an-i.workers.dev/2024-4/[ANi] THE NEW GATE - 01 [1080P][Baha][WEB-DL][AAC AVC][CHT].mp4?d=true

尝试启用 windows 区域设置中的 utf-8 支持,但播放含中文字符的 strm 文件仍然乱码。

日志

切换 utf-8 前

2024-04-24 19:48:39.132 Info App: User policy for Logs. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
2024-04-24 19:48:39.132 Info SessionManager: Removing playSession d0c8cd2bd9b0457498208871d1134eb3 from session e62da3a033bc11e3814ad05729da3772
2024-04-24 19:48:39.133 Info SessionManager: Adding playSession 05dbd0d027ab49ddb7b235d58a979e94 to session e62da3a033bc11e3814ad05729da3772
2024-04-24 19:48:39.133 Info Server: http/1.1 Response 200 to 10.0.0.2. Time: 4469ms. POST http://10.0.0.2:8096/emby/Items/43749/PlaybackInfo?UserId=9d7196aac55b46afb8a7153bcaf5e1b5&StartTimeTicks=0&IsPlayback=true&AutoOpenLiveStream=true&SubtitleStreamIndex=-1&EnableDirectPlay=false&EnableDirectStream=false&AllowVideoStreamCopy=false&AllowAudioStreamCopy=false&MediaSourceId=477d6672cd408d43a30016372cd363a2&MaxStreamingBitrate=160000000&CurrentPlaySessionId=d0c8cd2bd9b0457498208871d1134eb3&X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome Windows&X-Emby-Device-Id=25a2d7e8-fd44-43b6-94c7-2cec19675cb4&X-Emby-Client-Version=4.8.5.0&X-Emby-Token=x_secret1_x&X-Emby-Language=zh-cn&reqformat=json
2024-04-24 19:48:39.135 Info Server: http/1.1 POST http://10.0.0.2:8096/emby/Videos/ActiveEncodings/Delete?deviceId=25a2d7e8-fd44-43b6-94c7-2cec19675cb4&PlaySessionId=d0c8cd2bd9b0457498208871d1134eb3&X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome Windows&X-Emby-Device-Id=25a2d7e8-fd44-43b6-94c7-2cec19675cb4&X-Emby-Client-Version=4.8.5.0&X-Emby-Token=x_secret1_x&X-Emby-Language=zh-cn. Accept=*/*, Connection=keep-alive, Host=host3, User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36, Accept-Encoding=gzip, deflate, Accept-Language=zh,en;q=0.9,zh-CN;q=0.8, Origin=host5, Referer=host4, Content-Length=0
2024-04-24 19:48:39.135 Info Server: http/1.1 Response 204 to 10.0.0.2. Time: 1ms. POST http://10.0.0.2:8096/emby/Videos/ActiveEncodings/Delete?deviceId=25a2d7e8-fd44-43b6-94c7-2cec19675cb4&PlaySessionId=d0c8cd2bd9b0457498208871d1134eb3&X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome Windows&X-Emby-Device-Id=25a2d7e8-fd44-43b6-94c7-2cec19675cb4&X-Emby-Client-Version=4.8.5.0&X-Emby-Token=x_secret1_x&X-Emby-Language=zh-cn
2024-04-24 19:48:39.139 Info Server: http/1.1 GET http://10.0.0.2:8096/emby/videos/43749/master.m3u8?DeviceId=25a2d7e8-fd44-43b6-94c7-2cec19675cb4&MediaSourceId=477d6672cd408d43a30016372cd363a2&PlaySessionId=05dbd0d027ab49ddb7b235d58a979e94&api_key=x_secret1_x&VideoCodec=h264,h265,hevc,av1&VideoBitrate=160000000&MaxWidth=3840&TranscodingMaxAudioChannels=2&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&SubtitleStreamIndexes=-1&ManifestSubtitles=vtt&h264-profile=high,main,baseline,constrainedbaseline,high10&h264-level=62&hevc-codectag=hvc1,hev1,hevc,hdmv&TranscodeReasons=ContainerNotSupported,DirectPlayError&allowVideoStreamCopy=false&allowAudioStreamCopy=false. Accept=*/*, Connection=keep-alive, Host=host3, User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36, Accept-Encoding=gzip, deflate, Accept-Language=zh,en;q=0.9,zh-CN;q=0.8, Referer=host4
2024-04-24 19:48:39.143 Info MediaProbeManager: ProcessRun 'ffprobe' Execute: C:\Users\Administrator\AppData\Roaming\Emby-Server\system\ffprobe.exe -i "https://aniopen.an-i.workers.dev/2024-4/[ANi] ǡ�缚�Z��đٸ� - 01 [1080P][Baha][WEB-DL][AAC AVC][CHT].mp4?d=true" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data
2024-04-24 19:48:41.407 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 0 - Succeeded
2024-04-24 19:48:41.408 Error App: Error in ffprobe
*** Error Report ***
Version: 4.8.5.0
Command line: C:\Users\Administrator\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
Operating system: Microsoft Windows 10.0.20348
Framework: .NET 6.0.29
OS/Process: x64/x64
Runtime: C:/Users/Administrator/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
Processor count: 36
Data path: C:\Users\Administrator\AppData\Roaming\Emby-Server\programdata
Application path: C:\Users\Administrator\AppData\Roaming\Emby-Server\system
Emby.Server.MediaEncoding.Unified.Ffmpeg.FfRunException: Emby.Server.MediaEncoding.Unified.Ffmpeg.FfRunException: ffprobe failed - streams and format are both null: -i "https://aniopen.an-i.workers.dev/2024-4/[ANi] ǡ�缚�Z��đٸ� - 01 [1080P][Baha][WEB-DL][AAC AVC][CHT].mp4?d=true" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data
ffprobe version 5.1-emby_2023_06_25 Copyright (c) 2007-2022 the FFmpeg developers and softworkz for Emby LLC
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
[https @ 000001f7557264c0] HTTP error 404 Not Found
https://aniopen.an-i.workers.dev/2024-4/[ANi] 恰锟界細锟絑锟斤拷膽俑锟?- 01 [1080P][Baha][WEB-DL][AAC AVC][CHT].mp4?d=true: Server returned 404 Not Found

切换为 utf-8 后(还是寄

2024-04-24 20:18:15.145 Info Server: http/1.1 Response 500 to host2. Time: 10310ms. GET http://host1/emby/videos/43811/live.m3u8?DeviceId=8251e27c-af56-440b-8dd4-63844cfdf1a0&MediaSourceId=b052cf0ab739f094df543a27e02b5eea&PlaySessionId=df687eee06634c2f80a3f1ed29e3bc77&api_key=x_secret1_x&VideoCodec=h264,h265,hevc,av1&VideoBitrate=160000000&MaxWidth=3840&TranscodingMaxAudioChannels=2&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&SubtitleStreamIndexes=-1&ManifestSubtitles=vtt&h264-profile=high,main,baseline,constrainedbaseline,high10&h264-level=62&hevc-codectag=hvc1,hev1,hevc,hdmv&TranscodeReasons=ContainerNotSupported,DirectPlayError&allowVideoStreamCopy=false
2024-04-24 20:18:15.154 Info Server: http/1.1 POST http://host1/emby/Videos/ActiveEncodings/Delete?deviceId=8251e27c-af56-440b-8dd4-63844cfdf1a0&PlaySessionId=2d98591fe832455ea8de1e2741202474&X-Emby-Client=Emby Web&X-Emby-Device-Name=Google Chrome Windows&X-Emby-Device-Id=8251e27c-af56-440b-8dd4-63844cfdf1a0&X-Emby-Client-Version=4.8.5.0&X-Emby-Token=x_secret1_x&X-Emby-Language=zh-cn. Accept=*/*, Host=host1, User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36, Accept-Encoding=gzip, deflate, br, zstd, Accept-Language=zh,en;q=0.9,zh-CN;q=0.8, Origin=host5, Referer=host3, Content-Length=0, Sec-Ch-Ua="Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123", Sec-Ch-Ua-Mobile=?0, Sec-Ch-Ua-Platform="Windows", Sec-Fetch-Dest=empty, Sec-Fetch-Mode=cors, Sec-Fetch-Site=same-origin, X-Forwarded-For=host4, X-Forwarded-Host=host1, X-Forwarded-Port=443, X-Forwarded-Proto=https, X-Forwarded-Ssl=on, X-Original-Uri=/emby/Videos/ActiveEncodings/Delete?deviceId=8251e27c-af56-440b-8dd4-63844cfdf1a0&PlaySessionId=2d98591fe832455ea8de1e2741202474&X-Emby-Client=Emby+Web&X-Emby-Device-Name=Google+Chrome+Windows&X-Emby-Device-Id=8251e27c-af56-440b-8dd4-63844cfdf1a0&X-Emby-Client-Version=4.8.5.0&X-Emby-Token=77f56d21193c4d6bada2746f8d486f9f&X-Emby-Language=zh-cn, X-Real-Ip=host2
2024-04-24 20:18:15.154 Info Server: http/1.1 Response 204 to host2. Time: 1ms. POST http://host1/emby/Videos/ActiveEncodings/Delete?deviceId=8251e27c-af56-440b-8dd4-63844cfdf1a0&PlaySessionId=2d98591fe832455ea8de1e2741202474&X-Emby-Client=Emby Web&X-Emby-Device-Name=Google Chrome Windows&X-Emby-Device-Id=8251e27c-af56-440b-8dd4-63844cfdf1a0&X-Emby-Client-Version=4.8.5.0&X-Emby-Token=x_secret1_x&X-Emby-Language=zh-cn
2024-04-24 20:18:15.154 Info Server: http/1.1 POST http://host1/emby/Items/43811/PlaybackInfo?UserId=9d7196aac55b46afb8a7153bcaf5e1b5&StartTimeTicks=0&IsPlayback=true&AutoOpenLiveStream=true&SubtitleStreamIndex=-1&EnableDirectPlay=false&EnableDirectStream=false&AllowVideoStreamCopy=false&AllowAudioStreamCopy=false&MediaSourceId=b052cf0ab739f094df543a27e02b5eea&MaxStreamingBitrate=160000000&CurrentPlaySessionId=df687eee06634c2f80a3f1ed29e3bc77&X-Emby-Client=Emby Web&X-Emby-Device-Name=Google Chrome Windows&X-Emby-Device-Id=8251e27c-af56-440b-8dd4-63844cfdf1a0&X-Emby-Client-Version=4.8.5.0&X-Emby-Token=x_secret1_x&X-Emby-Language=zh-cn&reqformat=json. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
2024-04-24 20:18:15.160 Info MediaProbeManager: ProcessRun 'ffprobe' Execute: C:\Users\Administrator\AppData\Roaming\Emby-Server\system\ffprobe.exe -i "https://aniopen.an-i.workers.dev/2024-4/[ANi] ��푰ɣ��ϵ���̖ ���������H�޸۰�̨�؅^�� - 01 [1080P][Bilibili][WEB-DL][AAC AVC][CHT CHS].vtt?d=true" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data
2024-04-24 20:18:17.591 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 0 - Succeeded
2024-04-24 20:18:17.592 Error App: Error in ffprobe
*** Error Report ***
Version: 4.8.5.0
Command line: C:\Users\Administrator\AppData\Roaming\Emby-Server\system\EmbyServer.dll
Operating system: Microsoft Windows 10.0.20348
Framework: .NET 6.0.29
OS/Process: x64/x64
Runtime: C:/Users/Administrator/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
Processor count: 36
Data path: C:\Users\Administrator\AppData\Roaming\Emby-Server\programdata
Application path: C:\Users\Administrator\AppData\Roaming\Emby-Server\system
Emby.Server.MediaEncoding.Unified.Ffmpeg.FfRunException: Emby.Server.MediaEncoding.Unified.Ffmpeg.FfRunException: ffprobe failed - streams and format are both null: -i "https://aniopen.an-i.workers.dev/2024-4/[ANi] ��푰ɣ��ϵ���̖ ���������H�޸۰�̨�؅^�� - 01 [1080P][Bilibili][WEB-DL][AAC AVC][CHT CHS].vtt?d=true" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data
ffprobe version 5.1-emby_2023_06_25 Copyright (c) 2007-2022 the FFmpeg developers and softworkz for Emby LLC
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
[https @ 0000012a6758c540] HTTP error 404 Not Found
https://aniopen.an-i.workers.dev/2024-4/[ANi] ��푰ɣ��ϵ���̖ ���������H�޸۰�̨�؅^�� - 01 [1080P][Bilibili][WEB-DL][AAC AVC][CHT CHS].vtt?d=true: Server returned 404 Not Found
Logthm commented 5 months ago

发现之前使用 GBK 编码时,插件生成的 strm 文件内容本身就是乱码的,使用 utf-8 之后重新生成就正常了。

不知道生成时能否支持 GBK 编码,winserver 在 utf-8 下面运行有一些软件会出现问题。