Jump to content

ffmpeg extract-imageseries not working with Emby 4.6.4.0 on Freenas


D3lt4y

Recommended Posts

D3lt4y

Hi

 

I recently updated the emby plugin on my freenas server to 4.6.4.0 (from 4.4.3.0) and noticed that the Thumbnail image extraction job is failing for every single file since the update.

 

The ffmpeg error seems to be

[AVFilterGraph @ 0x81012bf00] No such filter: ''
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!

(full logs attached for one of the examples)

 

I also tried running the same ffmpeg command manually outside of emby with the same result.

 

So I had a look at the old logs from before the update and noticed that the ffmpeg command emby is running changed with the update.

 

Failing command with emby 4.6.4.0

/usr/local/bin/ffmpeg -f matroska -threads 1 -i file:"filepath" -an -sn -threads 0 -vf "fps=fps=1/10,,scale=min(iw\,320):trunc(ow/dar/2)*2,format=yuv420p,eq=contrast=0.9:gamma=0.95:saturation=1.8" -f image2 "outpath"

Successful command with emby 4.4.3.0

/usr/local/bin/ffmpeg -f matroska -threads 1 -i file:"filepath" -an -sn -threads 0 -vf "fps=fps=1/10,scale=min(iw\,320):trunc(ow/dar/2)*2" -f image2 "outfile"

 

The issue seems to be the double comma here

fps=fps=1/10,,

removing one of the commas allows me to run the command successfully outside of emby.

 

Is this a known issue and are there any workarounds to get the image extraction job working until its fixed?

 

Thanks!

extract-imageseries-ddbf9459-3777-42d1-bcbf-76074b55076a_1.txt

Link to comment
Share on other sites

hairlesshobo

Hi, I am also having this exact same issue. Emby does not generate the thumbnails here either. Same exact issue.. the double comma causes issues. If I run it manually on command line and remove the extra comma, all is well and the images are extracted.

Link to comment
Share on other sites

For anyone else with the issue this is the workaround I am using:

It is working fine with the windows version of emby server, so I use emby server on my windows PC to generate the thumbnails with the option to save the images into the media folder.

Then refreshing metadata on my Freenas emby server adds the images to to my proper library as well.

Link to comment
Share on other sites

hairlesshobo

I can also attest that the Linux version works properly because I did something similar. I deployed Emby as a docker container, disabled ALL metadata and image downloaders (because I JUST want it to generate the thumbnails) and it seems to be working.

Seems like FreeBSD just needs some love that the other platforms already get. Please fix this properly so we don't have to use these workarounds!

Link to comment
Share on other sites

myazmj2k

This is affecting the Linux version as well... at least on Arch. The extra comma is causing the issue. After rolling back to 4.5.4.0 thumbnail generation started working again... and the command that version uses doesn't have the extra comma so the change must of happened sometime after 4.5.4.0.

Edited by myazmj2k
Link to comment
Share on other sites

3 hours ago, myazmj2k said:

This is affecting the Linux version as well... at least on Arch. The extra comma is causing the issue. After rolling back to 4.5.4.0 thumbnail generation started working again... and the command that version uses doesn't have the extra comma so the change must of happened sometime after 4.5.4.0.

Hi, it's not affecting our arch linux stable package, but if you're using the beta server on arch linux, that is not packaged by us and therefore is probably missing our custom ffmpeg build.

Link to comment
Share on other sites

The problem is actually not caused by us unfortunately.  Emby ships it's own embedded ffmpeg, but the freenas team is altering our package to use the system ffmpeg:

The system ffmpeg is missing our modifications and that is the reason for this problem (among others). See here which never got a response from them:

https://github.com/freenas/iocage-plugin-emby/commit/71deeb0cf2f4d5034f3320ff8b092cf1d78c6aea

What I can do is submit a pull request to undo their change and see what happens. You never know, they may accept it. But if not, then the solution is you're going to have to install Emby Server by downloading the .pkg and following an install process that we outline, which we are currently working on finalizing those instructions.

Link to comment
Share on other sites

iloveparks

Thanks for the detailed info Luke! I honestly can't recall how I installed Emby - does this affect installs via pkg as well? I don't believe I used the provided plugin, as I have had issues in the past with that sort of thing, I tend to "roll my own" jails. 

Really appreciate the response and info.

Link to comment
Share on other sites

Just now, iloveparks said:

Thanks for the detailed info Luke! I honestly can't recall how I installed Emby - does this affect installs via pkg as well? I don't believe I used the provided plugin, as I have had issues in the past with that sort of thing, I tend to "roll my own" jails. 

Really appreciate the response and info.

