Jump to content

Problem long paths/long filename (>259 characters) / ffprobe error


Go to solution Solved by softworkz,

Recommended Posts

Posted

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.

Posted
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.

  • Like 1
Posted

@letterman, just out of curiosity would you mind posting an example of one of your long paths?

Posted (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 by letterman
  • Like 1
Posted
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

  • Like 1
Posted (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 by pmac
  • 1 year later...
Posted

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.

Posted
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.

 

source: https://ffmpeg.org/pipermail/ffmpeg-devel/2022-April/date.html#295569

  • Thanks 1
Posted
Posted

For now, the only solution is to prefix your library folders with \\?\

Posted
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.

  • Like 1
Carlo
Posted

Wow, nice.

Still kind of sucks people have file names that long they need to manage. :)

  • 6 months later...
Posted (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 by dicion
Posted
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?

Posted
20 minutes ago, Luke said:

Is that on the same machine as the server?

No. Windows Server to Network share on Synology San

Posted

Can you reach that path in windows explorer?

Posted (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.

image.thumb.png.11c13cf516b0be8bce2dabe03c59855c.png

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 by dicion
Posted
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.

image.thumb.png.11c13cf516b0be8bce2dabe03c59855c.png

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.

Posted
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.

Posted
1 hour ago, dicion said:

 

So we won't see them in stable until 4.8 comes out then?

 

Correct.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...