gbarone123 4 Posted November 19, 2018 Share Posted November 19, 2018 With the recent move by FreeNAS to 11.2, and the corresponding move from warden to iocage, I had been putting off my FreeNAS upgrade as all my plugins were still working. I finally made the jump to 11.2rc2, and had to rebuild my plugins that use the iocage backend. The install via plugin of Emby 3.5.3.0 worked without issue using the new UI. After adding the video libraries and re-scanning, everything seemed normal. Playback worked on ios clients without incident, but other clients had playback issues with ffmpeg errors in the logs. After searching several threads I found a solution. Here is a step-by-step of the fix for those experiencing this issue. Go easy, it's my first attempt. Also, thanks to all you gurus who helped me along the way with posts like this. This assumes you have: FreeNAS 11.2rc2 Emby installed via plugin using iocage Playback issues, with ffmpeg as the prime suspect 1. Enter the shell of your Emby jail, either via the GUI jail shell, or using SSH If using SSH, from the freenas root prompt type "jls" to get a list of your jails, followed by "jexec #" where # is the emby jail number 2. You should now be at the root prompt of your Emby iocage jail. Now enter "portsnap fetch extract" This will take some time 3. Once the process completes, you should be back to the root prompt of the emby jail. type "cd /usr/ports/multimedia/ffmpeg" type "make install clean" When prompted, make sure to check lame, opus, and x265 (libass was not listed for me, but check it if it's there) This process will take some time as well, and you'll have to press enter a bunch of times, just leave everything else as default If everything worked correctly, you should be back at the root prompt of the emby jail 4. Now we need to edit the emby startup script to use the new ffmpeg we just compiled type "vi /usr/local/etc/rc.d/emby-server" There are 5 lines that we need to edit (example of mine, make the changes to match the red text) [ -z "${emby_server_user}" ] && emby_server_user=emby[ -z "${emby_server_group}" ] && emby_server_group=emby[ -z "${emby_server_data_dir}" ] && emby_server_data_dir=/var/db/emby-server[ -z "${emby_server_ffmpeg}" ] && emby_server_ffmpeg=/usr/local/bin/ffmpeg[ -z "${emby_server_ffprobe}" ] && emby_server_ffprobe=/usr/local/bin/ffprobe: ${emby_server_enable:="no"}: ${emby_server_user:="emby"}: ${emby_server_group:="emby"}: ${emby_server_data_dir:="/var/db/emby-server"}: ${emby_server_ffmpeg:="/usr/local/bin/ffmpeg"}: ${emby_server_ffprobe:="/usr/local/bin/ffprobe"}export LD_LIBRARY_PATH=/usr/local/lib 5. Save the file, return to the FreeNAS GUI and restart the emby server plugin. Playback issues should now be resolved. 2 Link to comment Share on other sites More sharing options...
Luke 37065 Posted November 19, 2018 Share Posted November 19, 2018 Thanks for the info. I will ask josh4trunks to update the freenas plugin to resolve this. This workaround will only work for a limited time as we'll be shipping a customized ffmpeg in 3.6. Link to comment Share on other sites More sharing options...
gbarone123 4 Posted November 19, 2018 Author Share Posted November 19, 2018 Luke, I assume that this fix should not affect anything when upgrading to 3.6, as the startup script should be re-created pointing to the correct location for the customized ffmpeg. Is that correct? Link to comment Share on other sites More sharing options...
Luke 37065 Posted November 19, 2018 Share Posted November 19, 2018 Well I haven't tested what you're doing so it's hard to say. Link to comment Share on other sites More sharing options...
sluggo45 47 Posted November 20, 2018 Share Posted November 20, 2018 Updates overwrite the startup script, yes. Any update, even for 3.5. 1 Link to comment Share on other sites More sharing options...
Luke 37065 Posted November 20, 2018 Share Posted November 20, 2018 Thanks ! Link to comment Share on other sites More sharing options...
dbx10 0 Posted December 10, 2018 Share Posted December 10, 2018 Very new to FreeNAS / FreeBSD. I tried this workaround but when trying to change the emby startup script in vi, I can't mount as rw. I'm stuck in read only and I have no idea what I'm doing. Am I missing something? Link to comment Share on other sites More sharing options...
makarai 108 Posted December 10, 2018 Share Posted December 10, 2018 (edited) Very new to FreeNAS / FreeBSD. I tried this workaround but when trying to change the emby startup script in vi, I can't mount as rw. I'm stuck in read only and I have no idea what I'm doing. Am I missing something? Maybe give this a try! Delete all existing jails of emby, and follow one of these step. I recommend the beta installation as i have tested it quite extensively by now. You need to open a shell from the side panel in freenas (button shell) FreeNAS Simple Installation Requires FreeNAS 11.2 Stable This Installation method will create a Jail that is fully configurable via the FreeNAS GUI LATEST STABLE cd /tmp wget https://raw.githubusercontent.com/MediaBrowser/iocage-amd64/master/emby-server.json iocage fetch -P dhcp=on vnet=on bpf=yes allow_raw_sockets=1 -n emby-server.json --branch 'master' LATEST BETA (76) cd /tmp wget https://raw.githubusercontent.com/ma-karai/iocage-plugin-emby/beta/emby-server-beta.json iocage fetch -P dhcp=on vnet=on bpf=yes allow_raw_sockets=1 -n emby-server-beta.json --branch 'beta' Edited April 26, 2019 by makarai 1 Link to comment Share on other sites More sharing options...
Fostersimp 3 Posted December 10, 2018 Share Posted December 10, 2018 Hi Makarai, I tested both versions of your installation method Stable & Beta. Stable > I had the same ffmpeg issues as every one else has been reporting Beta > No issues Link to comment Share on other sites More sharing options...
makarai 108 Posted December 10, 2018 Share Posted December 10, 2018 Hi Makarai, I tested both versions of your installation method Stable & Beta. Stable > I had the same ffmpeg issues as every one else has been reporting Beta > No issues Glad it worked for you, i pinged @@Luke and mentioned that the stable has an issue, due to the fact that some dependencies are not ok. I think i mentioned that around the time when 3.5.3 came out. Also a reason why recommend the beta to people Link to comment Share on other sites More sharing options...
dbx10 0 Posted December 11, 2018 Share Posted December 11, 2018 Installing the beta seems to work, but the metadata doesn't work properly. I'll list the issues I currently have in the appropriate section of the forum.Thanks a lot for the help! Link to comment Share on other sites More sharing options...
DangerIsGo 0 Posted December 13, 2018 Share Posted December 13, 2018 I'm trying to make ffmpeg on a fresh iocage jail and i'm getting the following error: root@emby_2:/usr/ports/multimedia/ffmpeg # make install clean ===> ffmpeg-4.1_1,1 depends on executable: nasm - found ===> ffmpeg-4.1_1,1 depends on file: /usr/local/bin/as - not found ===> binutils-2.30_7,1 depends on file: /usr/local/lib/libgmp.so - found ===> binutils-2.30_7,1 depends on file: /usr/local/lib/libmpfr.so - not found ===> Patching for mpfr-4.0.1_2 ===> Applying distribution patches for mpfr-4.0.1_2 1 out of 1 hunks failed--saving rejects to src/mpfr.h.rej Ignoring previously applied (or reversed) patch. 1 out of 1 hunks ignored--saving rejects to src/sub1sp.c.rej Ignoring previously applied (or reversed) patch. 4 out of 4 hunks ignored--saving rejects to tests/tsub.c.rej 1 out of 2 hunks failed--saving rejects to tests/tsub1sp.c.rej *** Error code 1 Stop. make[5]: stopped in /usr/ports/math/mpfr *** Error code 1 Stop. make[4]: stopped in /usr/ports/math/mpfr *** Error code 1 Stop. make[3]: stopped in /usr/ports/devel/binutils *** Error code 1 Stop. make[2]: stopped in /usr/ports/devel/binutils *** Error code 1 Stop. make[1]: stopped in /usr/ports/multimedia/ffmpeg *** Error code 1 Stop. make: stopped in /usr/ports/multimedia/ffmpeg This happened with a previous emby iocage jail so I blew that away and made a new one. Now I'm getting this. Any ideas? OS is: FreeBSD 11.2-STABLE (FreeNAS.amd64) #0 r325575+fc3d65faae6(freenas/11.2-stable) Link to comment Share on other sites More sharing options...
makarai 108 Posted December 13, 2018 Share Posted December 13, 2018 (edited) I'm trying to make ffmpeg on a fresh iocage jail and i'm getting the following error: root@emby_2:/usr/ports/multimedia/ffmpeg # make install clean ===> ffmpeg-4.1_1,1 depends on executable: nasm - found ===> ffmpeg-4.1_1,1 depends on file: /usr/local/bin/as - not found ===> binutils-2.30_7,1 depends on file: /usr/local/lib/libgmp.so - found ===> binutils-2.30_7,1 depends on file: /usr/local/lib/libmpfr.so - not found ===> Patching for mpfr-4.0.1_2 ===> Applying distribution patches for mpfr-4.0.1_2 1 out of 1 hunks failed--saving rejects to src/mpfr.h.rej Ignoring previously applied (or reversed) patch. 1 out of 1 hunks ignored--saving rejects to src/sub1sp.c.rej Ignoring previously applied (or reversed) patch. 4 out of 4 hunks ignored--saving rejects to tests/tsub.c.rej 1 out of 2 hunks failed--saving rejects to tests/tsub1sp.c.rej *** Error code 1 Stop. make[5]: stopped in /usr/ports/math/mpfr *** Error code 1 Stop. make[4]: stopped in /usr/ports/math/mpfr *** Error code 1 Stop. make[3]: stopped in /usr/ports/devel/binutils *** Error code 1 Stop. make[2]: stopped in /usr/ports/devel/binutils *** Error code 1 Stop. make[1]: stopped in /usr/ports/multimedia/ffmpeg *** Error code 1 Stop. make: stopped in /usr/ports/multimedia/ffmpeg This happened with a previous emby iocage jail so I blew that away and made a new one. Now I'm getting this. Any ideas? OS is: FreeBSD 11.2-STABLE (FreeNAS.amd64) #0 r325575+fc3d65faae6(freenas/11.2-stable) Hi, can you try this installation method and give the beta a shot! LATEST BETA (76) cd /tmp wget https://raw.githubusercontent.com/ma-karai/iocage-plugin-emby/beta/emby-server-beta.json iocage fetch -P dhcp=on vnet=on bpf=yes allow_raw_sockets=1 -n emby-server-beta.json --branch 'beta' Edited April 26, 2019 by makarai 1 Link to comment Share on other sites More sharing options...
DangerIsGo 0 Posted December 13, 2018 Share Posted December 13, 2018 Hi, can you try this installation method and give the beta a shot! LATEST BETA (76) cd /tmp wget https://raw.githubusercontent.com/bott0r/iocage-plugin-emby/beta/emby-server-beta.json iocage fetch -P dhcp=on vnet=on bpf=yes allow_raw_sockets=1 -n emby-server-beta.json --branch 'beta' That worked for me, thanks! Is there going to be any official way in the future of installing in iocage jails? Or a more updated PBI release schedule for freenas plugins?? Link to comment Share on other sites More sharing options...
Luke 37065 Posted December 13, 2018 Share Posted December 13, 2018 Yes we are working on this. Thanks guys. Link to comment Share on other sites More sharing options...
gbarone123 4 Posted December 14, 2018 Author Share Posted December 14, 2018 Update for those curious, I upgraded to 3.6.0.76 last night from my setup described above using the following command: pkg add -f https://github.com/MediaBrowser/Emby.Releases/releases/download/X.X.X.X/emby-server-freebsd_X.X.X.X_amd64.txz Of note, I was missing the dependency “libraw” and had to just run “pkg install libraw” first for the Emby server download to run. After Emby server restart, everything seems to work perfectly. I haven’t dug deeper into whether the startup script changed, or if I’m still on the manually compiled ffmpeg, but if you followed my guide and had success, upgrading seems to be a three-command process from the shell. Link to comment Share on other sites More sharing options...
Luke 37065 Posted December 14, 2018 Share Posted December 14, 2018 Thanks for the feedback ! Link to comment Share on other sites More sharing options...
rsvp 0 Posted January 5, 2019 Share Posted January 5, 2019 Hi, I love the integration into Kodi, and that is what made me move over to Emby. But this has been down for a very long time....Do you have an ETA on the actual plugin being released? I have tried every option on line that people are posting to fix it. For one reason or another none of them are working. All come up with some error. Link to comment Share on other sites More sharing options...
justFlow 0 Posted January 5, 2019 Share Posted January 5, 2019 (edited) Yeah, right now it seems more like an organizationally issue to provide a working emby plugin for FreeNAS 11.2 ... plugin not updated, infos spreaded all over, obsolete links etc. But #8 from makarai still works for me after updating the link to the latest emby beta release 83 (otherwise post_install.sh fails with an error at the end of the iocage plugin install). So exec the (adjusted) commands in post_install.sh inside the emby jail manually after plugin install: # Install the binary package #pkg add --force https://github.com/MediaBrowser/Emby.Releases/releases/download/3.5.3.0/emby-server-freebsd_3.5.3.0_amd64.txz #pkg add --force https://github.com/MediaBrowser/Emby.Releases/releases/download/3.6.0.75/emby-server-freebsd_3.6.0.75_amd64.txz #pkg add --force https://github.com/MediaBrowser/Emby.Releases/releases/download/3.6.0.80/emby-server-freebsd_3.6.0.80_amd64.txz pkg add --force https://github.com/MediaBrowser/Emby.Releases/releases/download/3.6.0.83/emby-server-freebsd_3.6.0.83_amd64.txz # Enable the service sysrc -f /etc/rc.conf emby_server_enable="YES" # Start the service service emby-server start 2>/dev/null hf Edited January 5, 2019 by justFlow Link to comment Share on other sites More sharing options...
makarai 108 Posted January 6, 2019 Share Posted January 6, 2019 I have been on vacation, and I can update the repo of course. I assume the problems with the stable have not changed @@Luke? Link to comment Share on other sites More sharing options...
Luke 37065 Posted January 6, 2019 Share Posted January 6, 2019 Correct, with the new release coming so soon we've just been focusing on that. It should only be a matter of days away now. Link to comment Share on other sites More sharing options...
draino 0 Posted January 9, 2019 Share Posted January 9, 2019 With the recent move by FreeNAS to 11.2, and the corresponding move from warden to iocage, I had been putting off my FreeNAS upgrade as all my plugins were still working. I finally made the jump to 11.2rc2, and had to rebuild my plugins that use the iocage backend. The install via plugin of Emby 3.5.3.0 worked without issue using the new UI. After adding the video libraries and re-scanning, everything seemed normal. Playback worked on ios clients without incident, but other clients had playback issues with ffmpeg errors in the logs. After searching several threads I found a solution. Here is a step-by-step of the fix for those experiencing this issue. Go easy, it's my first attempt. Also, thanks to all you gurus who helped me along the way with posts like this. This assumes you have: FreeNAS 11.2rc2 Emby installed via plugin using iocage Playback issues, with ffmpeg as the prime suspect 1. Enter the shell of your Emby jail, either via the GUI jail shell, or using SSH If using SSH, from the freenas root prompt type "jls" to get a list of your jails, followed by "jexec #" where # is the emby jail number 2. You should now be at the root prompt of your Emby iocage jail. Now enter "portsnap fetch extract" This will take some time 3. Once the process completes, you should be back to the root prompt of the emby jail. type "cd /usr/ports/multimedia/ffmpeg" type "make install clean" When prompted, make sure to check lame, opus, and x265 (libass was not listed for me, but check it if it's there) This process will take some time as well, and you'll have to press enter a bunch of times, just leave everything else as default If everything worked correctly, you should be back at the root prompt of the emby jail 4. Now we need to edit the emby startup script to use the new ffmpeg we just compiled type "vi /usr/local/etc/rc.d/emby-server" There are 5 lines that we need to edit (example of mine, make the changes to match the red text) [ -z "${emby_server_user}" ] && emby_server_user=emby [ -z "${emby_server_group}" ] && emby_server_group=emby [ -z "${emby_server_data_dir}" ] && emby_server_data_dir=/var/db/emby-server [ -z "${emby_server_ffmpeg}" ] && emby_server_ffmpeg=/usr/local/bin/ffmpeg [ -z "${emby_server_ffprobe}" ] && emby_server_ffprobe=/usr/local/bin/ffprobe : ${emby_server_enable:="no"} : ${emby_server_user:="emby"} : ${emby_server_group:="emby"} : ${emby_server_data_dir:="/var/db/emby-server"} : ${emby_server_ffmpeg:="/usr/local/bin/ffmpeg"} : ${emby_server_ffprobe:="/usr/local/bin/ffprobe"} export LD_LIBRARY_PATH=/usr/local/lib 5. Save the file, return to the FreeNAS GUI and restart the emby server plugin. Playback issues should now be resolved. The above fix worked for me. I'm adding some info below in case it helps someone. I see 3.6 is almost out so not looking to fix 3.5.3. The error I was getting before I followed gbarone123's steps above was: "Shared object "libx264.so.152" not found, required by "libavcodec.so.58"" I looked in the /usr/local/lib/emby-server/lib folder and didn't see a libx264. when executing the binaries in /usr/local/lib/emby-server/bin/[ffmpeg, ffprobe] they both ran without error, but would fail when running the full command emby-server was sending it: (/usr/local/lib/emby-server/bin/ffmpeg -i file:"/media/MediaBrowser/music/Pink Floyd - Time.mp3" -threads 0 -vn -ab 384000 -ac 6 -id3v2_version 3 -write_id3v1 1 -y "/var/db/emby-server/transcoding-temp/ff19a3ed8f3d082964d1a77130cfc8e9.aac"} Side note: I did have one folder with incorrect permissions that was causing a separate issue, so look at your logs (Logs side bar <emby-server-url:8096/web/index.html#!/log.html ) Thanks everyone Link to comment Share on other sites More sharing options...
Luke 37065 Posted January 10, 2019 Share Posted January 10, 2019 Thanks for the info ! Link to comment Share on other sites More sharing options...
gbarone123 4 Posted January 10, 2019 Author Share Posted January 10, 2019 Draino, Now that you have a working instance of emby server (I assume 3.5.3.0 since it's the plugin), I recommend you run the following commands from the root shell of your emby jail: pkg install libraw pkg add -f https://github.com/MediaBrowser/Emby.Releases/releases/download/X.X.X.X/emby-server-freebsd_X.X.X.X_amd64.txz(change the X's to whatever version you want from the github page, latest current for FreeNAS is 4.0.0.0 at the time of this post) service emby-server restart (I tend to use the FreeNAS GUI and restart the plugin that way, but either should work) I'm currently running 3.6.0.79 and it's been very stable. I had some crash issues with .76, was thinking of upgrading to .84 but held off. Version 4.0.0.0 seems to have been posted since last night and this morning. Haven't read all the release notes yet. Link to comment Share on other sites More sharing options...
gbarone123 4 Posted January 10, 2019 Author Share Posted January 10, 2019 Also recommend you read this before you make the jump to 4.0.0.0, some major changes there. https://emby.media/community/index.php?/topic/67664-40-beta-last-before-stable/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now