Jump to content

MB3 on FreeNAS plugin


prashy21

Recommended Posts

woodsb02

This also means that an advanced FreeNAS user can install MediaBrowser to by using a portsjail.

 

@@josh4trunks is working on building an easy pbi for FreeNAS. I think then it's needs separate work to provide it as an official FreeNAS plugin?

Link to comment
Share on other sites

woodsb02

what is the exact step for

 

# enable the lame option

 

just need to know what to write on the download page. thanks.

When the user ran the previous step, they will be presented with a dialog style interface where they simply scroll down to the lame option, push space to enable it and then enter to save that setting. This is really assumed knowledge on FreeBSD and is explained in the official handbook here: https://www.freebsd.org/doc/handbook/ports-using.html

Link to comment
Share on other sites

josh4trunks

@@woodsb02

i'll basically create a standard pbi, but it has some additional Python files freenas executes to have an api to control the plugin. I then submit the pbi to bugs.freenas.org and they add it to the repo.

 

I'll push my pbi source to freenas' github so others can more easily maintain it.

Link to comment
Share on other sites

Great stuff here. we should have it on the download page this weekend, and then i'll get a blog post announcement up about it.

Link to comment
Share on other sites

woodsb02

more questions =P

 

 

* is the mp3 message necessary? if they are installing from ports they would have the choice to enable this. I guess it's a way to warn people who installed MB from a package so they can uninstall ffmpeg and compile it. I just don't see other multimedia ports giving this warning.

 

* I actually bundle ffmpeg, compiled with lame, with my subsonic/headphones freenas plugin. I know there is some licensing issues around doing this =\ should we do the same with the MB plugin? I know they wanted to add a license feature to freenas plugins but I don't think it ever happened. how do plex/xbmc/openelec get away with this?

 

* do you we need to have MBs files under lib/mediabrowser? Is share/mediabrowser OK or did you put them under lib for a reason?

 

Thanks, I'll try to get my changes in tonight.

 

  • I believe the mp3 message is necessary, to inform people who install mediabrowser through FreeBSD packages rather than ports (which will probably be most people). Since it is not really obvious what went wrong if MediaBrowser cannot find a suitable audio codec to transcode to (it just fails to play in my experience), I know it will be a common question from people trying to get this working on FreeBSD. Therefore I thought it prudent to prompt people when they install it - the message doesn't do any harm.

 

 

  • The mediabrowser files mostly consist of dlls (libraries), so I installed them in /usr/local/lib/mediabrowser. No reason we can't have them in /usr/local/share/mediabrowser... its just it didn't seem to make as much sense (except for the mediabrowser/dashboard-ui and mediabrowser/swagger-ui folders). Any reason you want to put them in share/mediabrowser?

 

also, I see what I can do as far as compiling the plugin (pbi). basically were in a weird zone where plugins can't be compiled cause, as far as I know, they rely on the old pkg tools. this broke like a month a ago so I need to stay on an old version of the ports tree, and manually update the ports I needs new versions of. hope this gets resolved soon and everything works with the new pkg tools.

 

Ouch... sounds more painful than it should be. I am sure that will have to be resolved soon though (surely)!

Link to comment
Share on other sites

yea you need to make sure mp3 gets in there. it doesn't matter whether users have mp3's or not, what matters is the playback format required by devices. If a device requires mp3 and we can't transcode to it, then that's a big problem.

Link to comment
Share on other sites

josh4trunks

sounds great, pkg-message should point many in the right direction.

I guess I wanted to use 'share' cause that's what plex uses but many of those are libs and their compiled for this arch so I take it back, lol.

 

I'll include mp3 support in the freenas plugin. I'll also submit a feature request to allow user licence acceptance for freenas plugins.

Link to comment
Share on other sites

woodsb02

Good news - MediaBrowser is today officially available in the FreeBSD ports tree.

 

Within a few days the package will be automatically built and available.

 

To install it, you simply run:

pkg install mediabrowser

 

To run it, you then run:

service mediabrowser start

 

The only other complication (which is alerts the user to when they install it) is that FFMpeg is not built with lame support by default. To provide MP3 transcoding support, FFMpeg will need to be compiled from ports with the lame option selected. Simply run the following:

cd /usr/ports/multimedia/ffmpeg

make config

# enable the lame option

make

make deinstall

make reinstall

 

That's all. I am working to get some patches applied to mono to enable DLNA to work.

 

@@josh4trunks I will submit another FreeBSD bug report to change the rc script and storage location

Link to comment
Share on other sites

josh4trunks

@@woodsb02

 

See the attached patch. Changes include..

  1. updated to latest mediabrowser tag
  2. using /var/db/mediabrowser as the support path by default
  3. use built in rc.subr instead of custom ones
  4. a bunch of substitutions, most for %%PORTNAME%%
    • This make things a little harder to read sometimes, but in my opinion easier when maintaining different ports with similar rc.d

mediabrowser-patch.txt

Edited by josh4trunks
Link to comment
Share on other sites

josh4trunks

Ok, I got a plugin (PBI) that people can upload and test on their FreeNAS. Below are some things that we should test, you guys can probably think of more than I can.

  • mozilla cert being imported?
  • ffmpeg transcoding working?
  • dlna working?

