This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

[HOWTO] Install Universal Media Server on Finch / Qjail-3.5

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
dreamcat4
experienced User
experienced User
Posts: 111
Joined: 21 Mar 2014 21:59
Status: Offline

[HOWTO] Install Universal Media Server on Finch / Qjail-3.5

Post by dreamcat4 »

Description:

Universal Media Server is a DLNA / PNP media server. It is a fork and successor of the popular "PS3 Media Server". It has best support for many client devices, known as "media renderers". With several transcoders. Since Version 4 is now officially in the FreeBSD ports tree it is easier to install now. And includes a simple web interface with HTML5 / flash player. Which is great for movie playback on tablets and smartphone devices.

http://www.universalmediaserver.com/

HOW-TO Link:

https://gist.github.com/dreamcat4/1ca69c7f1d215eafcfa7

Most of the commands can be copy-pasted and should "just work". However if you wish, it is possible to change some variables near the top. For example "jail_ip=", "jail_loopback=" and "jailname=".

mekonghigh
Starter
Starter
Posts: 39
Joined: 13 Oct 2013 18:03
Status: Offline

Re: [HOWTO] Install Universal Media Server on Finch / Qjail-

Post by mekonghigh »

I followed your howto to install Universal Media Server, but now i'm stuck at:

# Install mencoder dependancy

Code: Select all

ums ~/ root~# cd /usr/ports/multimedia/mencoder && BATCH=YES make install
-bash: cd: /usr/ports/multimedia/mencoder: No such file or directory
In Finch i can "cd" to "/usr/ports/multimedia/mencoder"

Code: Select all

sudo finch chroot
portsnap fetch extract
cd /usr/ports/multimedia/mencoder
nas4free mencoder/ root^> 
In Finch/Jail i can't "cd" to "/usr/ports/multimedia/mencoder"

Code: Select all

portsnap: Directory is not writable: /usr/ports

dreamcat4
experienced User
experienced User
Posts: 111
Joined: 21 Mar 2014 21:59
Status: Offline

Re: [HOWTO] Install Universal Media Server on Finch / Qjail-

Post by dreamcat4 »

mekonghigh wrote:I followed your howto to install Universal Media Server, but now i'm stuck at:

# Install mencoder dependancy

Code: Select all

ums ~/ root~# cd /usr/ports/multimedia/mencoder && BATCH=YES make install
-bash: cd: /usr/ports/multimedia/mencoder: No such file or directory
In Finch i can "cd" to "/usr/ports/multimedia/mencoder"

Code: Select all

sudo finch chroot
portsnap fetch extract
cd /usr/ports/multimedia/mencoder
nas4free mencoder/ root^> 
In Finch/Jail i can't "cd" to "/usr/ports/multimedia/mencoder"

Code: Select all

portsnap: Directory is not writable: /usr/ports
That is strange. Perhaps one of directories along that path does not have execute '-X' permissions. That is what is needed for changing directory. Anyway you can wipe out /usr/jails/sharedfs/usr/ports folder with the command 'qjail update -P' that is with a CAPITAL 'P'. It will delete the jails' /usr/ports folder entirely and make clean copy of the finch /usr/ports one. Which you seem to have updated already. Please try these commands and see if it help:

Code: Select all

sudo finch chroot
qjail update -P
qjail console $jailname
Otherwise it may lack of -X execute permsissions in a folder inside the jail like one of these:

Code: Select all

/usr/
/usr/ports (symlink)
/mnt/
/mnt/sharedfs/
/mnt/sharedfs/usr/
/mnt/sharedfs/usr/ports/

mekonghigh
Starter
Starter
Posts: 39
Joined: 13 Oct 2013 18:03
Status: Offline

Re: [HOWTO] Install Universal Media Server on Finch / Qjail-

Post by mekonghigh »

dreamcat4 wrote:That is strange. Perhaps one of directories along that path does not have execute '-X' permissions. That is what is needed for changing directory. Anyway you can wipe out /usr/jails/sharedfs/usr/ports folder with the command 'qjail update -P' that is with a CAPITAL 'P'. It will delete the jails' /usr/ports folder entirely and make clean copy of the finch /usr/ports one. Which you seem to have updated already. Please try these commands and see if it help:

Code: Select all

sudo finch chroot
qjail update -P
qjail console $jailname
Thank you, that did the job.
But now i'm stuck at:

# Install UMS from pkgng
ASSUME_ALWAYS_YES=YES pkg install universal-media-server

Code: Select all

ums mencoder/ root~# ASSUME_ALWAYS_YES=YES pkg install universal-media-server
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Updating database digests format: 100%
pkg: No packages available to install matching 'universal-media-server' have been found in the repositories
I checked http://www.freshports.org/multimedia/un ... ia-server/ and tried:

To install the port: cd /usr/ports/multimedia/universal-media-server/ && make install clean

Code: Select all

ums mencoder/ root~# cd /usr/ports/multimedia/universal-media-server/ && make install clean
===>  universal-media-server-4.0.0_1 is marked as broken: RC script broken, especially prestart target.
*** [install] Error code 1

