New Emby Docker


Recommended Posts

2 hours ago, Eisi2005 said:

Hello, I have a question about the emby docker and I hope that someone here can help me. Emby is running fine so far. The only thing I don't quite understand is when I start a movie, whether with the native Emby client or with the emby addon under kodi, I see the CPU load on my unraid server (latest version of the unraid, i510400 and 32 GB RAM). rises to about 80%. This lasts for about 3-4 minutes and then the cpu load drops to 2%. Also, while the CPU load is high, I cannot skip or fast-forward chapters in the movie. If the CPU load is low, I can skip chapters, but then I see that the load also increases again. Can you configure something there?

 

Thanks

 

What you're seeing is called transcoding. This happens when your client does not support what you're trying to play. Either the video format, audio format or maybe the subtitle. Here is when transcoding comes in. What it does is change whatever format the client isn't supporting into some format is does support, so it can play the file. This is done by the emby server on the fly and on a default setup is using the cpu of the server. And as you're seeing it takes quite a lot power from the cpu to do this on the fiy. Emby is also setup default to "dynamically" transcode your file which means it will only transcode the first part of a file to reduce cpu utilization (10 min maybe) to begin with so the file can start playing. And when emby sees you're catching up to that point it will start the transcoding again, this way emby always stays ahead a few % not causing the video to buffer. 
 
This dynamic setting in emby is also why you can't skips chapters without causing buffering. Because remember emby only transcodes the first part of the file and keeps ahead a few % at a time. So when you skip chapters the video will start to buffer because that part is not transcoded yet.
 
You can turn off this dynamically setting in the emby server settings under transcoding. Disable this:

image.thumb.png.d357aef775b098df683a25c7cba63635.png
 
When disabled emby will transcode the whole file from start to finish in one go. So instead of the cpu taking 3-4 min at 80% every now and then it can now maybe take 15-20 min to transcode the whole file. But the nice thing is that you can skip forward as long as the transcoding has caught up to that point.
 
Transcoding can also happen if you're streaming remote (or local) and the file has to high bitrate for you're connection so it has to transcode it to a lower quality in order to be able to play it. Usually only happens when playing from a remote location or on a crappy wifi locally.

 

To avoid transcoding all together you will have to buy a client that supports most formats so it can direct play the file instead. You can see in the emby server dashboard why the file is transcoding if you want to troubleshoot.
 
Or you if you have a discrete GPU or integrated GPU on your cpu you can use that to set up hardware transcoding in emby and avoid using the cpu. GPU's are much faster then the cpu. So instead of the cpu using 15 min to transcode a file the gpu does this in maybe 1 min.

Link to comment

Hello, thank you for your detailed answer. I use an nvidia shield as a client, which should be able to handle all formats that I use. I also see direct play being used on the dashboard. So it can't actually be due to transcoding due to audio or video format. What I could imagine would be the transcoding due to high bitrate. The server is remote. What surprises me, however, is that I have a wireguard vpn server running on the unraid server. If I connect the nvidia shield to the server via wireguard beforehand and then say in emby under kodi it should use native paths, then everything works perfectly. Is it possible that emby behaves differently under http than when I access it via smb?

Link to comment

Here are 2 more log files when I play a film with another android box and the native emby client. The film starts and runs flawlessly so far. But if I want to jump chapters or jump forward a few minutes, the film freezes for 1-2 minutes before continuing and the CPU is quite busy. I also only have an i5 10400 with the integrated gpu intel uhd 630. Maybe you can improve something based on the logs. Within emby I have assigned transcoding to the gpu, do I have to assign something else to docker in the config?

embyserver.txt ffmpeg-remux-ff9186b5-0398-4da6-b176-25212a795fa0_1.txt

Link to comment
4 hours ago, Eisi2005 said:

Is it possible that emby behaves differently under http than when I access it via smb?

remote playpack is always buffered and put in HLS usually, so yes, there is a difference "as you see", you say your server is "remote" ... and no hardware details ... may there is your issue.

 

so you should start what has been pointed already, turn throttle on, turn subs off abd see what happens

Link to comment
  • 3 weeks later...

Issue with HW decoding - Please Help

 