No, if you manually install our pkg file then you're fine. It's only if you use the freenas provided Emby Server plugin that you run into this problem (which unfortunately is what most people are going to start off with given it's high visibility).

  • Like 1
Link to comment
Share on other sites

myazmj2k
1 hour ago, Luke said:

Hi, it's not affecting our arch linux stable package, but if you're using the beta server on arch linux, that is not packaged by us and therefore is probably missing our custom ffmpeg build.

Its the official package for Arch.

Here are the related failing log entries for  versions 4.6.0.50, 4.6.3.0, 4.6.4.0:

Spoiler

 



2021-08-27 09:10:13.224 Info App: ProcessRun 'extract-imageseries' Execute: /usr/bin/ffmpeg-emby -f matroska -threads 1 -i file:"/Media/Videos/Shows/Series/Bar Rescue/Season 08/Bar Rescue - S08E08 - A Commander and His Post.mkv" -an -sn -threads 0 -vf "fps=fps=1/10,,scale=min(iw\,320):trunc(ow/dar/2)*2" -f image2 "/EMBY/cache/temp/2f10f17c436f4ea28eff661bf7c995b3/img_%05d.jpg"
2021-08-27 09:10:13.272 Info App: ProcessRun 'extract-imageseries' Process exited with code 1
2021-08-27 09:10:13.727 Error ChapterImagesTask: Error creating thumbnails for /Media/Videos/Shows/Series/Bar Rescue/Season 08/Bar Rescue - S08E08 - A Commander and His Post.mkv
	*** Error Report ***
	Version: 4.6.0.50
	Command line: /usr/lib/emby-server/EmbyServer.dll -programdata /EMBY -ffdetect /usr/bin/ffdetect-emby -ffmpeg /usr/bin/ffmpeg-emby -ffprobe /usr/bin/ffprobe-emby -restartexitcode 3
	Operating system: Linux version 5.13.12-arch1-1 (linux@archlinux) (gcc (GCC) 11.1.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP PREEMPT Wed, 18 Aug 2021 20:49:03 +0000
	Framework: .NET Core 3.1.17
	OS/Process: x64/x64
	Runtime: usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.17/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /EMBY
	Application path: /usr/lib/emby-server
	System.Exception: System.Exception: No thumbnails created for /Media/Videos/Shows/Series/Bar Rescue/Season 08/Bar Rescue - S08E08 - A Commander and His Post.mkv 320
	   at MediaBrowser.Providers.MediaInfo.ThumbnailGenerator.CreateThumbnailSet(Video item, LibraryOptions libraryOptions, Int32 width, CancellationToken cancellationToken)
	   at MediaBrowser.Providers.MediaInfo.ThumbnailGenerator.CreateThumbnailSets(Video item, LibraryOptions libraryOptions, CancellationToken cancellationToken)
	   at MediaBrowser.Providers.MediaInfo.ThumbnailGenerator.RefreshThumbnailImages(Video item, LibraryOptions libraryOptions, IDirectoryService directoryService, List`1 chapters, Boolean extractImages, Boolean saveChapters, CancellationToken cancellationToken)
	Source: Emby.Providers
	TargetSite: Void MoveNext()
	

2021-08-27 10:12:52.274 Info App: ProcessRun 'extract-imageseries' Execute: /usr/bin/ffmpeg-emby -f matroska -threads 1 -i file:"/Media/Videos/Shows/Series/Bar Rescue/Season 08/Bar Rescue - S08E08 - A Commander and His Post.mkv" -an -sn -threads 0 -vf "fps=fps=1/10,,scale=min(iw\,320):trunc(ow/dar/2)*2" -f image2 "/EMBY/cache/temp/29a1dda7cb3046c5a3a17a5d47df4fcd/img_%05d.jpg"
2021-08-27 10:12:52.343 Info App: ProcessRun 'extract-imageseries' Process exited with code 1
2021-08-27 10:12:52.777 Error ChapterImagesTask: Error creating thumbnails for /Media/Videos/Shows/Series/Bar Rescue/Season 08/Bar Rescue - S08E08 - A Commander and His Post.mkv
	*** Error Report ***
	Version: 4.6.3.0
	Command line: /usr/lib/emby-server/EmbyServer.dll -programdata /EMBY -ffdetect /usr/bin/ffdetect-emby -ffmpeg /usr/bin/ffmpeg-emby -ffprobe /usr/bin/ffprobe-emby -restartexitcode 3
	Operating system: Linux version 5.13.12-arch1-1 (linux@archlinux) (gcc (GCC) 11.1.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP PREEMPT Wed, 18 Aug 2021 20:49:03 +0000
	Framework: .NET Core 3.1.17
	OS/Process: x64/x64
	Runtime: usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.17/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /EMBY
	Application path: /usr/lib/emby-server
	System.Exception: System.Exception: No thumbnails created for /Media/Videos/Shows/Series/Bar Rescue/Season 08/Bar Rescue - S08E08 - A Commander and His Post.mkv 320
	   at MediaBrowser.Providers.MediaInfo.ThumbnailGenerator.CreateThumbnailSet(Video item, LibraryOptions libraryOptions, Int32 width, CancellationToken cancellationToken)
	   at MediaBrowser.Providers.MediaInfo.ThumbnailGenerator.CreateThumbnailSets(Video item, LibraryOptions libraryOptions, CancellationToken cancellationToken)
	   at MediaBrowser.Providers.MediaInfo.ThumbnailGenerator.RefreshThumbnailImages(Video item, LibraryOptions libraryOptions, IDirectoryService directoryService, List`1 chapters, Boolean extractImages, Boolean saveChapters, CancellationToken cancellationToken)
	Source: Emby.Providers
	TargetSite: Void MoveNext()
	
2021-08-27 10:56:03.092 Info App: ProcessRun 'extract-imageseries' Execute: /usr/bin/ffmpeg-emby -f matroska -threads 1 -i file:"/Media/Videos/Shows/Series/Bar Rescue/Season 08/Bar Rescue - S08E08 - A Commander and His Post.mkv" -an -sn -threads 0 -vf "fps=fps=1/10,,scale=min(iw\,320):trunc(ow/dar/2)*2" -f image2 "/EMBY/cache/temp/74d3596833ea415ab1e8e3a838173fbd/img_%05d.jpg"
2021-08-27 10:56:03.173 Info App: ProcessRun 'extract-imageseries' Process exited with code 1
2021-08-27 10:56:03.594 Error ChapterImagesTask: Error creating thumbnails for /Media/Videos/Shows/Series/Bar Rescue/Season 08/Bar Rescue - S08E08 - A Commander and His Post.mkv
	*** Error Report ***
	Version: 4.6.4.0
	Command line: /usr/lib/emby-server/EmbyServer.dll -programdata /EMBY -ffdetect /usr/bin/ffdetect-emby -ffmpeg /usr/bin/ffmpeg-emby -ffprobe /usr/bin/ffprobe-emby -restartexitcode 3
	Operating system: Linux version 5.13.12-arch1-1 (linux@archlinux) (gcc (GCC) 11.1.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP PREEMPT Wed, 18 Aug 2021 20:49:03 +0000
	Framework: .NET Core 3.1.17
	OS/Process: x64/x64
	Runtime: usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.17/System.Private.CoreLib.dll
	Processor count: 8
	Data path: /EMBY
	Application path: /usr/lib/emby-server
	System.Exception: System.Exception: No thumbnails created for /Media/Videos/Shows/Series/Bar Rescue/Season 08/Bar Rescue - S08E08 - A Commander and His Post.mkv 320
	   at MediaBrowser.Providers.MediaInfo.ThumbnailGenerator.CreateThumbnailSet(Video item, LibraryOptions libraryOptions, Int32 width, CancellationToken cancellationToken)
	   at MediaBrowser.Providers.MediaInfo.ThumbnailGenerator.CreateThumbnailSets(Video item, LibraryOptions libraryOptions, CancellationToken cancellationToken)
	   at MediaBrowser.Providers.MediaInfo.ThumbnailGenerator.RefreshThumbnailImages(Video item, LibraryOptions libraryOptions, IDirectoryService directoryService, List`1 chapters, Boolean extractImages, Boolean saveChapters, CancellationToken cancellationToken)
	Source: Emby.Providers
	TargetSite: Void MoveNext()

And this one worked on 4.5.4.0:

Spoiler


2021-08-27 11:00:20.370 Info App: ProcessRun 'quick-extract-imageseries' Execute: /usr/bin/ffmpeg-emby -f matroska -threads 1 -skip_interval 10 -copyts -i file:"/Media/Videos/Shows/Series/Bar Rescue/Season 08/Bar Rescue - S08E08 - A Commander and His Post.mkv" -an -sn -s 320x180 -vsync cfr -r 0.1 -f image2 "/EMBY/cache/temp/634f4a4a748c4334b1709be40cc49fad/img_%05d.jpg"
2021-08-27 11:00:34.943 Info App: ProcessRun 'quick-extract-imageseries' Process exited with code 0

 

It appears the older version is running quick-extract-imageseries instead of extract-imageseries. If you run the command manually from one of the failed ones it errors in ffmpeg unless you remove the extra comma, at that point the images generate.

 

I didn't mean to hijack the topic but the problem i am seeing appears to be the same issue as the original poster, just on a different platform.

 

Edited by myazmj2k
Link to comment
Share on other sites

iloveparks

Interesting. I guess I need to do a re-build and install via pkg just to confirm, but I really thought I didn't use the plugin.

Link to comment
Share on other sites

iloveparks

D'oh... Definitely did use the plugin in the past. 😁

At least I know the fix now. Thanks Luke!

 

EDIT: Spun up another jail and install via 'pkg install emby-server' - thumbnail generation is working perfectly on newly added media. Beautiful. Cheers @Luke!

Edited by iloveparks
Link to comment
Share on other sites

The issue itself will be fixed in the upcoming beta.
(which means that once this fix arrives at the stable version, it won't happen anymore even with the installation you were using)

Thanks for reporting,
sw

Link to comment
Share on other sites

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