danhans115
Posts: 6
Joined: Tue Jul 10, 2012 11:58 am

BubbleUPnP Server

Thu Mar 28, 2013 10:10 am

Hi there,

Im a long time lurker and have started putting one of my pi's to good use.

Firstly, if this is in the wrong section I apologise as its probably more of a generic linux question, but its part of an overall project so thought I would post it here.

I currently have my Pi running the excellent squeezeplug at home using the excellent article written by Stephen C Phillips , http://blog.scphillips.com/2013/01/usin ... streaming/.

This is working perfectly for me as is, I can stream my music around my house to the smart tv, mobile phone (using bubbleUPnP on Android) and various other devices. Thing is I have a lot of music that I dont wish to carry around with me, so wanted to use the upnp tunnelling features of BubbleUPnP Server.

I have java installed on there thanks to https://blogs.oracle.com/hinkmond/entry ... hard_float, which is working perfectly and have got BubbleUPnP server running on there perfectly too. The problem is I want this to run at startup and dont know where to start writing a script to drop into /etc/init.d

There is some information on the internet which I have tried to follow but to no avail. I have even tried extracting the Redhat RPM and reusing the script in there which doesnt work either, I get the message about it being stuck in a loop.

Has anyone successfully managed this? It would be too much of an issue but as soon as I leave the SSH session I started it in, the bubble server obviously dies.

Any help greatly appreciated. I don't want spoon feeding or anything but if anyone could loosely point me in the write direction it would be great.

Regards

Dan

twind
Posts: 1
Joined: Sat Apr 06, 2013 12:26 am

Re: BubbleUPnP Server

Sat Apr 06, 2013 12:43 am

Hi Dan,

I got a similar Problem like yours. This is my first Linux Projekt.
In this Forum http://forum.xda-developers.com/showthr ... 91&page=30 I read something about running the script in the background.
And to create the LSBInitScript I found hear http://wiki.debian.org/LSBInitScripts good things.

My script looks like this and it works
[upnpserver][/
#! /bin/sh

### BEGIN INIT INFO
# Provides: upnpserver
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start BubbleUPnPServer at boot time
# Description: Start BubbleUPnPServer at boot time in the Background after gmediarenderer and minidlna
# X-Start-Before: gmediarenderer minidlna
# X-Stop-After: gmedierenderer minidlna
### END INIT INFO

case "$1" in
start)
echo "Starting BubbleUPnPServer"
cd /bin/upnpserver
java -XX:+PrintCommandLineFlags -jar BubbleUPnPServer.jar &
;;
stop)
echo "Stop BubbleUPnPServer"
cd /bin/upnpserver
./BubbleUPnPServer.jar --stop
;;
*)
echo "Usage: /etc/init.d/upnpserver {start|stop}"
exit 1
;;
esac

exit 0
]
I hope I could help you

Good luck
tom

Muhamm
Posts: 1
Joined: Sat Apr 06, 2013 10:57 am

Re: BubbleUPnP Server

Sat Apr 06, 2013 11:05 am

Hi Dan,

I got a similar Problem like yours. This is my first Linux Projekt.
In this Forum http://forum.xda-developers.com/showthr ... 91&page=30 I read something about running the script in the background.
And to create the LSBInitScript I found hear http://www.firstdvdmart.com/