Hi I have had the container installed for a while and added a variable to the container for a device and set the variable to /dev/dri to enable hardware decoding. This enabled the preferred Hardware decoders to be seen by emby (see attached screenshot), However when transcoding (or converting a file as part of an offline download to ios) the GPU is not being used and instead the CPU utilisation for cores allocated to the container max out at 100%.  The conversions are taking a long time to complete (about an hour for a film).  CPU is an AMD Ryzen 7 5700G with Radeon Graphics and I am trying to use the APU for transcoding.  Can you advise how i can enable HW decoding and verify its operation for media? I have also attached the CPU usage and the GPU usage graphs during a conversion below.

 

Thanks in advance 

Screenshot 2022-11-21 at 23.06.16.jpg

Screenshot 2022-11-21 at 23.17.02.jpg

Screenshot 2022-11-21 at 23.17.15.jpg

Edited by TheGrownUpGeek
Added screenshots
Link to comment

Hello everyone! I have a permissions question (I think).

 

The use case is: I'm watching a video using the Emby Web GUI. I'd like to delete the video file when I'm done. But I can't.

 

Quote

There was an error deleting the item from Emby Server. Please check that Emby Server has write
access to the media folder and try again.

 

These files are downloaded to a /share by another docker, binhex-delugevpn.

 

There are no restrictions on the /share, I made it Public.

 

Both dockers have PUID: 99 and PGID: 100.

 

I'm logging into Emby with a user account that I created when I set up Emby (not sure if this is what's causing the problem).

 

What do you think I'm doing wrong?

Edited by vurt
Link to comment
8 hours ago, alturismo said:

may take a look here what permissions are set

 

image.thumb.png.c0c56449f5eadcaba5d5a5d4caabc2b4.png

 

and also take a look at the emby log, should be the same message but who knows ;)

Thank you for the suggestion. I clicked on Shares menu and see a list of my /shares. But how do I get to this screen you have?

Link to comment
1 hour ago, vurt said:

The latest, 6.11.5.

ok, may install this then, this should be it, sorry ;)

 

i had in mind this is included in the latest unraid version's

image.png.606ff2a4d24a52fbeaa9d3196f1cc1fd.png

 

otherwise you always also can do something like this from the cli

root@AlsServer:~# ls -lah /mnt/user/Media/RECORD/TVRIPS/F1/Season\ 2022/
total 67G
drwxrwxrwx 1 nobody users 4.0K Nov 21 06:02 ./
drwxrwxrwx 1 nobody users   44 Nov 21 06:02 ../
-rwxrwxrwx 1 nobody users 4.6G Oct 24 07:58 F1\ -\ E1000\ -\ Großer\ Preis\ der\ USA,\ Rennen.mkv*
-rwxrwxrwx 1 nobody users 4.9G Oct 31 06:33 F1\ -\ E1010\ -\ Großer\ Preis\ von\ Mexiko,\ Rennen.mkv*
-rwxrwxrwx 1 nobody users 4.7G Nov 14 07:43 F1\ -\ E1014\ -\ Großer\ Preis\ von\ Brasilien,\ Rennen.mkv*
-rwxrwxrwx 1 nobody users 1.8G Nov 12 22:53 F1\ -\ E1015\ -\ Großer\ Preis\ von\ Brasilien,\ Sprint.mkv*
-rwxrwxrwx 1 nobody users 3.9G Nov 21 00:23 F1\ -\ E1021\ -\ Großer\ Preis\ von\ Abu\ Dhabi,\ Rennen.mkv*
...

 

  • Thanks 1
Link to comment
22 hours ago, alturismo said:

ok, may install this then, this should be it, sorry ;)

 

i had in mind this is included in the latest unraid version's

image.png.606ff2a4d24a52fbeaa9d3196f1cc1fd.png

 

 

That's really cool! Installed it. Still not able to do what I need unfortunately.

 

Eg. the file's permissions were -rwxrwxr-X, i changed them to -rw-rw-rw-, still can't delete the file from Emby.

Link to comment
10 hours ago, alturismo said:

1. x is the execution permission (also delete is execute)

2. who is the owner, <nobody> ?

--> make a screenshot ...

3. what does the emby logs say ? anything different from "no permission" ?

 

