Ben Z 86 Posted October 15, 2015 Posted October 15, 2015 Hi, I successfully installed an emby server on my RPi2 with raspbian (jessie) using this guide: https://discourse.osmc.tv/t/howto-install-emby-server/6364 Everything seems to work fine. Except one annoying thing... My problem is similar to this post: http://emby.media/community/index.php?/topic/24157-webclient-recursive-library-scan-missing-mediainfo/ There's a Media Info section at the bottom of any video page (using the web-app). It only shows me "container" and "path" (as shown in Pic 1). Nothing else... The server can't get any video mediainfos. I never had this issue with the Windows emby server version. Is there something wrong with my libmediainfo? I'm not sure if it's always true, but it should have a streamdetails section at the end of nfo files. This is not the case for me (it was when I used windows). I did the following: mediainfo /path/of/my/video It actually worked and gave me all the stream details. This is really strange. I also tried the advanced refresh from the metadata manager. No success. Is it a problem with permissions or something else? I even tried running the server from login as root (not sure if it was a good idea). I'm using samba (CIFS) for my video shares just for info... I attached two server logs. The first one is when I scanned the library with only one movie (shorter). Just in case it isn't enough, I also included a second one with the full scan of my entire library. Apparently, there is a problem with ffprobe. I have no idea what to do. I'm really new with linux and I need some help. Thank you
Luke 38831 Posted October 15, 2015 Posted October 15, 2015 emby server is unable to start ffprobe or ffmpeg. we can't really get the exact error message from the os but it's usually that it doesn't have access to execute it
Ben Z 86 Posted October 15, 2015 Author Posted October 15, 2015 So, there is no solution for now? Can you recommend me to use another OS on my RPi2 that can handle ffmpeg/ffprobe?
Luke 38831 Posted October 15, 2015 Posted October 15, 2015 your solution is to make sure those paths to ffmpeg exist and that the user account running emby server has access to execute them, and probably also that the files are marked as executable
Ben Z 86 Posted October 15, 2015 Author Posted October 15, 2015 The paths I use are exact. When I check properties of those files, it says it's a document troff, not an executable. When I run emby, it says that those files are missing for ffmpeg: libx264 libx265 mpeg4 msmpeg4 libvpx aac ac3 libmp3lame libvorbis srt Do I have to re-install ffmpeg? How am I supposed to get these extra packages?
Ben Z 86 Posted October 15, 2015 Author Posted October 15, 2015 I found this... http://johnvansickle.com/ffmpeg/ I'm not sure if it's good.
Ben Z 86 Posted October 15, 2015 Author Posted October 15, 2015 When I run with this: sudo mono /opt/mediabrowser/MediaBrowser.Server.Mono.exe -ffmpeg "/usr/local/share/man/man1/ffmpeg.1" -ffprobe "/usr/local/share/man/man1/ffprobe.1" I changed the symbols "..." for “...” and it seems that it no longer tells me the missing files for ffmpeg at startup. But the problem is still not resolved...
steve179 2 Posted October 16, 2015 Posted October 16, 2015 This sounds like the problem I had after I tested Emby on my Windows box, loved it and then installed it on my Ubuntu NAS box only for it not to work correctly. I suspect you also can't watch anything through your web browser either without getting an error as transcoding won't be working. The issue, for me at least, was that the wrong version of ffmpeg and ffprobe was installed. Try downloading the static version of ffmpeg from the link benjidave has posted, then replace ffmpeg and ffprobe with the downloaded versions.
Ben Z 86 Posted October 17, 2015 Author Posted October 17, 2015 I'm still getting this error from a refresh scan of a movie at the end of logs: Error - MediaEncoder: Error starting ffprobe I used the static ffmpeg version. It doesn't help or I did something wrong somewhere...
steve179 2 Posted October 17, 2015 Posted October 17, 2015 I assume you copied the downloaded ffmpeg and ffprobe to /usr/bin/ ? If that didn't work then apologies but you must have a different problem to the one I had. Steve
thefirstofthe300 292 Posted October 19, 2015 Posted October 19, 2015 I am betting you are still having permissions problems. Can you post a server log? Also, can you check your file permissions for the ffmpeg executables? Here is a really good explanation of linux permissions. https://www.linux.com/learn/tutorials/309527-understanding-linux-file-permissions
Ben Z 86 Posted October 19, 2015 Author Posted October 19, 2015 (edited) @@thefirstofthe300 I have attached a server log at the 1st post. From a refresh scan, I get this error at the end of the attached server log: Error - MediaEncoder: Error starting ffprobe To answer your questions, for the ffmpeg permissions: owner: root group: staff read: all write: owner execute: all I guess I have to change write for all? Does the permissions for ffprobe and ffserver have to be the same as ffmpeg? Edited October 19, 2015 by benjidave
Luke 38831 Posted October 19, 2015 Posted October 19, 2015 we don't use ffserver but for ffprobe, yes it does have to match.
Ben Z 86 Posted October 19, 2015 Author Posted October 19, 2015 By following the instructions from the link thefirstof300 gave (thanks), I did the following: cd /usr/local/bin sudo chmod 777 ffmpeg sudo chmod 777 ffprobe It doesn't seem to make any difference as shown on this attached log. Maybe should I need to change the owner of those files?
thefirstofthe300 292 Posted October 19, 2015 Posted October 19, 2015 So I am confused now. You said in your original post that you built ffmpeg from source. Where did that ffmpeg and ffprobe binary go? Then you said that you installed the static binary to /opt/ffmpeg. Then you said that you changed the permissions on ffmpeg in /usr/local/bin. Again I ask where is the ffmpeg binary located? Also, what are the versions on ffmpeg? You can get that info using /path/to/ffmpeg/binary --version in the terminal.
thefirstofthe300 292 Posted October 19, 2015 Posted October 19, 2015 So on my Ubuntu box, the permissions for binaries are read+execute (755) with the owner and group being root. That should work just great since it allows you to read and execute binaries but not modify them (thus also making it a security measure). The problem lies in something other than permissions. I noticed the errors are saying something about a file not existing. I am not sure if it means ffmpeg or the media file. Does ls "/media/USB-HDD1/Server/Videos/Films/2 Guns (2013)/2 Guns (2013).mp4" not return an error?
Ben Z 86 Posted October 20, 2015 Author Posted October 20, 2015 (edited) @@thefirstofthe300 Sorry for the confusion. I'm no longer using the static version of ffmpeg. I'm using the built from source, which is in /usr/local/bin (for the executables only). Doing this: ls "/media/USB-HDD1/Server/Videos/Films/2 Guns (2013)/2 Guns (2013).mp4" It doesn't return an error. It just repeats 2 Guns (2013).mp4 as a green text. Also, refering to this guide: https://discourse.osmc.tv/t/howto-install-emby-server/6364 It says to run emby with this: sudo mono /opt/mediabrowser/MediaBrowser.Server.Mono.exe -ffmpeg “/usr/local/share/man/man1/ffmpeg.1” -ffprobe “/usr/local/share/man/man1/ffprobe.1” I'm a little bit confused. It shouldn't be this? sudo mono /opt/mediabrowser/MediaBrowser.Server.Mono.exe -ffmpeg “/usr/local/bin/ffmpeg” -ffprobe “/usr/local/bin/ffprobe” Anyway, none of them work. What are those files (ffmpeg.1 and ffprobe.1)?. I can see that these are Troff documents? Edited October 20, 2015 by benjidave
thefirstofthe300 292 Posted October 21, 2015 Posted October 21, 2015 /usr/local/share/man should be the place that documentation from user-compiled applications is placed. And yes, you should should be using /usr/local/bin/ffmpeg as your -ffmpeg flag if that is the location of the ffmpeg binary. Luke will have to help me with the minimum required ffmpeg version number but can you run /usr/local/bin/ffmpeg -version and let me know what the output is. I am running ffmpeg 2.5.8 and my server is working perfectly so I would suspect you would need to have at least that to get the server working.
thefirstofthe300 292 Posted October 21, 2015 Posted October 21, 2015 Oh crap, I totally forgot to ask. What happens if you cd into /opt/mediabrowser and try to start the server with the command you were using? I wonder if there are some environmental variables that aren't getting set.
Ben Z 86 Posted October 21, 2015 Author Posted October 21, 2015 from: /usr/local/bin/ffmpeg -version I get: ffmpeg version N-76005-g2d0a10e Copyright © 2000-2015 the FFmpeg developers built with gcc 4.9.2 (Raspbian 4.9.2-10) configuration: libavutil 55. 4.100 / 55. 4.100 libavcodec 57. 6.100 / 57. 6.100 libavformat 57. 3.101 / 57. 3.101 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 11.100 / 6. 11.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 / 2. 0.100 I tried that as you asked: cd /opt/mediabrowser sudo mono /opt/mediabrowser/MediaBrowser.Server.Mono.exe -ffmpeg “/usr/local/bin/ffmpeg” -ffprobe “/usr/local/bin/ffprobe” Nothing special happened.
Ben Z 86 Posted October 21, 2015 Author Posted October 21, 2015 I just want to thank you. It's really appreciated that you're trying to resolve my problem.
thefirstofthe300 292 Posted October 22, 2015 Posted October 22, 2015 What is the output of "ldd /usr/local/bin/ffmpeg"? I am just checking to make sure that ffmpeg was compiled with dynamic library links to the necessary libraries.
Ben Z 86 Posted October 22, 2015 Author Posted October 22, 2015 (edited) linux-vdso.so.1 (0x7ea9c000) /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76fd6000) libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0x76fa2000) libxcb-shm.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-shm.so.0 (0x76f97000) libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76f1c000) liblzma.so.5 => /lib/arm-linux-gnueabihf/liblzma.so.5 (0x76ef5000) libbz2.so.1.0 => /lib/arm-linux-gnueabihf/libbz2.so.1.0 (0x76edd000) libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x76eb5000) libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76e8d000) libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76d50000) libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0x76d45000) libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0x76d39000) /lib/ld-linux-armhf.so.3 (0x54b71000) libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76d25000) EDIT: I always get different numbers at the end if I do it again. linux-vdso.so.1 (0x7ef7a000) /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76f83000) libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0x76f4f000) libxcb-shm.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-shm.so.0 (0x76f44000) libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76ec9000) liblzma.so.5 => /lib/arm-linux-gnueabihf/liblzma.so.5 (0x76ea2000) libbz2.so.1.0 => /lib/arm-linux-gnueabihf/libbz2.so.1.0 (0x76e8a000) libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x76e62000) libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76e3a000) libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76cfd000) libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0x76cf2000) libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0x76ce6000) /lib/ld-linux-armhf.so.3 (0x54ad1000) libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76cd2000) linux-vdso.so.1 (0x7ef46000) /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76f55000) libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0x76f21000) libxcb-shm.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-shm.so.0 (0x76f16000) libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76e9b000) liblzma.so.5 => /lib/arm-linux-gnueabihf/liblzma.so.5 (0x76e74000) libbz2.so.1.0 => /lib/arm-linux-gnueabihf/libbz2.so.1.0 (0x76e5c000) libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x76e34000) libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76e0c000) libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76ccf000) libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0x76cc4000) libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0x76cb8000) /lib/ld-linux-armhf.so.3 (0x54ad0000) libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76ca4000) Edited October 22, 2015 by benjidave
thefirstofthe300 292 Posted October 22, 2015 Posted October 22, 2015 (edited) Is that it?!?! No wonder ffmpeg is having a difficult time figuring out the stream details. From what I can tell, you actually don't have ffmpeg compiled with any external codecs linked to it. ffmpeg requires codecs like x264 to be an external library so you will need to install a bunch of the codecs and recompile the ffmpeg binary with the options enabled. That guide is supposed to be just enough to actually get the server to run without complaining from what I am seeing. It isn't meant to allow you actually use ffmpeg for anything as most of the codecs that you likely use are missing. The ffmpeg on my machine is compiled with the following flags: --extra-version='1~vivid' --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libdcadec --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libzvbi --enable-opengl --enable-nonfree --enable-libfdk-aac --enable-libvo_aacenc --enable-version3 --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv --enable-libx265 As my server works perfectly and without errors (related to ffmpeg), you will need to compile ffmpeg using something like ./configure --prefix=/usr/local --extra-version='1~vivid' --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libdcadec --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libzvbi --enable-opengl --enable-nonfree --enable-libfdk-aac --enable-libvo_aacenc --enable-version3 --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv --enable-libx265 If you get an error saying something like "ERROR: libx264 not found", you will need to install that library (x264) somehow, either by installing it from the repos or by compiling it yourself. Here "apt-cache search" piped to "grep" will be your friend. Example, I was able to find the x264 library by running "apt-cache search x264" and reading the summaries. Installing x264 for me was a simple matter of "apt-get install x264". To find the libmp3lame library, I ran "apt-cache search mp3 | grep libmp3", sifting out the obviously wrong libraries before finding what i wanted "libmp3lame0" or "libmp3lame-dev". If you have any questions on those commands, there are plenty of good resources just a Google search away. I have an extremely limited knowledge of them. You more than likely don't actually need most of those options but I actually don't know exactly what Emby uses for codecs and what you have in your library so probably good to be on the safe side. Most of the libraries you can track down before you attempt to compile ffmpeg by just looking through the flags and looking at what ones have a "lib" in the name. If that isn't in the repo, Google it and see what comes up: it may not be a library. If you wind up needing to compile them, you can find a lot of the source code for the libraries you will need here. I hope this helps get you going. This is shaping up to be a good learning experience, isn't it. Edited October 22, 2015 by thefirstofthe300
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