My script looks like this and it works
[upnpserver][/
#! /bin/sh

### BEGIN INIT INFO
# Provides: upnpserver
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network

munkee1337
Posts: 6
Joined: Sun Apr 14, 2013 12:16 pm
Contact: Website

Re: BubbleUPnP Server

Mon Apr 15, 2013 9:27 pm

Hey you are in luck I have just blogged about this very requirement!

http://c-mobberley.com/wordpress/index. ... -d-script/

I have a quick tutorial/template for the script you need. All you have to do is change the path in the script to wherever you have your BubbleUPnP jar file at.

Hope this helps!

Chris

lumi
Posts: 31
Joined: Sat Jul 14, 2012 12:19 am

Re: BubbleUPnP Server

Sat May 04, 2013 12:57 am

how did u get the hard float java and bubbleupnp to work?

https://jdk8.java.net/fxarmpreview/index.html

https://blogs.oracle.com/hinkmond/entry ... hard_float

after doing this the status reports not runnig but the pidfile exits for me, and no webpage for bubbleupnp

however if i use the sudo apt-get install openjdk-6-jre or openjdk-7-jre and enable for start up following

http://www.bubblesoftapps.com/bubbleupn ... stallation

and changing to the directory with launch.sh and

on unix platforms make launch.sh executable:

sudo chmod +x launch.sh

and then added the path to launch.sh to /etc/rc.local

this works for me but i cant get it to work with hardfloat java and the start up script link posted
Last edited by lumi on Sat May 04, 2013 4:13 am, edited 1 time in total.

lumi
Posts: 31
Joined: Sat Jul 14, 2012 12:19 am

Re: BubbleUPnP Server

Sat May 04, 2013 1:17 am

aha i found this paths are diff to the orginal guide i used

http://raspberrypi.stackexchange.com/qu ... spberry-pi

f you want the Oracle Java VM, which is a lot faster (optimized for embedded arm CPUs) and is also a developer preview (applications maybe buggy or crash) until some time into the future. Instead of the above instructions you need to download the file called Oracle JDK 8 (with JavaFX) for ARM Early Access on the Oracle Java 8 download page.

Remember to download the Oracle Java system on your Pi, or you won't be able to install it.

To install the Oracle Java System:

tar zxvf jdk-8-ea-b36e-linux-arm-hflt-*.tar.gz -C /opt
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.8.0/bin/java" 1
sudo update-alternatives for other commands if needed.
java -version

this seemed to then work after i used this line

sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.8.0/bin/java" 1

changing it to follow the guide i used

https://blogs.oracle.com/hinkmond/entry ... hard_float

so

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/bin/java" 1

and using the script from

http://c-mobberley.com/wordpress/index. ... -d-script/

to start it

no idea why someone who knows more may chip in

lumi
Posts: 31
Joined: Sat Jul 14, 2012 12:19 am

Re: BubbleUPnP Server

Sat May 04, 2013 7:05 am

doh i realised a mistake when testing before i only opened the https port and bubbleserver needs both http n https ..doh!

munkee1337
Posts: 6
Joined: Sun Apr 14, 2013 12:16 pm
Contact: Website

Re: BubbleUPnP Server

Sat May 04, 2013 9:04 am

Actually lumi it only needs http or https the thing withthe java page is it takes a while to kick in so whenever you use the setup pages give it a few seconds to catch up. Even now on mine running without https it takes a while for it to load up settings I entered at the start

lumi
Posts: 31
Joined: Sat Jul 14, 2012 12:19 am

Re: BubbleUPnP Server

Wed May 08, 2013 2:58 am

i found that to actually get it to play to my nexus 4 using bubblepunp player connecting via https u still need http enabled for music to stream

also reading the bubbleupnp setup further down the page it says u need http for some function of the streaming

quote

IMPORTANT: if you use HTTPS access, the HTTP port must still be open as it is still used for media streaming requests only.

i missed that and presumed wrongly i could just use https

lumi
Posts: 31
Joined: Sat Jul 14, 2012 12:19 am

Re: BubbleUPnP Server

Wed May 08, 2013 3:00 am

also i found using the oracle jdk8 with hard float instead of open jdk speeded things up on the web page and poss other functions

danhans115
Posts: 6
Joined: Tue Jul 10, 2012 11:58 am

Re: BubbleUPnP Server

Fri Jun 07, 2013 10:01 pm

Sorry for the late reply, I really should check my posts and actually log in.

Glad you got up and running. I didnt install java using apt-get, I installed in manually using instructions found on the oracle website which worked perfectly for me.

wolderiii
Posts: 2
Joined: Fri Feb 28, 2014 3:16 pm

Re: BubbleUPnP Server

Fri Feb 28, 2014 3:29 pm

sorry to revive an old thread but i'm stuck.
i installed raspbian, java, bubbleUPnP server, and ffmpeg on the pi. even got the init.d script to work and run bubble on startup. however, for some reason i cannot get bubble sever to transcode video to chromecast. i've read the bubble setup instructions and have port forwarded http port 58050 to the pi, in the bubble config webpage i can see bubble is running, i can get internet access on the http port (after port forwarding) but not https and have it setup to transcode the media server... however the video will not play to chromecast via bubble app on android.

i have installed the bubble server on a windows computer and i can get it to transcode video and send to chromecast just fine. so i know my settings on the phone are correct and i'm using it correctly. on the windows server i have both http and https internet access. the only difference i can see from running the bubble server on windows and the pi is that the pi doens't have internet access on the https port.

so i guess my question is, do i need https access on the pi in order to send video to chromecast? i've read other threads where if you are using https you still need http enabled, but can't find any information on the other way around.
if i do need https access on the pi then i'm stuck as my media server is on the router itself (netgear wndr4700 w/built in nas and media server). the router already forwards port 58051 to itself for the media server and it's readyshare internet function. so i can't forword 58051 to the pi.....

the only other thing i can think of is if ffmpeg isn't working correctly on the pi to transcode the video but not really sure how to check that.

User avatar
Douglas6
Posts: 4950
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: BubbleUPnP Server

Fri Feb 28, 2014 6:39 pm

What types of formats are you trying to transcode from / to? Is it possible you need to install additional codecs on the Pi?

wolderiii
Posts: 2
Joined: Fri Feb 28, 2014 3:16 pm

Re: BubbleUPnP Server

Fri Feb 28, 2014 7:45 pm

chromecast only supports h.264 video. as far as what i've seen bubbleUPnP server should take care of all of the transcoding using ffmpeg. my files are mpg2 in mkv container.

on all the sites/forums i've been on not one person has had to install additional codecs for the bubbleUPnP server. so i don't think that is the issue here. unless the issue is that ffmpeg is just not working at all....

User avatar
Douglas6
Posts: 4950
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: BubbleUPnP Server

Sat Mar 01, 2014 12:26 am

wolderiii wrote:on all the sites/forums i've been on not one person has had to install additional codecs for the bubbleUPnP server
... running on a Raspberry Pi? There may be a good reason for that. I wouldn't expect acceptable performance using the Pi to transcode on-the-fly, even with the necessary MPEG-2 codec. But as they say, your mileage may vary, or I have misinterpreted your task.

Baystray
Posts: 8
Joined: Tue May 22, 2012 1:24 pm

Re: BubbleUPnP Server

Mon Mar 10, 2014 6:49 pm

wolderiii wrote:sorry to revive an old thread but i'm stuck.
i installed raspbian, java, bubbleUPnP server, and ffmpeg on the pi. even got the init.d script to work and run bubble on startup. however, for some reason i cannot get bubble sever to transcode video to chromecast. i've read the bubble setup instructions and have port forwarded http port 58050 to the pi, in the bubble config webpage i can see bubble is running, i can get internet access on the http port (after port forwarding) but not https and have it setup to transcode the media server... however the video will not play to chromecast via bubble app on android.

i have installed the bubble server on a windows computer and i can get it to transcode video and send to chromecast just fine. so i know my settings on the phone are correct and i'm using it correctly. on the windows server i have both http and https internet access. the only difference i can see from running the bubble server on windows and the pi is that the pi doens't have internet access on the https port.

so i guess my question is, do i need https access on the pi in order to send video to chromecast? i've read other threads where if you are using https you still need http enabled, but can't find any information on the other way around.
if i do need https access on the pi then i'm stuck as my media server is on the router itself (netgear wndr4700 w/built in nas and media server). the router already forwards port 58051 to itself for the media server and it's readyshare internet function. so i can't forword 58051 to the pi.....

the only other thing i can think of is if ffmpeg isn't working correctly on the pi to transcode the video but not really sure how to check that.

What version of bubbleupnp are you running on your pi? I had the same issue on mine and found that the reason only some would play is that I was running 0.7 when it says on their site that only 0.8 supports transcoding to chromecast.

Return to “Media centres”