1. Sorry I did not know that. The old permission with the x didn't allow Emby to delete the file, so I used the Dynamix File Manager to change it to read/write. It didn't have an x option.

 

2. Yup, owner is nobody.

 

Here's an example of the permissions. Most of the files have this.

 

image.thumb.png.90f25dabbe64b051ff8b2e23eac5c549.png

 

3. Here's a log:

 

2022-11-26 21:05:44.845 Info Server: http/1.1 POST http://192.168.1.252:443/emby/Items/33409/PlaybackInfo?UserId=f3b875f41f53420d91be9ceb3ac7492f&StartTimeTicks=0&IsPlayback=false&AutoOpenLiveStream=false&MaxStreamingBitrate=3000000&X-Emby-Client=Emby Web&X-Emby-Device-Name=Firefox macOS&X-Emby-Device-Id=TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTAuMTQ7IHJ2OjY3LjApIEdlY2tvLzIwMTAwMTAxIEZpcmVmb3gvNjcuMHwxNTUyNTQzMzYxOTgy&X-Emby-Client-Version=4.7.10.0&reqformat=json. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0
2022-11-26 21:05:44.846 Info App: User policy for Ray. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
2022-11-26 21:05:44.848 Info Server: http/1.1 Response 200 to host1. Time: 4ms. http://192.168.1.252:443/emby/Items/33409/PlaybackInfo?UserId=f3b875f41f53420d91be9ceb3ac7492f&StartTimeTicks=0&IsPlayback=false&AutoOpenLiveStream=false&MaxStreamingBitrate=3000000&X-Emby-Client=Emby Web&X-Emby-Device-Name=Firefox macOS&X-Emby-Device-Id=TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTAuMTQ7IHJ2OjY3LjApIEdlY2tvLzIwMTAwMTAxIEZpcmVmb3gvNjcuMHwxNTUyNTQzMzYxOTgy&X-Emby-Client-Version=4.7.10.0&reqformat=json
2022-11-26 21:08:30.240 Info Server: http/1.1 POST http://192.168.1.252:443/emby/Items/33409/Delete?X-Emby-Client=Emby Web&X-Emby-Device-Name=Firefox macOS&X-Emby-Device-Id=TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTAuMTQ7IHJ2OjY3LjApIEdlY2tvLzIwMTAwMTAxIEZpcmVmb3gvNjcuMHwxNTUyNTQzMzYxOTgy&X-Emby-Client-Version=4.7.10.0. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0
2022-11-26 21:08:30.242 Info App: Removing item from database, Type: Video, Name: FILE, Path: /mnt/user/Share/Folder/FILE.avi, Id: 33409
2022-11-26 21:08:30.247 Info App: Deleting file /mnt/user/Share/Folder/FILE.avi
2022-11-26 21:08:30.261 Error Server: Error processing request
	*** Error Report ***
	Version: 4.7.10.0
	Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
	Operating system: Linux version 5.19.17-Unraid (root@Develop) (gcc (GCC) 12.2.0, GNU ld version 2.39-slack151) #2 SMP PREEMPT_DYNAMIC Wed Nov 2 11:54:15 PDT 2022
	Framework: .NET 6.0.8
	OS/Process: x64/x64
	Runtime: system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /config
	Application path: /system
	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/mnt/user/Share/Folder/FILE.avi' is denied.
	 ---> System.IO.IOException: Permission denied
	   --- End of inner exception stack trace ---
	   at System.IO.FileSystem.DeleteFile(String fullPath)
	   at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, BaseItem parent, Boolean notifyParentItem)
	   at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, Boolean notifyParentItem)
	   at Emby.Api.Library.LibraryService.Any(DeleteItems request)
	   at Emby.Api.Library.LibraryService.Any(DeleteItem request)
	   at Emby.Server.Implementations.Services.ServiceController.<>c__DisplayClass6_0.<VoidActionDelegate>b__0(Object service, Object request)
	   at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: System.Private.CoreLib
	TargetSite: Void DeleteFile(System.String)
	InnerException: System.IO.IOException: Permission denied
	Source: 
	TargetSite: 

 

Edited by vurt
Link to comment

