thisisabore

Aller au contenu | Aller au menu | Aller à la recherche

samedi 7 avril 2012

Oh PulseAudio, you are an interesting little beast

So, one can record anything going through PulseAudio (and therefore really, any sound being played back on Ubuntu or Debian) very simply.

Of course, this comes as no surprise.
After all, everything is a copy on a computer, no matter how many layers of impracticality you add for a user (cumbersome flash players à la myspace, silly DRM, etc.) to prevent them from accessing that copy.

No, what's great here is how simple it is to dump the sound being played back, once you look into it.

Without any further ado, here is how to dump anything being played back as mp3, Ogg Vorbis or the almighty FLAC:

mp3: parec -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor | lame -r -V0 - test.mp3

Ogg Vorbis: parec -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor | oggenc --raw -q 8 -o test.ogg -

FLAC: parec -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor | flac --force-raw-format --endian=little --channels=2 --sample-rate=44100 --sign=signed --bps=16 -o test.flac -

parec is the command to record from a PulseAudio device, and -d the flag to specify which device to record from (this must be an input device, and will vary from system to system) We then pipe the data (using the pipe symbol | ) to an encoder, either lame for mp3, or oggenc for ogg vorbis.

For lame, we specify the data is coming in raw format (-r) and we ask the sound to be encoded in V0 quality (~256 KBps). We tell it to use the stdin input (represented by single dash -) and to output to a file called test.mp3.

For oggenc, we specify the data is coming in raw format with the —you guessed it— --raw flag and ask for a quality of 8 (out of 10) with the -q 8 flag. We also request an output file named test.ogg with -o test.ogg, and tell it to use stdin as the input file (to use the data piped through with the |) with the final -.

