Thursday, June 12, 2014

Installing SopCast on Debian Jessie 64-bit

So I was preparing my system for the FIFA World Cup 2014 that starts today in Brazil.
I'm using Debian Jessie with Xfce but it should work for most of the Debian variations and desktop environments.

First thing we need to do is enable multiarch in Debian, by adding the i386 architecture (to enable installing 32-bit software):
dpkg --add-architecture i386

Next, we need to install some dependencies of SopCast and the SopCast Player we'll be using later on:
sudo apt-get install libstdc++5:i386 gettext

Now, we'll download SopCast backend and the sopcast-player frontend into the tmp folder:
cd /tmp
wget http://download.sopcast.com/download/sp-auth.tgz
wget https://sopcast-player.googlecode.com/files/sopcast-player-0.8.5.tar.gz

Extracting and moving the SopCast backend executable to /usr/bin:
tar -zxvf sp-auth.tgz
sudo mv sp-auth/sp-sc-auth /usr/bin/
sudo rm -r sp-auth/

Extracting and preparing the sopcast-player backend:
tar -zxvf sopcast-player-0.8.5.tar.gz
cd sopcast-player
sudo make

Check whether you get any errors in the output and fix accordingly (you shouldn't after you've installed "gettext" earlier).

Finally, install:
sudo make install
cd /tmp
rm -r sopcast-player/

Now you should have SopCast player in your menu and you can easily watch SopCast streams using File -> Open (Ctrl+O) in the GUI and entering the stream url.

If you want to watch it with an external player like VLC for example, you can set it in the preferences menu or run (without opening SopCast Player at all):
/usr/bin/sp-sc-auth sop://broker.sopcast.com:3912/143156 3908 8908
and then in VLC open the network stream: http://localhost:8908/tv.asf using the GUI (CTRL+N) or using the terminal:
vlc http://localhost:8908/tv.asf

Enjoy.

Saturday, May 31, 2014

Fix unmuting (PulseAudio) on Xfce

Unmuting doesn't work in Xfce?
I had this problem too after installing Debian Testing (Jessie) which now comes with Xfce by default, but you may encounter it on any system running Xfce DE.

Every time I muted the audio using the mute key on my keyboard, everything worked find - the audio was indeed muted. But when I tried to unmute using the same key, the audio indicator showed the unmuted state but audio was still muted.
After some investigation I understood that the only way to unmute my system was entering the command:
alsamixer
in the terminal and then press 'M' to toggle the mute state.
Apparently, the Audio Mixer was muting PulseAudio AND Alsa, but unmuting ONLY Alsa.

If you run the following command, it will list all the properties under xfce4-mixer:
xfconf-query -lc xfce4-mixer

In my case, what I saw is only one mixer under /sound-cards/ entry. It was Alsa, PulseAudio just wasn't there.
Also, in the audio mixer I saw only the Alsa entry and couldn't even control the PulseAudio mixer as you see here:


From what I understood, xfce4-mixer (the Audio Mixer) was missing an optional dependency to be able to work with PulseAudio.
This dependency is: gstreamer0.10-pulseaudio.
After installing the above dependency, using (on debian):
sudo apt-get install gstreamer0.10-pulseaudio
the Audio Mixer looked a lot better:


But, running:
xfconf-query -c xfce4-mixer -p /active-card
to query the active card used by xfce4-mixer still returned "HDANVidiaAlsamixer".
So the last thing I needed to do is change the "active card" in xfce4-mixer too by running:
xfconf-query -c xfce4-mixer -p /active-card -s PlaybackBuiltinAudioAnalogStereoPulseAudioMixer.

After that, toggling mute finally worked.