Mplayer interesting options
I like mplayer as a very versatile video player, just the documentation is a bit lacking at times. This is my scratchpad of options I've found useful over the years:
-af scaletempo
To keep the pitch on your video if you play it faster/slower - Very useful to speed up slow lectures/talks and still understand what's being said.
Use [ or ] to increase/decrease video playback speed.
-af volume=20
Increase the volume a bit, useful to boost audio over the standard maximum.
-vm -adapter 2
Play fullscreen on your second
video output.
-ao null
Play without audio.
If you know any other interesting options, please share them below..
– Sec
posted at: 16:10
| Category:
/tidbits
|
permanent link to this entry
|
0 comments
(
trackback)
Android remote input
As most of you already know, I own an android mobile. Recently I wanted to add an RSS feed URL to my android podcast client, but was annoyed by the fact that I had to copy this long URL by hand. I would rather copy&paste it.
As I have rooted my phone, it had to be possible one way or another. Looking around, I found no usable solutions.
The most general solution would be to simulate keyboard input. Digging around a bit in Linux internals I found a way to inject key-presses via /dev/input/events* so I wrote a little program: btype.c. For those not wanting to compile it themselves, you can download the binary here.
It will accept text on the command-line, or read interactively from stdin.
Writing it was actually more difficult than I expected - I didn't want to hardcode the keyboard scancodes, so I had to read&parse the keymap and keylayout files which is always onerous in C. Also I learned funny ioctl%s to find the correct device in %/dev/input and to switch a tty to single-character input. Last but not least I had to find out how to get an android property value in C. – Hopefully all this made the program more portable to other android devices.
I hope someone finds a good use for it, let me know if you like it,
Sec
posted at: 20:04
| Category:
/tidbits
|
permanent link to this entry
|
0 comments
(
trackback)
IBM/Watson and the Jeopardy challenge
Dear Interweb, perhaps you can help me answer a question:
As you probably heard already, IBM built software (called Watson) to play Jeopardy – a well known game show :-).
The big showdown
will be on Feb 14th where Watson will compete against two former Jeopardy champions. There already was a testing
round recently where Watson appears to have won easily, which triggered a lot of articles about this. Most of them discuss the fact that the natural joke/pun filled-language is hard to understand, but I couldn't find anyone answering the most important question: How does Watson get the questions, and with what timing?
I don't think they also tackled audio recognition, so I assume Watson gets the question in text form. But when? The whole question at once, as soon as it is shown? That would put the computer at a enormous advantage, as it can read
much faster than any human. – If they'll put a static delay in, there might be cases where Watson hasn't seen the question before a human buzzes in. The only remotely fair thing that I can imagine is delaying each word separately for a short time which would mimic the show host Alex Trebek reading the question out loud.
I think this is pretty important, as the advantage of getting the whole question immediately is pretty big. What do you think?
– Sec
posted at: 12:27
| Category:
/misc
|
permanent link to this entry
|
0 comments
(
trackback)
Stylish for Firefox
As regular readers here will know, I'm a big fan of the Greasemonkey extension - It allows the hacker in you to play with pages to your hearts content. Visit http://userscripts.org/ to see what people have created with it.
But today I wanted to tell you about Stylish. It presents a nice UI for adding custom URL-based stylesheets. Okay, granted, nothing you couldn't do with Greasemonkey if you wished, but it's really easy and quick to do.
Case in point today: The Android-Developers Blog has an annoying problem. If you visit it while using NoScript, it disables scrolling so you can't read the whole article without enabling JavaScript. – Stylish to the rescue:
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("android-developers.blogspot.com") {
html, body {
overflow: visible !important;
}
}
On a related note: If you always wanted to know what exactly !important
does in CSS, check here
– Sec
posted at: 13:38
| Category:
/tidbits
|
permanent link to this entry
|
0 comments
(
trackback)
Essential Android Apps
|GOOSE| just got a new Android-Phone and asked on his blog about applications.
His comment field is way to small for my list, so I decided to post it here:
Must-Have Applications:
Apps I use regularly
Nice to have
Interesting stuff you should have at least tried
Games (puzzle)
Games (action)
If you have anything to add, please leave a comment.
– Sec
posted at: 00:25
| Category:
/misc
|
permanent link to this entry
|
0 comments
(
trackback)