https://www.jruehlig.com/owncloud/public.php?service=files&t=b645c9360d7ac24557c0ca0f37e94e1e

If this is deemed bug-free I'll submit the plugin to the FreeNAS repo and push my source code to the FreeNAS github.

 

 

==========

 

I noticed some settings that mentioned "automatic update". Does Media Browser have an automatic update feature? If so, I'd assume it'd need ownership of lib/mediabrowser? This would save someone from having to upload PBIs to the FreeNAS plugin repo everytime Media Browser issued an update.

 

EDIT

I realized for this to happen the FreeBSDx64 binaries would need to be compiled and posted somewhere, lol. Ok, I assume this isn't a possibility for the time being.

Edited by josh4trunks
Link to comment
Share on other sites

woodsb02

@@woodsb02

 

See the attached patch. Changes include..

  • updated to latest mediabrowser tag
  • using /var/db/mediabrowser as the support path by default
  • use built in rc.subr instead of custom ones
  • a bunch of substitutions, most for %%PORTNAME%%
  • This make things a little harder to read sometimes, but in my opinion easier when maintaining different ports with similar rc.d

Thanks, I'll submit a PR to incorporate this tonight

Link to comment
Share on other sites

woodsb02

I realized for this to happen the FreeBSDx64 binaries would need to be compiled and posted somewhere, lol. Ok, I assume this isn't a possibility for the time being.

Actually, the mono DLLs and EXEs are platform independent, so it could work in theory.

 

However, for some reason I thought this feature was disabled on Linux/FreeBSD?

Link to comment
Share on other sites

josh4trunks

Actually, the mono DLLs and EXEs are platform independent, so it could work in theory.

 

However, for some reason I thought this feature was disabled on Linux/FreeBSD?

So FreeBSD doesn't usualy like when applications have an update mechanism outside the system wide one cause then things aren't built/verified through them. But, if we didn't support automatic updating I could see users thinking something is wrong with the FreeBSD version or their install. So, if this is an option, we should decide if we want to support this or not by changing the owner/group of 'lib/mediabrowser' to the mediabrowser user.

 

For FreeNAS I probably would allow this with a chown, this saves me the trouble of re-compiling and and re-submitting to the repo everytime Media Browser issues a release (which seems to be pretty often).

 

Finally, are all files in "lib/mediabrowser" platform independant, and interpreted by mono? That makes it seem more to me like they should be in "share/mediabrowser" according to this https://www.freebsd.org/doc/handbook/dirstructure.html

Edited by josh4trunks
Link to comment
Share on other sites

woodsb02

 

@@woodsb02

 

See the attached patch. Changes include..

  1. updated to latest mediabrowser tag
  2. using /var/db/mediabrowser as the support path by default
  3. use built in rc.subr instead of custom ones
  4. a bunch of substitutions, most for %%PORTNAME%%
    • This make things a little harder to read sometimes, but in my opinion easier when maintaining different ports with similar rc.d

 

 

Please see my FreeBSD bug report here to incorporate these improvements (with some personal changes):

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194904

 

I have kept mediabrowser installed in /usr/local/lib/mediabrowser for now, since that is where other mono applications seem to be installed:

Link to comment
Share on other sites

josh4trunks

 

Please see my FreeBSD bug report here to incorporate these improvements (with some personal changes):

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194904

 

I have kept mediabrowser installed in /usr/local/lib/mediabrowser for now, since that is where other mono applications seem to be installed:

 

Awesome thanks!

Link to comment
Share on other sites

woodsb02

Ok, I got a plugin (PBI) that people can upload and test on their FreeNAS. Below are some things that we should test, you guys can probably think of more than I can.

  • mozilla cert being imported?
  • ffmpeg transcoding working?
  • dlna working?

 

I haven't had a chance to look at the pbi... assume this bundles mono with the necessary patches, and bundles ffmpeg with lame support?

Link to comment
Share on other sites

josh4trunks

I haven't had a chance to look at the pbi... assume this bundles mono with the necessary patches, and bundles ffmpeg with lame support?

Exactly. I was thinking of posting a thread to ask for testers on the FreeNAS forums. I don't really know what to look for cause I've never used MB yet.

 

I made a thread asking for testers in the FN forums https://forums.freenas.org/index.php?threads/freenas-9-plugin-media-browser.24635/

Edited by josh4trunks
Link to comment
Share on other sites

Beardyname

Hi,

 

I'm trying to get MB to work on FreeNAS.  Is this the right thread to report problems or ask questions?

 

Thanks,

Saurav.

 

Either here or make a new thread :)

Link to comment
Share on other sites

Ok.  First question :-)

 

I am trying to play music via DLNA.  Tried my TV and blu-ray player and I don't see an option to list my music sorted "By Folder".  That's a bug, misconfiguration or some other error, right?  If everything works ok, I will have an option to get my music listed "By Folder" like it is on the storage filesystem?

Link to comment
Share on other sites

Beardyname

Actually I don't know about that one, hopefully someone else can chime in on that since i rarely use dlna anyway.

 

*edit* just for shits and giggles i tried to use dlna to browse the server, there was a folder option. But then it got crazy with all the artists. So yes there should be one but i did not like it :) (at least from inside Windows Media Player)

Edited by Beardyname
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...