New Emby Docker


Recommended Posts

I have them.  FYI, selecting vaapi, and enabling hardware encoding, upon saving, and restarting the emby docker container, the hardware encoding is unticked once more.  

 

"--device /dev/dri:/dev/dri" - in my extra params

 

This is in my go file


#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

#Setup drivers for hardware transcoding in Plex
modprobe i915
chown -R nobody:users /dev/dri
chmod -R 777 /dev/dri

 

But I don't have a working hardware transcode

 

image.thumb.png.85de447002fcf4460fd1efa2684e34b2.png

 

image.png.47b20ae7b1aa1c1898b9d525108b9760.png

image.thumb.png.8b98806074d92e82071a607debb89f05.png

 

Edited by jang430
Link to comment
  • 1 month later...

I am planning to change from Binhex docker to this one in order to get the hardware transcoding with Intel Quick Sync.

 

Are Intel 9 series iGPUs already supported (I have i5-9600K)? Or should I wait for a new stable release of Unraid with a newer version of Linux kernel?

Link to comment
On 9/7/2020 at 8:32 PM, jang430 said:

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

#Setup drivers for hardware transcoding in Plex
modprobe i915
chown -R nobody:users /dev/dri
chmod -R 777 /dev/dri

@jang430 If you haven't figured it out, your go file is wrong

it should be

#!/bin/bash

modprobe i915
chmod -R 0777 /dev/dri

# this must be the last thing in the go file unless you really know why
# Start the Management Utility
/usr/local/sbin/emhttp &

 

Link to comment
  • 1 month later...
  • 1 month later...

I started messing with settings last night trying and now I cannot connect to Emby via HTTPs.  For the life of me, I cannot figure out what is wrong. 

 

Within the Emby Server both my local and public https port is listed at 8920.  

 

I have tried to access the server using https://<internal ip>:8920 using the Edge browser and I receive the following error:

"Hmmm...can't reach this page.  It looks like <internal ip> closed the connection"

 

I have tried to access the server using https://media.mydomain.com:8920 using the Edge browser and I receive the following error:

"Forbidden.  You don't have permission to access / on this server."

 

I have tried to telnet to the server on port 8920 and it tells me that the connection failed. 

 

Everything noted above works just fine on HTTP.  

 

Any ideas?

 

Link to comment
  • 2 weeks later...
  • 3 weeks later...

Hi guys my unraid server share is setup as follows:

\\myserver\Movies\movie1\BDMV\

\\myserver\Movies\movie2\movie2.mkv

etc.

 

I tried installing and running the Embyserver docker on this and when I add my movies folder to the library, emby scanner seem to add each .m2ts file inside the BDMV/STREAM folder as a separate movie. How can I avoid that and make it only add the top movie folder path?

 

Edited by kolla
Link to comment
7 hours ago, kolla said:

Hi guys my unraid server share is setup as follows:

\\myserver\Movies\movie1\BDMV\

\\myserver\Movies\movie2\movie2.mkv

etc.

 

I tried installing and running the Embyserver docker on this and when I add my movies folder to the library, emby scanner seem to add each .m2ts file inside the BDMV/STREAM folder as a separate movie. How can I avoid that and make it only add the top movie folder path?

 

i guess this should rather be a point at emby's forum, did you asked there ?

Link to comment
3 hours ago, alturismo said:

i guess this should rather be a point at emby's forum, did you asked there ?

No I haven't.. I also tried downloading and installing embyserver on my windows PC and pointed that to the above unraid library. Strangely that windows version scans my library correctly and I don't see the above mentioned issue. It only happens with the embyserver installed on the docker. I was hoping the docker app would work correctly so that I don't have to have my windows PC running ...

Edited by kolla
Link to comment
  • 3 weeks later...

Emby doesn't intelligently manage temporary transcoding files and can fill your drive in some scenarios.

 

This is especially a problem if you're transcoding to a RAM drive with limited space as described here (the specified command is added to template's Extra Parameters.)

 

Update: I've switched from tmpfs (outlined here) to /dev/shm

 

I solved this with a helper script stored on a share accessible to the Emby container and called from within it.

Create it as transcoding-temp-fix.sh and run chmod a+x on it.

 

Here's the script:

#!/bin/sh  

# User Settings
TRANSCODE_DIR="/transcode/transcoding-temp"
PERCENT_LIMIT=70
BATCH_SIZE=10

if [ -d "${TRANSCODE_DIR}" ]; then
    percent_full=`df "${TRANSCODE_DIR}" | awk '{print $5}' | tr -dc '0-9'`
    echo "Directory limit: ${PERCENT_LIMIT}%"
    echo "Directory utilization: ${percent_full}%"
    while [ $percent_full -gt $PERCENT_LIMIT ]; do
        echo "(${percent_full}%) exceeds limit (${PERCENT_LIMIT}%), deleting oldest (${BATCH_SIZE}) files"

        # DEBUG: Uncomment to print list of deleted files                                                                                                                                               
        #ls ${TRANSCODE_DIR}/*.ts -1t | tail -${BATCH_SIZE} | xargs ls -lh                                                                                                                              
	ls ${TRANSCODE_DIR}/*.ts -1t | tail -${BATCH_SIZE} | xargs rm

        percent_full=`df "${TRANSCODE_DIR}" | awk '{print $5}' | tr -dc '0-9'`
    done
else
    echo "${TRANSCODE_DIR} (TRANSCODE_DIR): directory doesn't exist"
fi

 

This assumes you're mounting the RAM drive at /transcode (as described in the linked post) which you've set as the Transcoding temporary path in Emby:

1299097911_ScreenShot2021-02-17at12_14_52PM.thumb.png.1c3cf2523d8bf3f188fc9168f759966e.png

 

The script deletes the oldest ts files in batches of 10 (BATCH_SIZE) until it reaches a safe usage percent (PERCENT_LIMIT).

 

I call it every 30s with the following entry in the template's Post Arguments

&& docker exec EmbyServer sh -c 'watch -n30 "/system-share/transcoding-temp-fix.sh" 2>/dev/null > /transcode/transcoding-temp-fix.log &'

 

NOTE: The full host path to the script is /mnt/cache/system/emby/transcoding-temp-fix.sh where system-share is a mapped path variable I've added to the template:

1324138336_ScreenShot2021-02-17at12_25_48PM.thumb.png.1f85e64891ba0c6469a7125ac0f37665.png

 

Its execution can be monitored with the following command from the unraid console:

docker exec EmbyServer sh -c 'tail -f /transcode/transcoding-temp-fix.log'

 

It works well so far with standard transcoding but I don't use batch conversions or live TV so YMMV.

 

NOTE: I'm piping results to rm so use at your own risk (and feel free to post improvements.)

You may want to test the commands individually before running the full script.

Edited by CS01-HS
Updated Post Arguments, more robust
  • Like 1
Link to comment
40 minutes ago, StevenD said:

@CS01-HS

 

Thanks!  Funny enough, I couldnt figure out why my cache drive was almost full this morning. I found a 445GB .ts file in the Emby appdata/transocde dir.

 

I've never seen a file that size. Mine are few MB each. The large size suggests it's being continuously written to in which case my script deleting it may cause whatever's writing it to fail...

Link to comment
5 minutes ago, ken-ji said:

Odd. I've never seen any transcoding files - I'm transcoding to RAM vi a mounted directory under /tmp - unless I look while someones actively playing something. So I've never this issue.

 

Same. In my case multiple simultaneous transcodes maxed out the RAM drive.

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.