It’s a scroller, of sorts. Sort of.
- Youtube video. Quality: Horrible.
- Lunix version.
- Windows version: Yeah sure, just as soon as I feel like figuring out how to put single pixels on the screen somewhat fast.
HOWTO: Record sound made by some application on Linux (ALSA)
Posted on November 09, 2008 at 07:41 PM
From time to time, I want to record the sound some application makes under Linux. Sadly, my sound card does not provide a “Stereo Mix” device which lets you record all the sound something makes, so I made myself this perl script which records ALSA output of an application and prints it to stdout as PCM.
Update: Added a second of sleep before making sound.
#!/usr/bin/perl
use strict;
my @cards = `cat /etc/asound.names |
grep -C 1 -i loop |
grep -C 1 -i PCM |
grep name`;
my $recordcard = @cards[ 0 ];
my ($recordcard) = ($recordcard =~ /'([^']*)'/);
my ($card, $device) = ($recordcard =~ /:([0-9]*),([0-9]*)$/);
if( @ARGV < 1 ) {
print STDERR
"USAGE: ./record_loopback.pl some_command_that_makes_sound\n";
exit;
}
my $has_aloop = 0;
my @modules = `lsmod`;
foreach( @modules ) {
if( $_ =~ /snd_aloop/ ) {
$has_aloop = 1;
last;
}
}
if( $has_aloop == 0 ) {
print STDERR
"FATAL: You need to have the module 'snd_aloop' loaded. ";
print STDERR
"Please do 'sudo modprobe snd_aloop' to load it.\n";
exit;
}
print STDERR "Assuming PCM loop driver is card $card, recording device 1.\n";
my $command = "env ALSA_PCM_CARD=$card env ALSA_PCM_DEVICE=1 " .
join( " ", @ARGV ) . " 1> /dev/null";
if( fork() ) {
sleep(1);
system( $command );
}
else {
system( "arecord -D hw:$card,1 -f cd" );
}
(Note that you won’t hear stuff while recording.)
It has AA characters on it! (Also, I run KDE, despite this being an Ubuntu sticker. I didn’t have a Kubuntu one. Meh.)
UPDATE: Flash player 10 64-bit version for Linux is out. Go for that, it can’t possibly do worse than this hack.
Flash Player 10rc1 is out, and there’s a Linux version - but still without native x86_64 support. It’s also a bit of a pain to get running with nspluginwrapper due to some new dependencies and lack of distro-specific packages. Here is how you do it. (On K- or Ubuntu Gutsy, specific directories and ways to install things may vary for your distro.)
First, remove all previously installed versions of flash player, whether you installed them by hand or via apt-get or with Adept or whatever. Install nspluginwrapper and a few dependencies, if you haven’t already anyways:
sudo apt-get install ia32-libs util-linux lib32asound2 nspluginwrapper
Now, get the Flash Player 10rc1 package from Adobes web site and extract it somewhere on your disk. Copy the file “libflashplayer.so” from that archive to /usr/lib32/:
wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_install_linux_081108.tar.gz tar -xzvf flashplayer10_install_linux_081108.tar.gz cp install_flash_player_10_linux/libflashplayer.so /usr/lib32/
Flashplayer 10rc1 needs the 32bit-Versions of a few more libraries to work, specifically:
- libssl3.so
- libnss3.so
- libssl.so.0.9.7
- libcrypto.so.0.9.7
- libnssutil3.so
- libplc4.so
- libplds4.so
It’s a bit of a pain to hunt all those down, so here’s a .tar.gz with all of them (Mirror). Copy the libraries in this archive to /usr/lib32/:
wget http://halcy.de/misc/flashplayer10deps.tar.gz sudo cp flash_player_10_deps/* /usr/lib32/
You’re finally ready to let nspluginwrapper install the flash plugin now:
sudo nspluginwrapper -v -i /usr/lib32/libflashplayer.so
That’s it, flash 10rc1 should work now! Unless, of course, you’re using Firefox3, which stores it’s plugins in a place nspluginwrapper does not know about, so if you use Firefox 3, you have to create a link to the plugin in Firefox 3s plugin directory:
sudo ln -s /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so /usr/lib/xulrunner-addons/plugins/
Now, it should work in Firefox 3 as well.
If you’re unsure if everything worked, check about:plugins in your browser, Flash 10 should be listed.
This month
| May | ||||||
|---|---|---|---|---|---|---|
| Mo | Tu | We | Th | Fr | Sa | Su |
| 30 | 1 | 2 | 3 | 4 | 5 | 6 |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | 1 | 2 | 3 |


— Full post RSS feed
— Comment RSS feed
— CC-BY-NC license
— Valid XHTML 1.1
— Debian operated
— Powered by Ruby
— Co-Powered by Perl
— Made with kate