Stop in /sharedfs/usr/ports/multimedia/universal-media-server. 

dreamcat4
experienced User
experienced User
Posts: 111
Joined: 21 Mar 2014 21:59
Status: Offline

Re: [HOWTO] Install Universal Media Server on Finch / Qjail-

Post by dreamcat4 »

Yes, because issues caused by the FreeBSD ports committers were messing around with it, trying to 'fix it'. They seem to be saying they broke it? :/ whatever. Sorry I can't control what other people do with my submissions to the ports tree.

What you can do to work around that problem is pick up the last known - good copy of this port. It is available from my own ports repo. Here:

https://github.com/dreamcat4/ports

If you download that one and build it. Something like this:

Code: Select all

sudo finch chroot
jailname=ums
qjail console $jailname
pkg install ffmpeg mplayer vlc linux-tsmuxer
cd /usr/ports/multimedia/mencoder && BATCH=YES make install
fetch -o ports-master.tar.gz https://codeload.github.com/dreamcat4/ports/legacy.tar.gz/master
tar -zxvf ports-master.tar.gz
cd ~/ports-master/multimedia/universal-media-server && BATCH=YES make install
# carry on the rest of the instructions after 'pkg install universal-media-server'
Of course that version of UMS is a little bit out-of date now. You can try updating from example. By looking here at my last update:

https://github.com/dreamcat4/ports/comm ... f7ef1ec927

Code: Select all

cd ~/ports-master/multimedia/universal-media-server
export NOCLEANDEPENDS=YES
make clean
nano Makefile
# update the line PORTVERSION= to match the latest linux .tar.gz from sourceforge downloads page: subfolder Official Releases/Linux
rm distinfo
make fetch makesum
make extract
make makeplist > new-pkg-plist.temp
# use beyond compare or other merge tool to merge with previous version of the pkg-plist manifest file.
# add/remove the old/new lines whatever is missing as necessary
# don't touch the section marked @comment manual
make check-orphans
make install

mekonghigh
Starter
Starter
Posts: 39
Joined: 13 Oct 2013 18:03
Status: Offline

Re: [HOWTO] Install Universal Media Server on Finch / Qjail-

Post by mekonghigh »

Thank you, but now i have another problem.
This is what i did:

Code: Select all

echo "127.0.0.1 $(hostname)" >> /etc/hosts
pkg update -f
pkg install ffmpeg mplayer vlc linux-tsmuxer
cd /usr/ports/multimedia/mencoder && BATCH=YES make install
cd ~
ums mencoder/ root~# fetch -o ports-master.tar.gz https://codeload.github.com/dreamcat4/ports/legacy.tar.gz/master
tar -zxvf ports-master.tar.gz
cd dreamcat4-ports-340f4c9/multimedia/universal-media-server && BATCH=YES make install
# carry on the rest of the instructions after 'pkg install universal-media-server' 
So far so good.

Code: Select all

ums universal-media-server/ root~# sysrc universal_media_server_enable=YES
universal_media_server_enable:  -> YES
ums universal-media-server/ root~# service universal-media-server start
universal-media-server does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d) 
Now i'm stuck at:
universal-media-server does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d)

joamconde
NewUser
NewUser
Posts: 1
Joined: 07 Dec 2014 05:21
Status: Offline

Re: [HOWTO] Install Universal Media Server on Finch / Qjail-3.5

Post by joamconde »

im also having trouble installing UMS using FINCH (and also using thebrig). Is there any up to date guide on how to do it?

CrashEr
NewUser
NewUser
Posts: 7
Joined: 23 Jun 2012 20:08
Status: Offline

Re: [HOWTO] Install Universal Media Server on Finch / Qjail-3.5

Post by CrashEr »

I installed the latest UMC manually, but it seems it needs a wrapper.
And still it does not work with modules like FLAC, ffmpeg etc.

dreamcat4
experienced User
experienced User
Posts: 111
Joined: 21 Mar 2014 21:59
Status: Offline

Re: [HOWTO] Install Universal Media Server on Finch / Qjail-3.5

Post by dreamcat4 »

CrashEr wrote:I installed the latest UMC manually, but it seems it needs a wrapper.
And still it does not work with modules like FLAC, ffmpeg etc.
I no longer wish to maintain the FreeBSD port of UMS. The last version I made of it is available here:

https://github.com/dreamcat4/ports/tree ... dia-server

However the FreeBSD ports guys seemed to break it somehow in regards to the startup script. It probably is still easier to fix those minor issue, whatever they are. Since I no longer wish to maintain this port, it's available for anyone else who wishes to maintain the ports files. Just make yourself known the freebsd ports mailinglist or ask on #freebsd-ports IRC channel / raise / comment on PR.

portname: multimedia/universal-media-server
description: Universal Media Server
maintainer: dreamcat4@gmail.com
status: BROKEN
deprecated because: RC script broken, especially prestart target
expiration date: 2015-01-16
build errors: none.
overview: http://portsmon.FreeBSD.org/portovervie ... dia-server

Was not aware of any big issue with flac, ffmpeg when making the ports files for UMS.

Post Reply

Return to “Jails”