Emby and Mono

  • Hello Aiwouy,

    Yes they released it last night and solved the mono issues and I confirm that your addon is working again.

    Since you built it already I would like to test your updated addon (I`m mostly interested in testing the updated mono).
    Thank you for your help.

  • Hi,

    great Addon! Thanks. I installed Emby on my Cubox i4. It works great until it comes to transcoding. The hardware should be enough to transcode streams, but it seems that nothing happens at all... The CPU load when streaming a movie that should be transcoded does not rise at all.
    I enabled debug logging and a ffmpeg error occurs. Here is the log: http://192.168.178.41:8096/emby/Videos/dc5df99b5459c27b1f3e8704ae3cc04b/hls1/mai - Pastebin.com

    It throws an error in the end and it does not start the stream. Playing without transcoding works.
    The hardware acceleration setting does not make a difference (it is set to OpenMAX). I know there are issues with transcoding, but it seems that some of you guys got it working (with the setback that the transcoded movie plays, which would be acceptable for me).

    Is there any workaround? Seems to be a ffmpeg problem since the "prefix" mode is not known. Would be a great feature if we could get that working. :)

    Thanks a lot!

    edit: Use dedicated ffmpeg/ffprobe (experimental) is also enabled

    Edited once, last by Jonsky (December 15, 2016 at 5:26 PM).


  • emby ships with ffmpegx, which enables mmal and omx hardware acceleration for RPi. I did not implement any specific transcoding features for other arm devices, because i am not aware of any. If you know what could be implemented, send me a link to document it, and i will gladly improve ffmpegx accordinly. Bear in mind that i will not be able to test.

  • emby ships with ffmpegx, which enables mmal and omx hardware acceleration for RPi. I did not implement any specific transcoding features for other arm devices, because i am not aware of any. If you know what could be implemented, send me a link to document it, and i will gladly improve ffmpegx accordinly. Bear in mind that i will not be able to test.

    Hi,
    thanks for the answer, I am willing to contribute / test, because it's a cool feature, but my knowledge in that area is limited.

    The imx-processors are Cortex-A9, so a ARMv7-A architecture (same as RPi2) with Vivante GC GPUs (i.MX - Wikipedia).
    I couldn't find any more information concerning hardware acceleration like OpenMAX or mmal, most likely because I don't really know what to look for but the iMX-processor seems to have things like that as well.

    But before we think about HW-acceleration, I'm wondering why we got the errors in the log (that ffmpeg does not know the "preset"-option). I tried it with the same command via SSH and "-crf" and "-tune" are also unknown by the ffmpeg file I use. This is most likely not Hardware-related or where do you the the ffmpegx from? Would it be helpful to send you my version?

    Thanks a lot again. :) Great work so far.

    edit: concerning the error ffmpeg throws I found this: ruby on rails - ffmpeg on Heroku: unrecognized option 'preset' - Stack Overflow Seems to be a compiling problem.

    Edited once, last by Jonsky (December 16, 2016 at 11:21 AM).

  • Emby can not transcode using stock LE ffmpeg. I have therefore added the ffmpegx package to build the same source as LE ffmpeg with the features required by Emby, in particular omx transcoding for the Pi. Then I asked the Emby dev to add support for omx. We could repeat the process for imx.

    Source of ffmpegx is here: LibreELEC.tv/package.mk at master · LibreELEC/LibreELEC.tv · GitHub


  • Emby can not transcode using stock LE ffmpeg. I have therefore added the ffmpegx package to build the same source as LE ffmpeg with the features required by Emby, in particular omx transcoding for the Pi. Then I asked the Emby dev to add support for omx. We could repeat the process for imx.

    Source of ffmpegx is here: LibreELEC.tv/package.mk at master · LibreELEC/LibreELEC.tv · GitHub

    Sound like a plan. I cannot tell how much effort this means for you and what kind of support / information you need from me. Testing is no problem. Must be something in this part:

    Code
    if [ "$KODIPLAYER_DRIVER" == "bcm2835-driver" ]; then
           CFLAGS="-DRPI=1 -I$SYSROOT_PREFIX/usr/include/IL -I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads -I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux $CFLAGS"
           FFMPEG_LIBS="-lbcm_host -ldl -lmmal -lmmal_core -lmmal_util -lvchiq_arm -lvcos -lvcsm"
           FFMPEG_RPI_HADE="--enable-mmal --enable-omx-rpi"
    fi

    Looks like the imx6 does not go into the if-loop, but maybe this would be already sufficient?

    Edited once, last by Jonsky (December 16, 2016 at 12:18 PM).


  • clone LE master (or tag 7.90.009) on a unix box, fix ffmpegx, then run: PROJECT=imx6 ARCH=arm scripts/create_addon emby

    OK, tried it on Ubuntu for RPi3 (no other UNIX system available here). Tried it with the setup here: Compile - LibreELEC
    Some packages were missing and I had to install them (perl-related stuff and some other). It does compile for quite a while, but now I have an error that I can't solve even with google-help:

    ccache is missing a --D option. Sorry but this is really deep into building LE-stuff and I can't fix is. Here's the output. Do you have an idea?

    source='/home/ubuntu/LibreELEC.tv/build.LibreELEC-imx6.arm-8.0-devel/binutils-2. - Pastebin.com

  • OK, tried it on Ubuntu for RPi3 (no other UNIX system available here). Tried it with the setup here: Compile - LibreELEC
    Some packages were missing and I had to install them (perl-related stuff and some other). It does compile for quite a while, but now I have an error that I can't solve even with google-help:

    ccache is missing a --D option. Sorry but this is really deep into building LE-stuff and I can't fix is. Here's the output. Do you have an idea?

    source='/home/ubuntu/LibreELEC.tv/build.LibreELEC-imx6.arm-8.0-devel/binutils-2. - Pastebin.com


    No! You need a PC, otherwise you will still be at it at xmas! I will launch a build this w-e ;)


  • No! You need a PC, otherwise you will still be at it at xmas! I will launch a build this w-e ;)

    Oops, sorry. Thought it's just the addon that is build. Didn't know it's more or less the whole LE. I don't have a PC running Ubuntu here. Obviously I'm not a big help for you. ;) Thanks for running the build, when it works I can at least help with a small donation for LE. :D


  • No! You need a PC, otherwise you will still be at it at xmas! I will launch a build this w-e ;)

    Hi,

    I gave it a shot in a fresh Ubuntu in a VM. It worked better, even though it took like 10 hours (oldest Intel Quadcore q6600). Build now reaches the point where ffmpeg is build and exits with an error (see picture). I tried to build it with this package.mk: ################################################################################ - Pastebin.com.

    The error does not tell me anything. Do you have any more ideas? :) I can't tell which of the options is wrong, sorry...

    Thanks a lot.

    edit: tried to narrow it down: the include directories don't exist: I$SYSROOT_PREFIX/usr/include/IL -I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads -I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux $CFLAGS" .
    For the first one I solved it with installing package libdevil-dev
    The last two one seem to be in this git: userland/interface at master · raspberrypi/userland · GitHub
    I compiled it with ./buildme and put the "interface" folder to /usr/include so the direcetories exist. However every option except -ldl from the FFMPEG_LIBS variable makes the compiling process fail. I thinks I'm missing something here and I'm really at the end of my knowledge... Maybe you have an idea? :)

    edit2: the rpi-omx support seems to be related to packages libomxil-bellagio-bin and libomxil-bellagio-dev, but i couldn't find similar things for the other extra libs...

  • Hello,

    I`ve tried the updated addon you sent me and it throws the error:

    line 1: syntax error: unexpected word (expecting ")")

    Since Emby 3.1 now requires mono 4.6 It`ll be stuck in 3.0.8500 until the addon can be succesfully updated. I tried to look at some of the code but it`s witchcarft to my eyes. I`m trying to gather some information on how to build but I gotta say I feel lost when I read what it needs to be done.


  • No! You need a PC, otherwise you will still be at it at xmas! I will launch a build this w-e ;)

    Hi awiouy,

    were you able to build it for imx6? I think OpenMAX-Support is enough, mmal is not needed.
    I tried to build it mit openmax support and it worked alright, but the transcoding does not work. Emby-Log is here: http://192.168.178.41:8096/emby/videos/00782fd93045aaeb6ba85c1015c17dae/hls1/mai - Pastebin.com.
    The lib is not found at /opt (because /opt does not exist). I could not enable the DRPI=1 switch because my build fails with numerous errors concerning the Userland install. (Some) of my questions:

    - I built the Rasperry Pi Userland. Do I have to use any more switches when cross-compiling? I just used ./buildme and all my errors are somehow related to my build.
    - The compiler does not find the installed Userland files, even though they are in /usr/include/interface as wanted. But the include compiler switch starts with an $SYSROOT_PREFIX. Is that relevant?

    Thanks again. :)

  • Hi awiouy,

    were you able to build it for imx6? I think OpenMAX-Support is enough, mmal is not needed.
    I tried to build it mit openmax support and it worked alright, but the transcoding does not work. Emby-Log is here: http://192.168.178.41:8096/emby/videos/00782fd93045aaeb6ba85c1015c17dae/hls1/mai - Pastebin.com.
    The lib is not found at /opt (because /opt does not exist). I could not enable the DRPI=1 switch because my build fails with numerous errors concerning the Userland install. (Some) of my questions:

    - I built the Rasperry Pi Userland. Do I have to use any more switches when cross-compiling? I just used ./buildme and all my errors are somehow related to my build.
    - The compiler does not find the installed Userland files, even though they are in /usr/include/interface as wanted. But the include compiler switch starts with an $SYSROOT_PREFIX. Is that relevant?

    Thanks again. :)

    Hi Jonsky,

    I tried to build ffmpegx by commenting out the if/fi package lines, and it failed miserably.
    Then I got caught up by other matters.

    If you explain me what you built and how you managed to build it, I might give it a try myself.
    [hr]


    Hello,

    I`ve tried the updated addon you sent me and it throws the error:

    line 1: syntax error: unexpected word (expecting ")")

    Since Emby 3.1 now requires mono 4.6 It`ll be stuck in 3.0.8500 until the addon can be succesfully updated. I tried to look at some of the code but it`s witchcarft to my eyes. I`m trying to gather some information on how to build but I gotta say I feel lost when I read what it needs to be done.

    Hm... Mono 4.6 is still in Debian testing, and imposing it as an Emby requirement is rather bold.
    I will see if I can find the current Debian patches to attempt to build Mono again.
    Last time I built Mono 4.6, it broke addons (WebGrab+Plus).
    In the meantime, you may want to try the Emby Docker container shipped as an add-on by LSIO