View previous topic :: View next topic |
Author |
Message |
brian.ashton n00b
Joined: 02 Oct 2013 Posts: 7
|
Posted: Wed Oct 02, 2013 4:31 pm Post subject: Universal Media Server |
|
|
(My apologies if my search-fu wasn't good enough to find a previous topic.)
Link: http://sourceforge.net/projects/unimediaserver/
Anyone out there have an ebuild/overlay or any other information on getting this into Gentoo? I'm about to do it manually, but obviously I'd rather do it through portage.
If so: Any feedback on how good it is/isn't? How it compares to Plex? etc?
Cheers. _________________ Everything in moderation, including moderation. |
|
Back to top |
|
|
Ivan The Viking Tux's lil' helper
Joined: 14 Apr 2003 Posts: 78 Location: Connecticut, USA
|
Posted: Sat Oct 15, 2016 3:44 pm Post subject: Preliminary Ebuild for 6.5.1 |
|
|
Well,
If anyone cares still about this, I've modified the ps3mediaserver ebuild to make it work.
I have it overlayed on my Pine64 install of gentoo, and it's working relatively well. For arm64 you need some clever unmasks, for AMD64, it's smooth.
I used the Java 8 version, and it works well with the Oracle JDK 8 on ARM64.
It has been a solid 10 years since I used Gentoo or GNU/Linux before this attempt, so please, be gentle at how iffy it is.
I can also do a how-to if desired.
ebuild code, add it to net-misc/universalmediaserver
universalmediaserver-6.5.1.ebuild
http://pastebin.com/maQhJZRT
You'll also need the following files in your overlay folder.
universalmediaserver.confd
http://pastebin.com/d9UX2JYj
universalmediaserver.initd
http://pastebin.com/itusaGY2
Deps come up automatically. Set a ton of use flags on ffmpeg and mencoder if you want to transcode everything to everything.
I run this under a user called "gentoo". Under that users home folder, look under .config for the configs to write. It's really simple to setup! |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21630
|
Posted: Sat Oct 15, 2016 4:20 pm Post subject: |
|
|
Some initial critiques:
net-misc/universalmediaserver: | # Copyright 2016 Ivan The Viking, 1996-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
inherit eutils
DESCRIPTION="Universal Media Server is a DLNA-compliant UPnP Media Server."
HOMEPAGE="http://www.universalmediaserver.com/"
SRC_URI="mirror://sourceforge/project/unimediaserver/Official%20Releases/Linux/UMS-${PV}-Java8.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~arm64"
IUSE="multiuser +transcode tsmuxer"
DEPEND="app-arch/unzip"
RDEPEND=">=virtual/jre-1.8.0
media-libs/libmediainfo
media-libs/libzen
tsmuxer? ( media-video/tsmuxer )
transcode? ( media-video/mplayer[encode] )" |
As written, this package can be built without installing media-libs/libmediainfo, media-libs/libzen, etc. Portage will install those before running it, but is not guaranteed to install before building. A user could encounter this scenario by running:
Code: | emerge --buildpkgonly net-misc/universalmediaserver::ivan
# Later, maybe even on a different machine after copying the tbz2
emerge --usepkgonly net-misc/universalmediaserver::ivan | Will the package build correctly if none of the atoms listed in $RDEPEND are installed? For a pre-compiled Java package, the answer is probably yes, but this is an easy thing to miss, so I want to make sure you checked it.
It appears that USE=transcode is solely to create a dependency on media-video/mplayer, but has no impact on how the package is built or installed. Is that intended?
net-misc/universalmediaserver: |
S=${WORKDIR}/ums-${PV}
UMS_HOME=/opt/${PN}
src_prepare() {
if use multiuser; then
cat > ${PN} <<-EOF
#!/bin/sh
if [ ! -e ~/.${PN} ]; then
echo "Copying ${UMS_HOME} to ~/.${PN}"
cp -pPR "${UMS_HOME}" ~/.${PN}
fi
export UMS_HOME=\${HOME}/.${PN}
exec "\${UMS_HOME}/UMS.sh" "\$@"
EOF
else
cat > ${PN} <<-EOF
#!/bin/sh
export UMS_HOME=${UMS_HOME}
exec "\${UMS_HOME}/UMS.sh" "\$@"
EOF
fi
|
You might be able to combine the export/exec lines by using UMS_HOME=${UMS_HOME} exec "\${UMS_HOME}/UMS.sh" "\$@" (for the !multiuser case). This works for me with bash and busybox sh. I have not checked whether this is guaranteed to work in all shells that /bin/sh can reference.
net-misc/universalmediaserver: |
cat > ${PN}.desktop <<-EOF
[Desktop Entry]
Name=Universal Media Server
GenericName=Media Server
Exec=${PN}
Icon=${PN}
Type=Application
Categories=Network;
EOF
unzip -j ums.jar resources/images/icon-{32,256}.png || die
}
src_install() {
dobin ${PN}
exeinto ${UMS_HOME}
doexe UMS.sh
insinto ${UMS_HOME}
doins -r ums.jar *.conf documentation plugins renderers *.xml
use tsmuxer && dosym /opt/tsmuxer/bin/tsMuxeR ${UMS_HOME}/linux/tsMuxeR
dodoc CHANGELOG.txt README.txt
newicon -s 32 icon-32.png ${PN}.png
newicon -s 256 icon-256.png ${PN}.png
domenu ${PN}.desktop
newconfd "${FILESDIR}/${PN}.confd" ${PN}
newinitd "${FILESDIR}/${PN}.initd" ${PN}
}
pkg_postinst() {
if [[ -z ${REPLACING_VERSIONS} ]]; then
ewarn "Don't forget to disable transcoding engines for software"
ewarn "that you don't have installed (such as having the VLC"
ewarn "transcoding engine enabled when you only have mencoder)."
elif use multiuser; then
ewarn "Remember to refresh the files in ~/.universalmediaserver/"
fi
} |
|
|
Back to top |
|
|
Ivan The Viking Tux's lil' helper
Joined: 14 Apr 2003 Posts: 78 Location: Connecticut, USA
|
Posted: Sun Oct 16, 2016 1:09 pm Post subject: |
|
|
Hi Hu!
Thanks for the quick feedback. Being a precompiled java application, I really should've given it a -bin moniker, and might be the right thing in the future to prevent confusion about needing any compiling. I haven't even looked at getting the java source tarball and trying to make gentoo build this thing from scratch.
The program will install just fine without all the rdeps as there is 0 compiling, but not run if the jre/jdk is missing on the system. Could I have done that cleaner?
The other rdeps are there as the external apps this thing relies on to do the icons, get metadata, mux video, and transcode. Being Gentoo, I added that support with a USE flags, but it really is a pretty bad experience without at least the first two rdeps. I also added ffmpeg, since this thing also likes to use that instead of mencoder when transcoding.
Cleaned it up a little bit, didn't play with the script, I don't trust myself to stack lines like that right.
Thanks again,
-Shawn
Code: |
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
inherit eutils
DESCRIPTION="Universal Media Server is a DLNA-compliant UPnP Media Server."
HOMEPAGE="http://www.universalmediaserver.com/"
SRC_URI="mirror://sourceforge/project/unimediaserver/Official%20Releases/Linux/UMS-${PV}-Java8.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~arm64"
IUSE="+libmediainfo +libzen multiuser +transcode tsmuxer"
DEPEND="app-arch/unzip"
RDEPEND=">=virtual/jre-1.8.0
libmediainfo? ( media-libs/libmediainfo )
libzen? ( media-libs/libzen )
tsmuxer? ( media-video/tsmuxer )
transcode? ( media-video/mplayer[encode] media-video/ffmpeg[encode] )"
S=${WORKDIR}/ums-${PV}
UMS_HOME=/opt/${PN}
src_prepare() {
if use multiuser; then
cat > ${PN} <<-EOF
#!/bin/sh
if [ ! -e ~/.${PN} ]; then
echo "Copying ${UMS_HOME} to ~/.${PN}"
cp -pPR "${UMS_HOME}" ~/.${PN}
fi
export UMS_HOME=\${HOME}/.${PN}
exec "\${UMS_HOME}/UMS.sh" "\$@"
EOF
else
cat > ${PN} <<-EOF
#!/bin/sh
export UMS_HOME=${UMS_HOME}
exec "\${UMS_HOME}/UMS.sh" "\$@"
EOF
fi
cat > ${PN}.desktop <<-EOF
[Desktop Entry]
Name=Universal Media Server
GenericName=Media Server
Exec=${PN}
Icon=${PN}
Type=Application
Categories=Network;
EOF
unzip -j ums.jar resources/images/icon-{32,256}.png || die
}
src_install() {
dobin ${PN}
exeinto ${UMS_HOME}
doexe UMS.sh
insinto ${UMS_HOME}
doins -r ums.jar *.conf documentation plugins renderers *.xml
use tsmuxer && dosym /opt/tsmuxer/bin/tsMuxeR ${UMS_HOME}/linux/tsMuxeR
dodoc CHANGELOG.txt README.txt
newicon -s 32 icon-32.png ${PN}.png
newicon -s 256 icon-256.png ${PN}.png
domenu ${PN}.desktop
newconfd "${FILESDIR}/${PN}.confd" ${PN}
newinitd "${FILESDIR}/${PN}.initd" ${PN}
}
pkg_postinst() {
if [[ -z ${REPLACING_VERSIONS} ]]; then
ewarn "Don't forget to disable transcoding engines for software"
ewarn "that you don't have installed (such as having the VLC"
ewarn "transcoding engine enabled when you only have mencoder)."
elif use multiuser; then
ewarn "Remember to refresh the files in ~/.config/UMS/"
fi
}
|
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21630
|
Posted: Sun Oct 16, 2016 4:48 pm Post subject: |
|
|
I think listing those only in RDEPEND is correct, based on your description of how and when they are used. I suspected that would be your answer since it is a prebuilt Java tool, but since you said you were new at this, I wanted to confirm that you had considered it. I do not think there is a substantially cleaner way to do that. You might want to add comments to the ebuild justifying that approach, so that others do not repeat my questions.
I generally dislike having a USE flag that is solely to control the presence or absence of an RDEPEND, but I am not aware of any policy which prohibits that. In some cases, and it sounds like this is one of them, you want the user to have those external packages unless they affirmatively reject them, so you need some method of encouraging Portage to bring them in. Your chosen method is simple and reliable. If the package were built from source and took substantial resources to rebuild, it might be worth having some other way of managing the dependency so that users do not perform a wasteful rebuild just to change the USE flags. Since this is a prebuilt blob, wasteful rebuilds are still relatively cheap. Since you picked what are probably good defaults (based on your comment about bad user experience when the programs are missing), I doubt many users will actually need to reinstall in place with new USE flags. |
|
Back to top |
|
|
Ivan The Viking Tux's lil' helper
Joined: 14 Apr 2003 Posts: 78 Location: Connecticut, USA
|
Posted: Tue Oct 18, 2016 12:05 am Post subject: |
|
|
Thanks Hu!
I guess I wasn't as newb as I recalled on ebuilds. I'll comment more next time in it. I think next I'll put this as a bug to get into into the tree (wishful thinking!)
I'm with you on your stance on the USE flags going on RDEPENDS. That makes very good sense. I'm trying to remember where I got inspiration for it, I think maybe the ps3mediaserver ebuild had it as well.
I'm now trying to get the source java version to build on my little PINE64 so I can make the original a -bin and this one source, which is how we tend to like things around here iirc from my past. Last time I posted anything of value was 2004 around here...
Cheers!
-Shawn |
|
Back to top |
|
|
Quarky n00b
Joined: 22 Dec 2012 Posts: 4
|
Posted: Sat Nov 26, 2016 10:02 pm Post subject: |
|
|
Hi,
I came across your work looking for an ebuild being tired up upgrading manually.
First of all Great job !
I tweaked it a bit ( SRC_URI, and added mplayer || ffmpeg RDEPEND ) and put it into my overlay @ https://startux.de/git/quarks.git ( layman -a quarks )
Looking forward to your improvements ...
Want to add proper support for choosing ffmpeg / mplayer / mpv via USE flags...
Let me know
Stefan |
|
Back to top |
|
|
Ivan The Viking Tux's lil' helper
Joined: 14 Apr 2003 Posts: 78 Location: Connecticut, USA
|
Posted: Sun Nov 27, 2016 12:25 pm Post subject: |
|
|
Hi Stefan,
I'm flattered to have something I did in a semi-official spot for people to use.
I added your overlay to my server where this is running.
I'll keep updating this every time a new version comes out and posting here. (I guess that makes me a maintainer?)
I could separate the transcode flag into mplayer and ffmpeg I suppose. Do your thing if you'd like and change it up as you see fit
-Shawn |
|
Back to top |
|
|
Ivan The Viking Tux's lil' helper
Joined: 14 Apr 2003 Posts: 78 Location: Connecticut, USA
|
Posted: Thu Dec 01, 2016 11:13 am Post subject: 6.5.2 Update |
|
|
Hey All,
6.5.2 is out. Here's my latest local repo.
http://ivntheviking.bounceme.net/universalmediaserver.tar.xz
I updated the ebuild to match Stefan's updates and it works just lovely still.
Which one is official, using the mirror:// or the direct URL in the SRC_URI line for sourceforge? I left it the way Stefan did as well, which is the direct URL.
I did not add support for the MPV fork of mplayer, I have no experience with it, and just learned about it a few days ago. I will need to compile it up on my headless little server to see what that entails.
-Shawn |
|
Back to top |
|
|
Ivan The Viking Tux's lil' helper
Joined: 14 Apr 2003 Posts: 78 Location: Connecticut, USA
|
|
Back to top |
|
|
Ivan The Viking Tux's lil' helper
Joined: 14 Apr 2003 Posts: 78 Location: Connecticut, USA
|
|
Back to top |
|
|
bwakkie n00b
Joined: 17 Aug 2006 Posts: 14
|
Posted: Wed Feb 08, 2017 9:24 am Post subject: Keep up the good work.... |
|
|
Thanks,
Works like a charm, thank you! This package is the first one I like. I tried several of the available dlna servers in gentoo but they didn't work to my pleasing. Strange that this project isn't included...
Keep up the good work, is it not a good idea to add the ebuild to an overlay or propose it to gentoo to include it? Makes it easier to track updates...
Cheers,
Bastiaan |
|
Back to top |
|
|
lexflex Guru
Joined: 05 Mar 2006 Posts: 363 Location: the Netherlands
|
Posted: Sat Feb 25, 2017 8:19 pm Post subject: |
|
|
Hi,
Thanks for providing the ebuild!
I am a bit at a loss at configuring, and I cant seem to find much documentation regarding universal media server in headless mode. I also looked at the github docs, Installation is there, but configuration is a bit unclear.
My current status: Universal media player installs fine (as above) , and runs. I can see the portal at 192.168.0.10:5001/console/home. ) and the options 'home' and 'scan folders'.)
However, I don't now how to configure/proceed. I could *probably* scan folders but I cant find any .conf file to say what folders to scan....
Basically my question is, when running headless: How /where do I do initial configuration?
Thanks for any advise.
Alex. |
|
Back to top |
|
|
Quarky n00b
Joined: 22 Dec 2012 Posts: 4
|
|
Back to top |
|
|
lexflex Guru
Joined: 05 Mar 2006 Posts: 363 Location: the Netherlands
|
Posted: Sun Feb 26, 2017 3:17 pm Post subject: |
|
|
lexflex wrote: |
However, I don't now how to configure/proceed. I could *probably* scan folders but I cant find any .conf file to say what folders to scan....
Basically my question is, when running headless: How /where do I do initial configuration?
|
Ok, sorry for answering to my own question, but I found it ( and I post it since others might be looking for it, unless it is clear to everyone from some documentation i don't know about).
The config file is in the users directory, under .config:
Code: | /home/<user>/.config/UMS |
I guess often when running a service in console/daemon form, the actual user does not have a home directory. I was expecting the default config file under /etc/ or something like that...
Alex. |
|
Back to top |
|
|
Ivan The Viking Tux's lil' helper
Joined: 14 Apr 2003 Posts: 78 Location: Connecticut, USA
|
Posted: Sat Mar 11, 2017 11:44 am Post subject: |
|
|
Hi All,
Added 6.6.0 to my snapshot of my local repo for those who don't want to use an overlay.
I dropped the ball on that release.
http://ivntheviking.bounceme.net/universalmediaserver.tar.xz
No word yet from the powers that be about adding this to the mainline tree.
-Shawn |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54236 Location: 56N 3W
|
Posted: Sat Mar 11, 2017 12:07 pm Post subject: |
|
|
Ivan The Viking,
Join proxy-maintainers.
You get the credit when it goes well, the dev that does the commit gets the blame if it doesn't.
This route may be a first step to becoming a gentoo dev yourself. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Ivan The Viking Tux's lil' helper
Joined: 14 Apr 2003 Posts: 78 Location: Connecticut, USA
|
Posted: Tue Mar 14, 2017 12:01 am Post subject: |
|
|
Neddy - I think I might just do that!
This package seems pretty straightforward to keep up.
I put a comment on the bug for the package request stating I'd like to moderate by proxy.
Hey Quarky - your ebuild isn't in in sync with the updates I've done, could you please sync up with mine? I added more USE flags.
Thanks!
-Ivan |
|
Back to top |
|
|
Quarky n00b
Joined: 22 Dec 2012 Posts: 4
|
|
Back to top |
|
|
roki942 Apprentice
Joined: 18 Apr 2005 Posts: 285 Location: Seattle
|
Posted: Sun May 07, 2017 8:57 am Post subject: |
|
|
Thanks for the ebuild! It emerged fine but when I try to run I get Code: | $ universalmediaserver
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/pms/PMS : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
at java.net.URLClassLoader$1.run(URLClassLoader.java:348) |
This is how java is set up Code: | $ java-config -f -j -L
icedtea-bin-7
/opt/icedtea-bin-7.2.6.8/bin/jar
The following VMs are available for generation-2:
*) IcedTea JDK 7.2.6.8 [icedtea-bin-7]
2) IcedTea JDK 3.3.0 [icedtea-bin-8] |
Thank you for your help. |
|
Back to top |
|
|
Maitreya Guru
Joined: 11 Jan 2006 Posts: 441
|
Posted: Sun May 07, 2017 9:20 am Post subject: |
|
|
"RDEPEND=">=virtual/jre-1.8.0"
Means, it needs java 8.
So in your case run it again after eselecting that other jvm. |
|
Back to top |
|
|
roki942 Apprentice
Joined: 18 Apr 2005 Posts: 285 Location: Seattle
|
Posted: Sun May 07, 2017 9:44 am Post subject: |
|
|
Maitreya wrote: |
"RDEPEND=">=virtual/jre-1.8.0"
Means, it needs java 8.
So in your case run it again after eselecting that other jvm. | Thank you! |
|
Back to top |
|
|
Ivan The Viking Tux's lil' helper
Joined: 14 Apr 2003 Posts: 78 Location: Connecticut, USA
|
Posted: Sun Jun 11, 2017 12:19 pm Post subject: 6.7.1 |
|
|
Hi All!
Recently the UMS group put out 6.7.0 and then 6.7.1 (in one day, minor bugs in 6.7.0 which made the release no good).
Local rep is updated.
http://ivntheviking.bounceme.net/universalmediaserver.tar.xz
Note - the new versions of UMS appear to only be released with Java 7. Ebuild updated to reflect that.
Changelogs Code: |
Changes since 6.7.0:
General:
Fixed playback on Linux
Fixed support for OGA and 3GA files
Dependencies:
Updated MediaInfo to 0.7.96
Changes since 6.6.0:
General:
Added a button for the web interface
Expanded support for preventing sleep mode on Windows and macOS
Improved support for MusicBrainz
Improved support for CoverArtArchive
Improved support for images
Improved thumbnailing
Updated documentation
Improved DIDL-Lite implementation
Added support for more RealAudio formats
Fixed many bugs
Languages:
Synchronized translations with Crowdin
Renderers:
Added support for Chromecast Ultra
Added support for MXPlayer on Google Android
Added support for Microsoft Windows Media Player
Improved support for Chromecast
Improved support for Samsung 9 Series TVs
Improved support for Sony BRAVIA EX TVs
Improved detection of Onkyo TXNR7xx devices
Improved detection of Panasonic Viera ST60 TVs
Improved detection of Samsung J6400 TVs
Improved detection of Samsung JU6400 TVs
Improved detection of Samsung Galaxy S5 phones
Improved detection of Sony BRAVIA XE TVs
Dependencies:
Updated external-maven-plugin to 0.2
Updated FFmpeg to latest builds
Upgraded LogBack to version 1.2.3
Updated maven-surefire-plugin to 2.20
Updated MediaInfo to 0.7.94
Updated metadata-extractor to 2.10.1
Updated TwelveMonkeys ImageIO to version 3.3.1
|
Enjoy
-Shawn |
|
Back to top |
|
|
Ivan The Viking Tux's lil' helper
Joined: 14 Apr 2003 Posts: 78 Location: Connecticut, USA
|
Posted: Tue Jul 11, 2017 2:34 pm Post subject: |
|
|
Hi all,
6.7.2 is out.
My repo has the ebuild.
http://ivntheviking.bounceme.net/universalmediaserver.tar.xz
Changelog from UMS:
Code: |
Changes since 6.7.1:
General:
Added support for WMA10
Improved splash screen timing and enabled it by default
Improved support for MediaInfo on non-Windows platforms
Improved CPU and memory logging
Improved detection of network speed
Updated comments in DefaultRenderer.conf
Updated documentation
Fixed trace logging on macOS
Fixed a crash on Windows 10
Languages:
Synchronized translations with Crowdin
Fixed Hebrew language support
Dependencies:
Updated FFmpeg
Updated JNA to 4.4.0
Updated Surefire to 2.20
|
-Shawn |
|
Back to top |
|
|
Ivan The Viking Tux's lil' helper
Joined: 14 Apr 2003 Posts: 78 Location: Connecticut, USA
|
Posted: Mon Aug 14, 2017 12:26 am Post subject: 6.7.3 |
|
|
Hi all,
6.7.3 is out.
My repo has the ebuild.
http://ivntheviking.bounceme.net/universalmediaserver.tar.xz
Like the few last releases, only Java 7 or higher is needed now, previously Java 8 was the requirement.
Changelog from UMS:
Code: |
Changes since 6.7.2:
General:
Improved support for AVI and MJPEG
Improved general DLNA implementation
Fixed duplicate entries in transcode folders
Fixed logging in macOS
Fixed menu name in macOS
Renderers:
Added renderer configuration for conversion of 3D video to 2D
Added support for Fetch TV
Added support for Onkyo TXNR8xx
Improved support for Cambridge Audio Azur BD
Improved support for OPPO BDP
Improved support for Panasonic VIERA TXL32V10E
Improved support for Sony BRAVIA 5500 and EX TVs
Improved support for Sony SMP-N100
Improved support for Sony STR-DA5800ES
Fixed album art for Onkyo receivers (and probably others)
Fixed support for Xbox 360
Dependencies:
Updated MediaInfo to 0.7.97, which:
Improves support for HEVC (H.265), FLV, MKV, TIFF and more
Compatibility notes:
These releases work on all versions of Java 7 onwards.
The Windows releases work on Windows Vista onwards. We are working on supporting older versions.
|
FYI - RC's for version 7 are out. They work just fine in gentoo but I'm not making ebuilds until 7.0 stable is out.
-Shawn |
|
Back to top |
|
|
|