To troubleshoot, I just tried to delete a file that was downloaded by Sonarr, and ran into the same problem.

 

This had different permissions which:

 

image.thumb.png.8732f68ac044c6f11194428d30e9141d.png

 

I could try setting that to rw-rw-rw and try deleting again?

 

2022-11-27 11:03:44.829 Info App: Removing item from database, Type: Episode, Name: SHOWNAME, Path: /mnt/user/TV/SHOW/Season 54/FILE.mkv, Id: 51877
2022-11-27 11:03:44.831 Info App: Deleting file /mnt/user/TV/SHOW/Season 54/FILE.mkv
2022-11-27 11:03:44.832 Error Server: Error processing request
	*** Error Report ***
	Version: 4.7.10.0
	Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
	Operating system: Linux version 5.19.17-Unraid (root@Develop) (gcc (GCC) 12.2.0, GNU ld version 2.39-slack151) #2 SMP PREEMPT_DYNAMIC Wed Nov 2 11:54:15 PDT 2022
	Framework: .NET 6.0.8
	OS/Process: x64/x64
	Runtime: system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /config
	Application path: /system
	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/mnt/user/TV/SHOW/Season 54/FILE.mkv' is denied.
	 ---> System.IO.IOException: Permission denied
	   --- End of inner exception stack trace ---
	   at System.IO.FileSystem.DeleteFile(String fullPath)
	   at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, BaseItem parent, Boolean notifyParentItem)
	   at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, Boolean notifyParentItem)
	   at Emby.Api.Library.LibraryService.Any(DeleteItems request)
	   at Emby.Api.Library.LibraryService.Any(DeleteItem request)
	   at Emby.Server.Implementations.Services.ServiceController.<>c__DisplayClass6_0.<VoidActionDelegate>b__0(Object service, Object request)
	   at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)
	   at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
	Source: System.Private.CoreLib
	TargetSite: Void DeleteFile(System.String)
	InnerException: System.IO.IOException: Permission denied
	Source: 
	TargetSite: 
	

 

Edited by vurt
Link to comment

Hello, I have a question about an emby problem, which I reported here
https://emby.media/community/index.php?/topic/114227-library-scan-does-not-detect-and-add-new-movies/page/2/

Something seems to have gone wrong with the folder permissions, probably when I upgraded unraid and had to use a different flash (long story).

Anyhow, I was asked to fix the permissioning, but I have no idea how to do that.

Shall I go to Tools / New Permissions and just click on the Start button? Would that fix my issues?

Link to comment

Hi,

I have had an issue for years where my emby transcoding file fills up my docker image on the cache drive.  Each time I have to delete docker and reinstall the apps.   This is due to roku not being closed down correctly (hitting home button instead of back button to exit emby roku app).   However- I'll never get others in the house to do this correctly so need a different solution.   

Is there a way I can set it up for Emby Docker to just restart at 3am each night for example?  this should shut down any transcoding.   or other ideas?

thanks

Link to comment
1 hour ago, chuga said:

Is there a way I can set it up for Emby Docker to just restart at 3am each night for example?  this should shut down any transcoding. 

user scripts plugin, schedule a script

 

docker restart emby (while emby is the case sensitive name from your docker)

 

1 hour ago, chuga said:

or other ideas?

emby forums, make a bug report (there is a existing one for this point for years ;)) that it should check free space and delete old ...

Link to comment
On 12/3/2022 at 12:27 PM, chuga said:

my emby transcoding file fills up my docker image on the cache drive

 

Also consider a transcoding path outside the docker image. I have mine use RAM (to minimize SSD writes) but a path to a cached share works as well.

 

1025106550_Screenshot2022-12-05at8_14_51AM.thumb.png.e11f75b31471a743565f2c28e75caadb.png

 

439168156_Screenshot2022-12-05at8_15_27AM.thumb.png.0b26f6c43449dc40a3247286254dcc00.png

 

NOTE 1: Emby will create the subdirectory transcoding-temp under your specified path. (In my case that's /dev/shm/transcoding-temp)

 

NOTE 2: As an alternative to the nightly restart I've written a monitoring script:

SCRIPT TO KEEP EMBY'S TRANSCODING DIRECTORY FROM FILLING UP

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.