Jump to content

Docker


Luke

Recommended Posts

dcrdev

User and group Id are set via passing the appropriate environment variables to the container.

 

Sent from my D6603 using Tapatalk

 

I know I've done that - emby is still unable to write to those folders hence why I was asking if there are other user/groups involved. The emby user I've created has permission to write to those folders if I login via shell on the host - but as I said emby won't download anything into the directory unless I set 777 permissions.

Link to comment
Share on other sites

dcrdev

I know I've done that - emby is still unable to write to those folders hence why I was asking if there are other user/groups involved. The emby user I've created has permission to write to those folders if I login via shell on the host - but as I said emby won't download anything into the directory unless I set 777 permissions.

 

Just to clarify this is the output of getfacl on my media folder:

# file: .                                                                       
# owner: transmission                                                           
# group: storage                                                                
# flags: -s-                                                                    
user::rwx                                                                       
group::rwx                                                                      
other::r-x                                                                      
default:user::rwx                                                               
default:group::rwx                                                              
default:other::r-x                                                                                 

The docker container is running as a user called "embyserver", which is a member of the "storage" group, which has rwx permissions as above. If I chmod 777 that folder it works (I'm not going to do that) - leading  me to believe that emby is being classified as "other" i.e. somewhere there is another user involved.

Link to comment
Share on other sites

hurricanehrndz

What is your run command and what is your gid of the storage group and the uid of the emby user.

 

Sent from my D6603 using Tapatalk

Link to comment
Share on other sites

dcrdev

What is your run command and what is your gid of the storage group and the uid of the emby user.

 

Sent from my D6603 using Tapatalk

 

My run command:

docker run -d --net=host -v /opt/emby:/config -v /storage:/media -e TZ=Europe/London --name=Emby.Server  -e MB_USER_ID=980 -e MB_GROUP_ID=971 emby/embyserver

The embyserver user id is 980, whilst it's primary group is 971 - running "top" shows that there is a mono process running as "embyserver".

Edited by dcrdev
Link to comment
Share on other sites

dougnliz

I have been running Emby Server on my Win 7 Media Center and viewing content in Emby for WMC.  That all works great.  Today I tried to move the Emby Server to the docker running on UnRaid.  My problem is when I play movies now the high resolution audio doesn't come through it just plays in stereo.  If I switch back to the server on Win 7 it works normally and bitstreams the audio.

 

Any ideas what's going on?  Why would where the server runs make a difference here?

Link to comment
Share on other sites

dcrdev

My run command:

docker run -d --net=host -v /opt/emby:/config -v /storage:/media -e TZ=Europe/London --name=Emby.Server  -e MB_USER_ID=980 -e MB_GROUP_ID=971 emby/embyserver

The embyserver user id is 980, whilst it's primary group is 971 - running "top" shows that there is a mono process running as "embyserver".

 

 

Right I've sorted it - I attached to the docker container and ran "ps aux | grep emby" where I noticed that half of the processes are being run as root and half as the user "nobody". From inspection it looks as though only the dockerised root user is being mapped to the uid, you specify in the run command. So the process responsible for metadata collection must be running as "nobody", a user who is not visible outside the container. So basically what I did was create a group within the container with the same gid as my host storage group and add the nobody user to it. Thanks for all the help by the way  :blink:

Link to comment
Share on other sites

hurricanehrndz

Hmm, the gid and uid are supposed to be created automatically. I will ensure this gets addressed soon. Thanks for reporting back.

 

Sent from my D6603 using Tapatalk

Link to comment
Share on other sites

the docker build is complaining about missing qsv decorders in the log. Is quicksync decoding (and hopefully future transcoding) not available with docker ?

Link to comment
Share on other sites

it's in colsole ouput at startup:

 

 

2015-10-30 19:02:32.5230 Info - Main: Emby
Command line: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata /config -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe -restartpath /Restart.sh -restartargs
Operating system: Unix 3.12.6.0
Processor count: 4
64-Bit OS: True
64-Bit Process: True
Program data path: /config
Mono: 4.0.3 (Stable 4.0.3.20/d6946b4 Thu Aug 13 12:46:26 UTC 2015)
Application Path: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe
2015-10-30 19:02:32.9772 Info - App: Application version: 3.0.5768.7
2015-10-30 19:02:33.1483 Info - App: Application configuration:
{"EnableUPnP":true,"PublicPort":8096,"PublicHttpsPort":8920,"HttpServerPortNumber":8096,"HttpsPortNumber":8920,"EnableHttps":false,"EnableInternetProviders":true,"IsPortAuthorized":true,"SeasonZeroDisplayName":"Specials","SaveLocalMeta":true,"EnableLocalizedGuids":true,"DisableStartupScan":true,"EnableUserViews":true,"EnableLibraryMetadataSubFolder":true,"PreferredMetadataLanguage":"en","MetadataCountryCode":"US","SortReplaceCharacters":[".","+","%"],"SortRemoveCharacters":[",","&","-","{","}","'"],"SortRemoveWords":["the","a","an"],"MinResumePct":5,"MaxResumePct":90,"MinResumeDurationSeconds":300,"RealtimeLibraryMonitorDelay":40,"EnableDashboardResponseCaching":true,"EnableDashboardResourceMinification":true,"DashboardSourcePath":"","MergeMetadataAndImagesByName":true,"EnableStandaloneMetadata":true,"ImageSavingConvention":"Compatible","MetadataOptions":[{"ItemType":"Book","ImageOptions":[{"Type":"Backdrop","Limit":1,"MinWidth":1280}],"DisabledMetadataSavers":[],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"Movie","ImageOptions":[{"Type":"Backdrop","Limit":1,"MinWidth":1280},{"Type":"Art","Limit":0,"MinWidth":0},{"Type":"Disc","Limit":0,"MinWidth":0},{"Type":"Primary","Limit":1,"MinWidth":0},{"Type":"Banner","Limit":0,"MinWidth":0},{"Type":"Thumb","Limit":1,"MinWidth":0},{"Type":"Logo","Limit":1,"MinWidth":0}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"MusicVideo","ImageOptions":[{"Type":"Backdrop","Limit":1,"MinWidth":1280},{"Type":"Art","Limit":0,"MinWidth":0},{"Type":"Disc","Limit":0,"MinWidth":0},{"Type":"Primary","Limit":1,"MinWidth":0},{"Type":"Banner","Limit":0,"MinWidth":0},{"Type":"Thumb","Limit":1,"MinWidth":0},{"Type":"Logo","Limit":1,"MinWidth":0}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"Series","ImageOptions":[{"Type":"Backdrop","Limit":1,"MinWidth":1280},{"Type":"Art","Limit":0,"MinWidth":0},{"Type":"Primary","Limit":1,"MinWidth":0},{"Type":"Banner","Limit":1,"MinWidth":0},{"Type":"Thumb","Limit":1,"MinWidth":0},{"Type":"Logo","Limit":1,"MinWidth":0}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"MusicAlbum","ImageOptions":[{"Type":"Backdrop","Limit":0,"MinWidth":1280},{"Type":"Disc","Limit":0,"MinWidth":0}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"MusicArtist","ImageOptions":[{"Type":"Backdrop","Limit":1,"MinWidth":1280},{"Type":"Banner","Limit":0,"MinWidth":0},{"Type":"Art","Limit":0,"MinWidth":0},{"Type":"Logo","Limit":0,"MinWidth":0}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"BoxSet","ImageOptions":[{"Type":"Backdrop","Limit":1,"MinWidth":1280},{"Type":"Primary","Limit":1,"MinWidth":0},{"Type":"Thumb","Limit":1,"MinWidth":0},{"Type":"Logo","Limit":1,"MinWidth":0},{"Type":"Art","Limit":0,"MinWidth":0},{"Type":"Disc","Limit":0,"MinWidth":0},{"Type":"Banner","Limit":0,"MinWidth":0}],"DisabledMetadataSavers":[],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"Season","ImageOptions":[{"Type":"Backdrop","Limit":0,"MinWidth":1280},{"Type":"Primary","Limit":1,"MinWidth":0},{"Type":"Banner","Limit":0,"MinWidth":0},{"Type":"Thumb","Limit":0,"MinWidth":0}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"Episode","ImageOptions":[{"Type":"Backdrop","Limit":3,"MinWidth":1280}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]},{"ItemType":"Video","ImageOptions":[{"Type":"Backdrop","Limit":3,"MinWidth":1280}],"DisabledMetadataSavers":["Emby Xml"],"LocalMetadataReaderOrder":[],"DisabledMetadataFetchers":[],"MetadataFetcherOrder":[],"DisabledImageFetchers":[],"ImageFetcherOrder":[]}],"EnableAutomaticRestart":true,"PathSubstitutions":[],"ServerName":"Emby ","UICulture":"nb","PeopleMetadataOptions":{"DownloadActorMetadata":true,"DownloadDirectorMetadata":true,"DownloadProducerMetadata":false,"DownloadWriterMetadata":false,"DownloadComposerMetadata":false,"DownloadOtherPeopleMetadata":false,"DownloadGuestStarMetadata":false},"FindInternetTrailers":true,"InsecureApps9":["Windows Phone"],"SaveMetadataHidden":false,"ContentTypes":[],"EnableAudioArchiveFiles":false,"EnableVideoArchiveFiles":false,"RemoteClientBitrateLimit":0,"DenyIFrameEmbedding":true,"EnableLibraryMonitor":"Auto","SharingExpirationDays":30,"DisableXmlSavers":true,"EnableWindowsShortcuts":false,"EnableVideoFrameByFrameAnalysis":false,"EnableDateLastRefresh":true,"Migrations":["5767.1"],"EnableDebugLevelLogging":false,"EnableAutoUpdate":true,"SystemUpdateLevel":"Beta","LogFileRetentionDays":3,"RunAtStartup":false,"IsStartupWizardCompleted":true,"CachePath":"","EnableCustomPathSubFolders":true}
2015-10-30 19:02:33.1713 Info - App: Loading TVHeadEnd, Version=1.0.5628.29938, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.Api, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.WebDashboard, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.Model, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.Common, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.Controller, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.Providers, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.Common.Implementations, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.Server.Implementations, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.MediaEncoding, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.Dlna, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.LocalMetadata, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.XbmcMetadata, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.IsoMounting.Linux, Version=1.0.5131.24779, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.Server.Mono, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.1713 Info - App: Loading MediaBrowser.Server.Startup.Common, Version=3.0.5768.7, Culture=neutral, PublicKeyToken=null
2015-10-30 19:02:33.3869 Info - SqliteUserRepository: Sqlite 3.8.2 opening /config/data/users.db
2015-10-30 19:02:33.5259 Info - SqliteFileOrganizationRepository: Sqlite 3.8.2 opening /config/data/fileorganization.db
2015-10-30 19:02:33.5487 Info - AuthenticationRepository: Sqlite 3.8.2 opening /config/data/authentication.db
2015-10-30 19:02:33.5885 Info - SyncRepository: Sqlite 3.8.2 opening /config/data/sync14.db
2015-10-30 19:02:33.7542 Info - ImageMagick: ImageMagick version: ImageMagick 6.9.1-2 Q8 x86_64 2015-06-02 http://www.imagemagick.org
2015-10-30 19:02:33.8075 Info - ImageProcessor: ImageProcessor started with 4 max concurrent image processes
2015-10-30 19:02:33.9580 Info - App: FFMpeg: /usr/bin/ffmpeg
2015-10-30 19:02:33.9580 Info - App: FFProbe: /usr/bin/ffprobe
2015-10-30 19:02:33.9742 Info - SharingRepository: Sqlite 3.8.2 opening /config/data/shares.db
2015-10-30 19:02:34.0117 Warn - App: ffmpeg is missing decoder h264_qsv
2015-10-30 19:02:34.0133 Info - ActivityRepository: Sqlite 3.8.2 opening /config/data/activitylog.db
2015-10-30 19:02:34.0144 Warn - App: ffmpeg is missing decoder mpeg2_qsv
2015-10-30 19:02:34.0170 Warn - App: ffmpeg is missing decoder vc1_qsv
2015-10-30 19:02:34.0427 Info - SqliteDisplayPreferencesRepository: Sqlite 3.8.2 opening /config/data/displaypreferences.db
2015-10-30 19:02:34.0613 Info - SqliteItemRepository: Sqlite 3.8.2 opening /config/data/library.db
2015-10-30 19:02:34.0947 Info - SqliteProviderInfoRepository: Sqlite 3.8.2 opening /config/data/refreshinfo.db
2015-10-30 19:02:34.1384 Info - SqliteUserDataRepository: Sqlite 3.8.2 opening /config/data/userdata_v2.db
2015-10-30 19:02:34.1595 Info - SqliteNotificationsRepository: Sqlite 3.8.2 opening /config/data/notifications.db
2015-10-30 19:02:34.8378 Info - HttpServer: Calling ServiceStack AppHost.Init
2015-10-30 19:02:42.1045 Info - ServiceStackHost: Initializing Application took 8459.332ms
2015-10-30 19:02:42.1534 Info - ServerManager: Loading Http Server
2015-10-30 19:02:42.1615 Info - HttpServer: attempting to load pfx: /config/ssl/cert_9c31b7884ea5475c8687970fc5996297.pfx
2015-10-30 19:02:42.2191 Info - HttpServer: Adding HttpListener prefix http://+:8096/
2015-10-30 19:02:42.2201 Info - HttpServer: Adding HttpListener prefix https://+:8920/
2015-10-30 19:02:43.0886 Info - App: [TVHclient] LiveTvService.createHTSConnection()
2015-10-30 19:02:43.2951 Info - App: Core startup complete
2015-10-30 19:02:43.4732 Info - SsdpHandler: MultiCast socket created
Link to comment
Share on other sites

hurricanehrndz

Try mapping the device in docker, it should be /dev/dri within docker and ensure the user within docker gets added to the right groups. Also I'm not sure if any library files are required. You might need to play around and see what works. If you can figure it out I would be happy to include the changes into the Dockerfile.

 

 

Sent from my D6603 using Tapatalk

Link to comment
Share on other sites

Sorry, I'm kindo clueless here. I'm just testing the docker version on my qnap nas that has a J1900 and does hardware transcoding. I have no idea how to map a device in docker or make sure the user within docker gets added to the right groups.

Link to comment
Share on other sites

Try mapping the device in docker, it should be /dev/dri within docker and ensure the user within docker gets added to the right groups. Also I'm not sure if any library files are required. You might need to play around and see what works. If you can figure it out I would be happy to include the changes into the Dockerfile.

 

 

So I found an option to run the docker image "in privileged mode" on the qnap. Setting this also allowed me the option to give the docker image r/w access to Direct Render Infrastructure.

However there is still a complaint about missing qsv decoders when starting the docker image, are you sure they are included in the ffmpeg version you are using ?

 

On a side note, running inside a docker image still seems to work much better than using "native" qnap app. But havn't been able to test much. It would be so great to get this working on my NAS, because my server does not support qsv, so it would be great to get it working and offload everything emby/media related to the qnap nas.

Link to comment
Share on other sites

hurricanehrndz

If I had a device that would support it, I would be more than happy to assist. Unfortunately that is not the case. Ffmpeg included in the docker is from a third party ppa listed on the ffmpeg site. Unfortunately right now I can't get you the name, also I'm not familiar enough with qsv, but I suspect that perhaps I need video drivers installed.

 

Sent from my D6603 using Tapatalk

Edited by hurricanehrndz
Link to comment
Share on other sites

hurricanehrndz

This is the ppa https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media/

 

Looking at the build log it does seem to include qsv but I'm not 100% certain.

 

In terms of the "in privileged mode" option on the qnap, a query on the qnap forums need to be made asking whether this actually mounts "/dev/dri"  additionally I would require info about what groups and users have permission /dev/dri.

Edited by hurricanehrndz
Link to comment
Share on other sites

I connected to the docker image and /dev/dri is there, 

 

drwxr-xr-x  2 root root        80 Oct 31 19:43 dri

 

intel drivers and libva is installed, I added user 99 to video group, have no idea if it would be needed but I guess it couldn't hurt. I'm poking around blind here since locate was not installed and I don't know the folder structure. Seems everyone has read and execute permission to dri.

 

so I installed locate, and got some emby permission settings to go through, emby was added as user 110.
 

Link to comment
Share on other sites

hurricanehrndz

You might want to run a docker inspect command and ensure that the dri is from the host system.

 

Sent from my D6603 using Tapatalk

Link to comment
Share on other sites

I hit a problem here, seems the qsv is not included in the official trusty, and not even in the ffmpeg.org ppa. So I guess one has to compile ffmpeg with qsv :(

 

I'm afraid that's where I have to stop, if there where some precompiled ffmpeg.deb I could install I guess I could test more, but right now I'm not ready to start installing and building on my nas inside a docker container :D

 

 

ffmpeg version N-76045-g97be5d4 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libdcadec --enable-libfreetype --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
  libavutil      55.  4.100 / 55.  4.100
  libavcodec     57.  6.100 / 57.  6.100
  libavformat    57.  4.100 / 57.  4.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 11.100 /  6. 11.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
Unknown decoder 'h264_qsv'
Edited by KRA
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...