For flac, things are a little more complicated, as flac demands more information when you encode from stdin. You have to specify the endianness of the data coming in with --endian=little (I tried both big or little, you want little), the number of channels (1 for mono, 2 for stereo, 6 for 5.1 etc.) with --channels=2, the sample rate (44 100 KHz is what CDs use, DVDs are usually 48 000) with --sample-rate=44100, --sign to “Set the sign of samples (the default is signed)” (yes, I'm quoting from the manual, no idea what this does) and finally, the number of bits per second, which is 16 on CDs (hence --bps=16). We then ask for the data to be written to an external file called test.flac with -o test.flac and tell flac to get its input data from stdin (and therefore from parec through the pipe) with the final dash.

That's it.

Neat, eh?

jeudi 8 septembre 2011

Would you please sign this petition? (and then pay us to remove your account)

A few months back, I signed a petition online. The kind of petition you know won't actually do anything, but makes you feel good for signing it.
Yes, it was a spur of the moment thing.

As one had to log in to sign the petition, and I didn't feel like creating yet another account, just for a petition, I used their “sign in using your Twitter account” feature.

You can imagine how surprised (and unimpressed) I was when, a short while later, I found out I had posted a new message to Twitter via petitionspot.com.

Yup, although I didn't give petitionspot.com any authorisation to post using my Twitter credentials, and only used these credential as a form of authentication [1], apparently they thought it was fine and went right away with using my account for shameless self-promotion.

And they also created an account on their platform, without warning.

Notes

[1] Authentication against what anyway? Is petition fraud such a widespread problem we need to authentify?

Lire la suite...

samedi 4 juin 2011

Problem Net Neutrality?

Problem Net Neutrality?

jeudi 2 décembre 2010

Why Identi.ca (and Status.net) matter in a Twitter world

This article was written before “New Twitter” was launched, but I believe most of it still stands. It has been slightly update in September 2011 to include a few evolutions, but is mostly left untouched.

[Note: this is a self-translation of a French post I wrote a little while ago. I don't like self-translating, it makes stuff sound less natural. Hopefully this will turn out ok, otherwise I know who to blame.]

Let's immediately agree on the obvious question: Why would anyone use Identi.ca when everyone is on Twitter?

Basically, this is the same question as “Why use Diaspora when everyone is on Facebook?”, “Why use Facebook when everyone is on MySpace?”, “Why use MySpace when everyone is on Friendster?”, or the good old “Why use XMPP when everyone is on MSN?” and “Why use MSN when everyone is on ICQ?”.

By now, I think most of you see where I'm going with this…

There is always a network that is more popular than others at a given point in time, without it being an obvious guarantee of said network's quality.
This is simply the case because a network's value is equal to its number of users squared. This is called Metcalfe's Law.

In our case, “everyone is on Twitter” clearly gives superior value to Twitter.
Of course, “everyone” almost always really means “everyone that is actually interested in this service at this point in time”. Even Facebook, gargantuan monster of a social network that it is, can not (yet?) claim to be a universal address book.

Lire la suite...

jeudi 6 mai 2010

Éclair, Flan and other french pâtisseries for free software geeks

As many of my fellow Android geeks may not be versed in the art of French pâtisserie, I thought I would clear the situation as to what exactly on Earth are an éclair and a flan, and show their superiority to the atrocity (from à pretentious French point of view) known as a donut.

After all, it only seems right to have my sweet tooth and FLOSS meet.
Ta-daa.
(Thank you, I'll be here all week)

Without any further ado, here are a some pictures of an éclair and a flan, together, in glorious sugary harmony:

Lire la suite...

samedi 10 octobre 2009

The most funnestest iPod ever. Like, for real.

Whoever is responsible for this grammatical horror

…needs to be shot. Now.

Isn't lowering the recording industry's standards enough for you Apple?[1] Do you need to also kill the already low spelling standards of the American youth?

How evil art thou.

Notes

[1] I'm talking about the fact that records are now often mixed and mastered to lower standards as not all engineers can be bothered to work hard knowing lossy codecs and iPod earphones are how their work will end up being listened to anyway.

jeudi 8 octobre 2009

Copyright insanity #1

Today, C. wanted to take some pictures at the local shopping centre/plaza in a non-professional way and for her personal enjoyment, the way she often does.

Hell, the way everyone I know does, half of my friends are photogeeks anyway.

As she started taking pictures of the poster for a film festival in the entrance to the arcade's cinema, a girl behind the counter told us we “couldn't do that”. C. put the protective cover back on her camera's lens and we started leaving. Yet, this seemed like copyright abuse to me, so after checking with C. if she'd mind if I asked the girl to explain, I headed back to the counter.

I asked the girl for what reason we weren't allowed to take pictures, and, lo and behold she told me it was because
“The posters are copyrighted. And it's against cinema policy.”.

Interested and clearly sensing copyright abuse, I started answering.

“Look, this isn't against you, but…”

“This is cinema policy, it's the way it is. I don't want to discuss this anymore with you.” she cut through, and she just left me there.
Obviously, as I was the only person in the cinema's hallway, this clearly was movie rush hour and she had highly more important things to do than answer a customer's question.

Reasonably, I was left rather pissed as an other human being had basically just refused intelligent conversation and hid behind corporate policy to justify stupidity, and more importantly, done it in one of the most blunt and rude ways I've experienced.

What's annoying is that the cinema is actually nice, has reasonable pricing and a nice selection.

So, I've checked, and though I am not a copyright lawyer I think this shows one has the right to take pictures of film posters : Australian Copyright Act of 1968, section 65.
For the lazy ones, here is what it says : The copyright in a work to which this section applies that is situated, otherwise than temporarily, in a public place, or in premises open to the public, is not infringed by the making of a painting, drawing, engraving or photograph of the work or by the inclusion of the work in a cinematograph film or in a television broadcast.

So there, from what I make of it, a copyrighted work displayed in open premises does not see it's copyright infringed by a photograph, especially if the picture is for personal enjoyment. And by definition, a film poster is a public work of art, as it's entire point is to be shown to the public and therefore displayed publicly.

Needless to say, I think the obsessive dickhead I am is going to drop by and give her a print-out of that section. She probably doesn't care (she actually made that clear by being deliberately rude), but whatever. %% It is noble and just to dispel myths, falsehoods and untruths, right ?

The worst bit is this : copyright is supposed to help protect artist's rights and avoid spoliation. By being obnoxious and abusing copyright, this girl makes me not want to go to the cinema she works at again. I find a cinema I like and and a stupid policy and worker makes me want to not go there anymore. How is that good for artists?

lundi 29 juin 2009

The medium is the message?

A blog. Another one :) When a good deal of what the traditional media publishes seems to have gone 'round the Interwebs a few times, I too want my 15 Mb of fame.

Or more likely just a place to babble about my interests to people who, I hope, will be interested. Or will react. Or something along those lines.

All of this randomly in a language or the other, because that's how the Internet should be: diverse.

Ok, let's go. Ikimashō!