sudo apt-get install libxtst6:i386
sudo apt-get install lib32z1
sudo apt-get install gcc-multilib
sudo apt-get install python-software-properties
sudo apt-get install python-software-common
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
sudo apt-get install libxtst6:i386 libXext6:i386 libxi6:i386 libncurses5:i386 libxt6:i386 libxpm4:i386 libxmu6:i386 libxp6:i386 lib32stdc++6
sudo ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib
Edit /etc/udev/rules.d/70-persistent-net.rules and change the name to eth0
Wednesday, March 16, 2016
Wednesday, February 24, 2016
Install headless bittorrent client
apt-get source bittornado
I set up aliases to btdownloadcurses.py and btdownloadmany.py
btdownloadcurses --max_uploads 4 --max_upload_rate 32 to_be_downloaded.torrent
btdownloadmany --max_uploads 4 --max_upload_rate 32 .
where . is a directory full of torrent files.
Sunday, February 21, 2016
Update to latest NVIDIA drivers Ubuntu
Best:
http://askubuntu.com/questions/672047/anyone-has-successfully-installed-cuda-7-5-on-ubuntu-14-04-3-lts-x86-64
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current
http://www.ubuntuupdates.org/ppa/ubuntu-x-swat
http://askubuntu.com/questions/672047/anyone-has-successfully-installed-cuda-7-5-on-ubuntu-14-04-3-lts-x86-64
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current
http://www.ubuntuupdates.org/ppa/ubuntu-x-swat
Wednesday, February 10, 2016
Monday, February 8, 2016
Streaming NES (.NSF) file audio over a network using gstreamer
Now, to check on alsa
cat /proc/asound/cards should show some available cards
alsamixer should also work if you run it from the commandline. If alsamixer gives the following error:
cannot open mixer: No such file or directory
You may need to add yourself to the audio group in /etc/group, then log out and back in to update permissions.
First, we test remote piping of sound.
On the listening machine (Macbook Air for me, so using sox vs. aplay as you would/could in Linux):
nc -l 8000 | sox -traw -r44100 -b16 -e unsigned-integer - -tcoreaudio
On the source machine (Ubuntu 12.04 for me):
cat /dev/urandom | nc ip_addr_of_listening_machine 8000
If you hear white noise, the connection between machines seems to work correctly.
Next, we want to set up gstreamer
sudo apt-get install gstreamer0.10*
Check that we can play the .nsf files from gstreamer (where ${file} is the file to play)
gst-launch-0.10 -v filesrc location="${file}" ! nsfdec ! pulsesink
You should hear the game audio of your choice. If this doesn't work, you may need to install libgme-dev by doing:
sudo apt-get install libgme-dev
Now you can try a file over the network.
gst-launch-0.10 -v filesrc location="${file}" ! nsfdec ! audioconvert ! wavenc ! udpsink port=8888
You can then connect to this port with netcat and listen to the wavenc encoded data (basically just raw PCM, if you missed the header).
nc sourceserver 8888 | sox -traw -r44100 -b16 -e unsigned-ineger -tcoreaudio
cat /proc/asound/cards should show some available cards
alsamixer should also work if you run it from the commandline. If alsamixer gives the following error:
cannot open mixer: No such file or directory
You may need to add yourself to the audio group in /etc/group, then log out and back in to update permissions.
First, we test remote piping of sound.
On the listening machine (Macbook Air for me, so using sox vs. aplay as you would/could in Linux):
nc -l 8000 | sox -traw -r44100 -b16 -e unsigned-integer - -tcoreaudio
On the source machine (Ubuntu 12.04 for me):
cat /dev/urandom | nc ip_addr_of_listening_machine 8000
If you hear white noise, the connection between machines seems to work correctly.
Next, we want to set up gstreamer
sudo apt-get install gstreamer0.10*
Check that we can play the .nsf files from gstreamer (where ${file} is the file to play)
gst-launch-0.10 -v filesrc location="${file}" ! nsfdec ! pulsesink
You should hear the game audio of your choice. If this doesn't work, you may need to install libgme-dev by doing:
sudo apt-get install libgme-dev
Now you can try a file over the network.
gst-launch-0.10 -v filesrc location="${file}" ! nsfdec ! audioconvert ! wavenc ! udpsink port=8888
You can then connect to this port with netcat and listen to the wavenc encoded data (basically just raw PCM, if you missed the header).
nc sourceserver 8888 | sox -traw -r44100 -b16 -e unsigned-ineger -tcoreaudio
Capturing audio output with gstreamer
To figure out which output gstreamer's pulsesink will be using, and try to capture it, check
pactl list | grep -A2 "Source #"
Look for a monitor device which seems to correspond to speakers in this list - in my example this is "alsa_output.pci-0000_00_14.2.analog-stereo.monitor", shown as source #1 in my list.
Now catch the output using gstreamer, and save to some filename
gst-launch -e pulsesrc device="alsa_output.pci-0000_00_14.2.analog-stereo.monitor" ! audioconvert ! wavenc ! filesink location=test_wav.wav
You can listen to this file (if something was playing through xmms2 already), and verify that this gstreamer command is catching the right output device. It took me a few tries to figure out which monitor output was the right one.
This filename dump can also be a fifo, which means that the output can also be used with netcat.
First, on the listening machine
nc -l 8000 > test_wav.wav
Next, on the streamer
mkfifo streamer
gst-launch -e pulsesrc device="alsa_output.pci-0000_00_14.2.analog-stereo.monitor" ! audioconvert ! wavenc ! filesink location=streamer
then in another terminal, in the same directory
nc ip_addr_of_listening 8000 < streamer
pactl list | grep -A2 "Source #"
Look for a monitor device which seems to correspond to speakers in this list - in my example this is "alsa_output.pci-0000_00_14.2.analog-stereo.monitor", shown as source #1 in my list.
Now catch the output using gstreamer, and save to some filename
gst-launch -e pulsesrc device="alsa_output.pci-0000_00_14.2.analog-stereo.monitor" ! audioconvert ! wavenc ! filesink location=test_wav.wav
You can listen to this file (if something was playing through xmms2 already), and verify that this gstreamer command is catching the right output device. It took me a few tries to figure out which monitor output was the right one.
This filename dump can also be a fifo, which means that the output can also be used with netcat.
First, on the listening machine
nc -l 8000 > test_wav.wav
Next, on the streamer
mkfifo streamer
gst-launch -e pulsesrc device="alsa_output.pci-0000_00_14.2.analog-stereo.monitor" ! audioconvert ! wavenc ! filesink location=streamer
then in another terminal, in the same directory
nc ip_addr_of_listening 8000 < streamer
Saturday, February 6, 2016
Installing xmms2 with NSF support on Ubuntu
sudo apt-get install xmms2
sudo apt-get install xmms2-plugins-*
sudo apt-get install libgme-dev
kill the currently running xmms2d process with kill, then run
xmms2-launcher
To see if things are working, add files (for example .nsf files) and play them
xmms2 add *.nsf
xmms2 list
xmms2 play
sudo apt-get install xmms2-plugins-*
sudo apt-get install libgme-dev
kill the currently running xmms2d process with kill, then run
xmms2-launcher
To see if things are working, add files (for example .nsf files) and play them
xmms2 add *.nsf
xmms2 list
xmms2 play
Subscribe to:
Comments (Atom)