softworkz 3326 Posted December 11, 2020 Share Posted December 11, 2020 I would wait a bit until this is confirmed to be working all the way and in all details. For ffprobe and ffmpeg I have no doubt, but as the docs say, not all Windows APIs are supporting this and there's also a risk that at some point in the code, those kind of paths could (incorrectly) be considered to be UNC paths. Link to comment Share on other sites More sharing options...
Carlo 4330 Posted December 11, 2020 Share Posted December 11, 2020 18 minutes ago, rbjtech said: Thanks @softworkz - that is useful to know. @cayars - this might be useful to be included in the wiki somewhere - perhaps in the library setup section ? I added a note about this on the Library setup page in the Knowledge Base. 1 Link to comment Share on other sites More sharing options...
pmac 132 Posted December 12, 2020 Share Posted December 12, 2020 @letterman, just out of curiosity would you mind posting an example of one of your long paths? Link to comment Share on other sites More sharing options...
letterman 33 Posted December 16, 2020 Author Share Posted December 16, 2020 (edited) I use WIN 10, V2004, opt-in enabled long paths reg. MS docs I read the Information from microsoft, but it does not help solving our problem. I double-checked it again. I always use UNC-Pathes. And the FFPROBE problem appears when the path incl. filename exceeds 259 characters. No ifs and buts. Emby is NOT THE PROBLEM. Generelly Emby works fine with long paths >259. The API seems to be fine. But it uses FFPROBE to collect the information about the files. And FFPROBE does not work >259. An error code is generated. Maybe your windows-versions work different. Mine not. I shortend all paths. To make this shorting easy I coded an action with MP3TAG, which counts the characters and shortens the path. Not too bad, but better would be an update of ffprobe. @pmac You don't need to see the path. I created test paths for this operation like \\Audiobooks\Folder1Folder1Folder1Folder1Folder1\Folder2Folder2Folder2Folder2\Folder3 very long Folder3 very long Folder3 very long Folder3 very long Folder3 very long Folder3 very long Folder3 very long Folder3 very long Folder3 very long Folder\test.mp3 Little by little I reduced the path until FFPROBE does not generate an error code (259)@cayarsThanks for the note. Edited December 16, 2020 by letterman 1 Link to comment Share on other sites More sharing options...
softworkz 3326 Posted December 16, 2020 Share Posted December 16, 2020 2 hours ago, letterman said: I read the Information from microsoft, but it does not help solving our problem. I double-checked it again. I always use UNC-Pathes Seems you haven't read carefully enough. UNC paths need to be prefixed as well in a way like this: \\?\UNC\server\share Example: \\mystorageserver\libraries\music ==>> \\?\UNC\mystorageserver\libraries\music 1 Link to comment Share on other sites More sharing options...
softworkz 3326 Posted December 21, 2020 Share Posted December 21, 2020 @letterman - Did you try, does it work for you like that? Link to comment Share on other sites More sharing options...
pmac 132 Posted December 22, 2020 Share Posted December 22, 2020 (edited) @letterman, I understand that it's not working with the long paths (even test paths), I was just curious to see an example because I didn't understand what the real-world application of such long paths were. I get that it's your chosen file organization structure; I was just asking out of curiosity what a real-world example would look like, since I've never seen the need for such folder structure. Edited December 22, 2020 by pmac Link to comment Share on other sites More sharing options...
azuse 2 Posted May 11, 2022 Share Posted May 11, 2022 Incase any one encountered the same problem There is a patched version of ffmpeg/ffprobe that support long path on windows https://github.com/yt-dlp/FFmpeg-Builds/releases I test ok with https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-n5.0-latest-win64-gpl-shared-5.0.zip You can find more information here: https://trac.ffmpeg.org/ticket/8885 1 Link to comment Share on other sites More sharing options...
softworkz 3326 Posted May 11, 2022 Share Posted May 11, 2022 I don't recommend using this because this way, you'll lose a lot of specific capabilities of the Emby custom ffmpeg. Also, please don't ask for support when using a different ffmpeg version. I recommend the approach described above instead. Link to comment Share on other sites More sharing options...
azuse 2 Posted May 11, 2022 Share Posted May 11, 2022 13 hours ago, softworkz said: I don't recommend using this because this way, you'll lose a lot of specific capabilities of the Emby custom ffmpeg. Also, please don't ask for support when using a different ffmpeg version. I recommend the approach described above instead. Understand. In that case maybe you can include these patches to the Emby ffmpeg oneday, problem would be easily fixed. [FFmpeg-devel] [PATCH v11 1/6] libavutil/wchar_filename.h: Add whcartoutf8, wchartoansi and utf8toansi Nil Admirari [FFmpeg-devel] [PATCH v11 2/6] libavformat/avisynth.c: Remove MAX_PATH limit Nil Admirari [FFmpeg-devel] [PATCH v11 3/6] compat/w32dlfcn.h: Remove MAX_PATH limit and replace LoadLibraryExA with LoadLibraryExW Nil Admirari [FFmpeg-devel] [PATCH v11 4/6] fftools/cmdutils.c: Remove MAX_PATH limit Nil Admirari [FFmpeg-devel] [PATCH v11 5/6] fftools: Enable long path support on Windows (fixes #8885) Nil Admirari [FFmpeg-devel] [PATCH v11 6/6] fftools: Set active code page to UTF-8 on Windows Nil Admirari' source: https://ffmpeg.org/pipermail/ffmpeg-devel/2022-April/date.html#295569 1 Link to comment Share on other sites More sharing options...
softworkz 3326 Posted May 11, 2022 Share Posted May 11, 2022 1 hour ago, azuse said: Understand. In that case maybe you can include these patches to the Emby ffmpeg oneday, problem would be easily fixed. [FFmpeg-devel] [PATCH v11 1/6] libavutil/wchar_filename.h: Add whcartoutf8, wchartoansi and utf8toansi Nil Admirari [FFmpeg-devel] [PATCH v11 2/6] libavformat/avisynth.c: Remove MAX_PATH limit Nil Admirari [FFmpeg-devel] [PATCH v11 3/6] compat/w32dlfcn.h: Remove MAX_PATH limit and replace LoadLibraryExA with LoadLibraryExW Nil Admirari [FFmpeg-devel] [PATCH v11 4/6] fftools/cmdutils.c: Remove MAX_PATH limit Nil Admirari [FFmpeg-devel] [PATCH v11 5/6] fftools: Enable long path support on Windows (fixes #8885) Nil Admirari [FFmpeg-devel] [PATCH v11 6/6] fftools: Set active code page to UTF-8 on Windows Nil Admirari' source: https://ffmpeg.org/pipermail/ffmpeg-devel/2022-April/date.html#295569 If you are following the ffmpeg mailing list, you can see that I'm proposing a different solution there. I will submit an appropriate patch when I get to it. 1 Link to comment Share on other sites More sharing options...
softworkz 3326 Posted May 11, 2022 Share Posted May 11, 2022 For now, the only solution is to prefix your library folders with \\?\ Link to comment Share on other sites More sharing options...
softworkz 3326 Posted May 14, 2022 Share Posted May 14, 2022 On 5/11/2022 at 10:13 PM, softworkz said: I will submit an appropriate patch when I get to it. It's done. Native long-path support has been added to Emby-ffmpeg. Unlike with the quoted patchset above: it is not limited to newer Windows versions it doesn't require any registry changes it doesn't require UAC elevation to install (because no OS-level changes are required) It won't be included in the 4.7.0 release (not enough time) but it will hit the beta channel shortly after the release. 1 Link to comment Share on other sites More sharing options...
Carlo 4330 Posted May 15, 2022 Share Posted May 15, 2022 Wow, nice. Still kind of sucks people have file names that long they need to manage. Link to comment Share on other sites More sharing options...
dicion 2 Posted December 7, 2022 Share Posted December 7, 2022 (edited) On 5/14/2022 at 5:54 AM, softworkz said: It's done. Native long-path support has been added to Emby-ffmpeg. Unlike with the quoted patchset above: it is not limited to newer Windows versions it doesn't require any registry changes it doesn't require UAC elevation to install (because no OS-level changes are required) It won't be included in the 4.7.0 release (not enough time) but it will hit the beta channel shortly after the release. Is this in 4.7.10.0? Because I'm having this problem again today with long paths. I assure you, the file exists. The path below is 268 characters long. I shortened the file and directory name, and it started working fine after that. And Yes, I did test \\?\UNC\ip.add.re.ss\ on a smaller library, and it appears to work, but I'd rather not have to rescan in my larger libraries (which is absolutely had to rescan my small library after) if this is supposed to be fixed in ffprobe now, or shortly. 2022-12-07 15:09:40.500 Info MediaProbeManager: ProcessRun 'ffprobe' Execute: C:\Users\rt\AppData\Roaming\Emby-Server\system\ffprobe.exe -i file:"\\192.168.50.8\mainshare\mediashare\Animeshows\Cross Ange - Rondo of Angel and Dragon (2014) [tvdbid-284402]\Season 01\Cross Ange - Rondo of Angel and Dragon (2014) - S01E01 - 001 - The Fallen Imperial Princess [HDTV-1080p][10bit][x265][Opus 2.0][EN+JA]-Anime Time.mkv" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data 2022-12-07 15:09:40.524 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 1 - Failed 2022-12-07 15:09:40.531 Error App: Error in ffprobe *** Error Report *** Version: 4.7.10.0 Command line: C:\Users\rt\AppData\Roaming\Emby-Server\system\EmbyServer.dll Operating system: Microsoft Windows 10.0.19044 Framework: .NET 6.0.10 OS/Process: x64/x64 Runtime: C:/Users/rt/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll Processor count: 16 Data path: C:\Users\rt\AppData\Roaming\Emby-Server\programdata Application path: C:\Users\rt\AppData\Roaming\Emby-Server\system System.Exception: System.Exception: ffprobe failed for file:"\\192.168.50.8\mainshare\mediashare\Animeshows\Cross Ange - Rondo of Angel and Dragon (2014) [tvdbid-284402]\Season 01\Cross Ange - Rondo of Angel and Dragon (2014) - S01E01 - 001 - The Fallen Imperial Princess [HDTV-1080p][10bit][x265][Opus 2.0][EN+JA]-Anime Time.mkv" - streams and format are both null: { } ffprobe version 5.0.0-emby_2022_05_27-u1 Copyright (c) 2007-2022 the FFmpeg developers and softworkz for Emby LLC built with gcc 10.3.0 (Rev5, Built by MSYS2 project) file:\\192.168.50.8\mainshare\mediashare\Animeshows\Cross Ange - Rondo of Angel and Dragon (2014) [tvdbid-284402]\Season 01\Cross Ange - Rondo of Angel and Dragon (2014) - S01E01 - 001 - The Fallen Imperial Princess [HDTV-1080p][10bit][x265][Opus 2.0][EN+JA]-Anime Time.mkv: No such file or directory at Emby.Server.MediaEncoding.Probing.MediaProbeManager.GetMediaInfoInternal(String inputPath, String primaryPath, MediaProtocol protocol, String userAgent, Boolean extractChapters, String probeSizeArgument, Boolean isAudio, Boolean forceEnableLogging, CancellationToken cancellationToken) at Emby.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](MetadataResult`1 metadataResult, MetadataRefreshOptions options, LibraryOptions libraryOptions, CancellationToken cancellationToken) at Emby.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, MetadataResult`1 itemResult, String logName, MetadataRefreshOptions options, LibraryOptions libraryOptions, RefreshResult refreshResult, CancellationToken cancellationToken) Source: Emby.Server.MediaEncoding TargetSite: Void MoveNext() Edited December 7, 2022 by dicion Link to comment Share on other sites More sharing options...
Luke 37008 Posted December 8, 2022 Share Posted December 8, 2022 20 hours ago, dicion said: Is this in 4.7.10.0? Because I'm having this problem again today with long paths. I assure you, the file exists. The path below is 268 characters long. I shortened the file and directory name, and it started working fine after that. And Yes, I did test \\?\UNC\ip.add.re.ss\ on a smaller library, and it appears to work, but I'd rather not have to rescan in my larger libraries (which is absolutely had to rescan my small library after) if this is supposed to be fixed in ffprobe now, or shortly. 2022-12-07 15:09:40.500 Info MediaProbeManager: ProcessRun 'ffprobe' Execute: C:\Users\rt\AppData\Roaming\Emby-Server\system\ffprobe.exe -i file:"\\192.168.50.8\mainshare\mediashare\Animeshows\Cross Ange - Rondo of Angel and Dragon (2014) [tvdbid-284402]\Season 01\Cross Ange - Rondo of Angel and Dragon (2014) - S01E01 - 001 - The Fallen Imperial Princess [HDTV-1080p][10bit][x265][Opus 2.0][EN+JA]-Anime Time.mkv" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data 2022-12-07 15:09:40.524 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 1 - Failed 2022-12-07 15:09:40.531 Error App: Error in ffprobe *** Error Report *** Version: 4.7.10.0 Command line: C:\Users\rt\AppData\Roaming\Emby-Server\system\EmbyServer.dll Operating system: Microsoft Windows 10.0.19044 Framework: .NET 6.0.10 OS/Process: x64/x64 Runtime: C:/Users/rt/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll Processor count: 16 Data path: C:\Users\rt\AppData\Roaming\Emby-Server\programdata Application path: C:\Users\rt\AppData\Roaming\Emby-Server\system System.Exception: System.Exception: ffprobe failed for file:"\\192.168.50.8\mainshare\mediashare\Animeshows\Cross Ange - Rondo of Angel and Dragon (2014) [tvdbid-284402]\Season 01\Cross Ange - Rondo of Angel and Dragon (2014) - S01E01 - 001 - The Fallen Imperial Princess [HDTV-1080p][10bit][x265][Opus 2.0][EN+JA]-Anime Time.mkv" - streams and format are both null: { } ffprobe version 5.0.0-emby_2022_05_27-u1 Copyright (c) 2007-2022 the FFmpeg developers and softworkz for Emby LLC built with gcc 10.3.0 (Rev5, Built by MSYS2 project) file:\\192.168.50.8\mainshare\mediashare\Animeshows\Cross Ange - Rondo of Angel and Dragon (2014) [tvdbid-284402]\Season 01\Cross Ange - Rondo of Angel and Dragon (2014) - S01E01 - 001 - The Fallen Imperial Princess [HDTV-1080p][10bit][x265][Opus 2.0][EN+JA]-Anime Time.mkv: No such file or directory at Emby.Server.MediaEncoding.Probing.MediaProbeManager.GetMediaInfoInternal(String inputPath, String primaryPath, MediaProtocol protocol, String userAgent, Boolean extractChapters, String probeSizeArgument, Boolean isAudio, Boolean forceEnableLogging, CancellationToken cancellationToken) at Emby.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](MetadataResult`1 metadataResult, MetadataRefreshOptions options, LibraryOptions libraryOptions, CancellationToken cancellationToken) at Emby.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, MetadataResult`1 itemResult, String logName, MetadataRefreshOptions options, LibraryOptions libraryOptions, RefreshResult refreshResult, CancellationToken cancellationToken) Source: Emby.Server.MediaEncoding TargetSite: Void MoveNext() Is that on the same machine as the server? Link to comment Share on other sites More sharing options...
dicion 2 Posted December 8, 2022 Share Posted December 8, 2022 20 minutes ago, Luke said: Is that on the same machine as the server? No. Windows Server to Network share on Synology San Link to comment Share on other sites More sharing options...
Luke 37008 Posted December 8, 2022 Share Posted December 8, 2022 Can you reach that path in windows explorer? Link to comment Share on other sites More sharing options...
dicion 2 Posted December 8, 2022 Share Posted December 8, 2022 (edited) 1 hour ago, Luke said: Can you reach that path in windows explorer? Yes. This is logged on with the same user Emby is running as, as well, and again, simply shortening the filename fixes it. (I had to re-lengthten the filenames again to break it again as I had shortened them, and I tested and verified the FFProbe errors out on the exact below files again, new ffprobe run just now attached as well) Double-clicking the file plays it fine in VLC on the server Emby is running on, so it can access it just fine. 2022-12-08 14:03:12.159 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 1 - Failed 2022-12-08 14:03:12.160 Error App: Error in ffprobe *** Error Report *** Version: 4.7.10.0 Command line: C:\Users\rt\AppData\Roaming\Emby-Server\system\EmbyServer.dll Operating system: Microsoft Windows 10.0.19044 Framework: .NET 6.0.10 OS/Process: x64/x64 Runtime: C:/Users/rt/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll Processor count: 16 Data path: C:\Users\rt\AppData\Roaming\Emby-Server\programdata Application path: C:\Users\rt\AppData\Roaming\Emby-Server\system System.Exception: System.Exception: ffprobe failed for file:"\\192.168.50.8\mainshare\mediashare\Animeshows\Cross Ange - Rondo of Angel and Dragon (2014) [tvdbid-284402]\Season 01\Cross Ange - Rondo of Angel and Dragon (2014) - Cross Ange Rondo of Angel and Dragon - S01E02 - 002 [HDTV-1080p][10bit][x265][Opus 2.0][EN+JA]-Anime Time.mkv" - streams and format are both null: { } ffprobe version 5.0.0-emby_2022_05_27-u1 Copyright (c) 2007-2022 the FFmpeg developers and softworkz for Emby LLC built with gcc 10.3.0 (Rev5, Built by MSYS2 project) file:\\192.168.50.8\mainshare\mediashare\Animeshows\Cross Ange - Rondo of Angel and Dragon (2014) [tvdbid-284402]\Season 01\Cross Ange - Rondo of Angel and Dragon (2014) - Cross Ange Rondo of Angel and Dragon - S01E02 - 002 [HDTV-1080p][10bit][x265][Opus 2.0][EN+JA]-Anime Time.mkv: No such file or directory at Emby.Server.MediaEncoding.Probing.MediaProbeManager.GetMediaInfoInternal(String inputPath, String primaryPath, MediaProtocol protocol, String userAgent, Boolean extractChapters, String probeSizeArgument, Boolean isAudio, Boolean forceEnableLogging, CancellationToken cancellationToken) at Emby.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](MetadataResult`1 metadataResult, MetadataRefreshOptions options, LibraryOptions libraryOptions, CancellationToken cancellationToken) at Emby.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, MetadataResult`1 itemResult, String logName, MetadataRefreshOptions options, LibraryOptions libraryOptions, RefreshResult refreshResult, CancellationToken cancellationToken) Source: Emby.Server.MediaEncoding TargetSite: Void MoveNext() Edited December 8, 2022 by dicion Link to comment Share on other sites More sharing options...
Luke 37008 Posted December 8, 2022 Share Posted December 8, 2022 37 minutes ago, dicion said: Yes. This is logged on with the same user Emby is running as, as well, and again, simply shortening the filename fixes it. (I had to re-lengthten the filenames again to break it again as I had shortened them, and I tested and verified the FFProbe errors out on the exact below files again, new ffprobe run just now attached as well) Double-clicking the file plays it fine in VLC on the server Emby is running on, so it can access it just fine. 2022-12-08 14:03:12.159 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 1 - Failed 2022-12-08 14:03:12.160 Error App: Error in ffprobe *** Error Report *** Version: 4.7.10.0 Command line: C:\Users\rt\AppData\Roaming\Emby-Server\system\EmbyServer.dll Operating system: Microsoft Windows 10.0.19044 Framework: .NET 6.0.10 OS/Process: x64/x64 Runtime: C:/Users/rt/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll Processor count: 16 Data path: C:\Users\rt\AppData\Roaming\Emby-Server\programdata Application path: C:\Users\rt\AppData\Roaming\Emby-Server\system System.Exception: System.Exception: ffprobe failed for file:"\\192.168.50.8\mainshare\mediashare\Animeshows\Cross Ange - Rondo of Angel and Dragon (2014) [tvdbid-284402]\Season 01\Cross Ange - Rondo of Angel and Dragon (2014) - Cross Ange Rondo of Angel and Dragon - S01E02 - 002 [HDTV-1080p][10bit][x265][Opus 2.0][EN+JA]-Anime Time.mkv" - streams and format are both null: { } ffprobe version 5.0.0-emby_2022_05_27-u1 Copyright (c) 2007-2022 the FFmpeg developers and softworkz for Emby LLC built with gcc 10.3.0 (Rev5, Built by MSYS2 project) file:\\192.168.50.8\mainshare\mediashare\Animeshows\Cross Ange - Rondo of Angel and Dragon (2014) [tvdbid-284402]\Season 01\Cross Ange - Rondo of Angel and Dragon (2014) - Cross Ange Rondo of Angel and Dragon - S01E02 - 002 [HDTV-1080p][10bit][x265][Opus 2.0][EN+JA]-Anime Time.mkv: No such file or directory at Emby.Server.MediaEncoding.Probing.MediaProbeManager.GetMediaInfoInternal(String inputPath, String primaryPath, MediaProtocol protocol, String userAgent, Boolean extractChapters, String probeSizeArgument, Boolean isAudio, Boolean forceEnableLogging, CancellationToken cancellationToken) at Emby.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](MetadataResult`1 metadataResult, MetadataRefreshOptions options, LibraryOptions libraryOptions, CancellationToken cancellationToken) at Emby.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, MetadataResult`1 itemResult, String logName, MetadataRefreshOptions options, LibraryOptions libraryOptions, RefreshResult refreshResult, CancellationToken cancellationToken) Source: Emby.Server.MediaEncoding TargetSite: Void MoveNext() OK yes the ffmpeg long path fixes are in the 4.8 beta channel if you need immediate relief. Link to comment Share on other sites More sharing options...
dicion 2 Posted December 8, 2022 Share Posted December 8, 2022 Just now, Luke said: OK yes the ffmpeg long path fixes are in the 4.8 beta channel if you need immediate relief. Ok, I'll just wait then, I already mitigated it by shortening paths and names as needed. It wasn't too bad. So we won't see them in stable until 4.8 comes out then? Thanks. Link to comment Share on other sites More sharing options...
Luke 37008 Posted December 8, 2022 Share Posted December 8, 2022 1 hour ago, dicion said: So we won't see them in stable until 4.8 comes out then? Correct. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now