Wednesday, December 23, 2009

Enter SPL mode on HTC Touch / Vogue

Hold camera button, restart phone and hold camera and press power button at the same time.

Tuesday, December 15, 2009

VDPAO acceleration in Fedora

Need binary nVidia drivers first, not Fedora drivers. (kmod-nvidia / xorg-x11-drv-nvidia)

Check with
yum provides */libvdpau.so.1

which leads you to install

yum install libvdpao

current mplayer has libvdpao support

[rmoore@localhost ~]$ mplayer -vo vdpau -vc ffh264vdpau ironman_trlr_02_720p_dl.mov
MPlayer SVN-r29701-4.4.1 (C) 2000-2009 MPlayer Team

Playing ironman_trlr_02_720p_dl.mov.
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xac02db0]max_analyze_duration reached
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [H264] 1280x544 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[VD_FFMPEG] XVMC-accelerated MPEG-2.
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==========================================================================
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
[VD_FFMPEG] XVMC-accelerated MPEG-2.
VDec: vo config request - 1280 x 544 (preferred colorspace: H.264 VDPAU acceleration)
VDec: using H.264 VDPAU acceleration as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 1280x544 => 1280x544 H.264 VDPAU acceleration [fs]

Monday, December 14, 2009

Enable deltarpm in Fedora

yum install yum-presto

All future updates/upgrades will download delta's instead of the whole rpm

Thursday, December 10, 2009

Article on Gigabit performance

http://www.enterprisenetworkingplanet.com/nethub/article.php/10950_3485486_2

net.core.wmem_max = 8388608
net.ipv4.tcp_window_scaling = 1
net.core.wmem_default = 65536
net.core.rmem_default = 65536
net.ipv4.tcp_mem = 98304 131072 196608

After testing, I went from:

------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.1.14 port 5001 connected with 192.168.1.111 port 46281
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 776 MBytes 648 Mbits/sec

to

------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.1.14 port 5001 connected with 192.168.1.111 port 42455
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-30.0 sec 2.58 GBytes 737 Mbits/sec


Monday, October 26, 2009

Start Nautilus browser inFluxbox

Run


nautilus --no-desktop --browser  &

Convert m4a to mp3

yum install faad2  (if its not already installed).

faad filename.m4a

lame -h -b 192 filename.wav filename.mp3

Tuesday, September 29, 2009

Remove WGA notification

run winodws\system32\wgatray /u

Then delete

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\WgaLogon

Then delete the following in system32

wgatray.exe
wgalogon.dll
dllcache\wgatray.exe
dllcache\wgalogon.dll

And if
SoftwareDistribution\Download\6c4788c9549d437e76e1773a7639582a
exists, delete that whole dir and reboot

Tuesday, September 22, 2009

Play h.264 on slow computer (mplayer)

mplayer -vo xv -ao alsa -lavdopts fast=1:skiploopfilter=all video.mkv

or

mplayer -vfm ffmpeg -lavdopts lowres=0:fast:skiploopfilter=all video.mkv

I've had better success, framerate and quality with the first one.

Thursday, August 13, 2009

Suspend Windows XP from the command line

rundll32 powrprof.dll,SetSuspendState

Rip DVD and convert to XVID with mencoder

Play dvd directly from .ISO file

mplayer dvd://2 -dvd-device Grandizer.iso

Detect crop area in video (for 20 - 30 seconds)

mplayer dvd://2 -dvd-device Grandizer.iso -vf cropdetect

Take the detected crop area and place in the crop=xxx:xxx:xx:xx parameter below. Scale 704:304 is for widescreen.

mencoder dvd://2 -dvd-device Grandizer.iso -vf crop=704:464:10:10,scale=704:304 -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:bitrate=1355:pass=1 -oac copy -o /dev/null ; mencoder dvd://2 -dvd-device Grandizer.iso -vf crop=704:464:10:10,scale=704:304 -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:bitrate=1355:pass=2 -alang en -oac mp3lame -lameopts br=128:cbr -o grandizer_convert.avi

Friday, June 12, 2009

Mencoder / ffmpeg resizing random bits

mencoder -o tmp.avi -oac copy -vf scale -zoom -xy 176 -ovc -


ffmpeg -a .avi -sameq -vcodec xvid -acodec mp3 -s 320x240 .avi

mencoder -v 1.vob \
-alang en \#language english
-vf yadif \#yadif deinterlacer
-ovc x264 \ #codec x264
-x264encopts subq=4:bframes=4:b_pyramid:weight_b:pass=1:psnr:bitrate=1800:turbo=1 \ #1800 bitrate gives a good size to qualit ratio
-oac copy \ #for now only copy the audio
-ofps 24000/1001 \#approx 23.9 fps
-slang en \
-o /dev/null

Second pass:

mencoder -v 1.vob \
-alang en \
-vf yadif \
-ovc x264 \
-x264encopts subq=5:partitions=4x4:8x8dct:frameref=3:me=hex:bframes=4:b_pyramid:pass=2:psnr:bitrate=1800 \
-oac mp3lame \ #mp3lame audio codec
-lameopts abr:br=256:vol=7 \ #256kbits bitrate
-ofps 24000/1001 \
-o 1.avi #write everything as avi for now



10.6. Rescaling movies

Often the need to resize movie images emerges. The reasons can be many: decreasing file size, network bandwidth, etc. Most people even do rescaling when converting DVDs or SVCDs to DivX AVI. If you wish to rescale, read the Preserving aspect ratio section.

The scaling process is handled by the scale video filter: -vf scale=width:height. Its quality can be set with the -sws option. If it is not specified, MEncoder will use 2: bicubic.

Usage:

mencoder input.mpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -vf scale=640:480 -o output.avi

Friday, May 22, 2009

Fix can't send mail problem in windows mobile

Install the Microsoft patch KB958639

Default keyboard in Windows Mobile 6.1 with Opera


Use PHM Regedit

Navigate to
HKEY_CLASSES_ROOT\CLSID\{42429667-ae04-11d0-a4f8-00aa00a749b9}\IsSipInputMethod

Set IsSipInputMethod from 1 to 0

Sotreset and opera keyboard works as normal

Tuesday, April 21, 2009

Google Calendar CSV format

"Subject","Start Date","Start Time","End Date","End Time","All day event","Reminder on/off","Reminder Date","Reminder Time","Meeting Organizer","Required Attendees","Optional Attendees","Meeting Resources","Billing Information","Categories","Description","Location","Mileage","Priority","Private","Sensitivity","Show time as"

"Toronto @ Atlanta SCORE",01/19/09,02:00:00 PM,,,,"ON",,,,,,,,,"Toronto @ Atlanta SCORE",,,,TRUE,3,


Heading is "Private" - value True, False


Heading is "Show time as"
Value is "3" for available ("2" for busy).

Friday, April 3, 2009

Change resolution / scale in mencoder

mencoder -oac copy -ovc xvid -vf scale -zoom -xy 320 -xvidencopts bitrate=450 -o output.avi ~/input.avi

audio is copied
video is xvid
-xy is the resolution, in this case 320 is X and the Y will be proportional
bitrate is 450 (this is small).. usually 8-900kbps

Tuesday, March 24, 2009

Bluetooth in Linux

~/.asoundrc

pcm.bluetooth {
type bluetooth
device 00:11:22:33:44:55
}


mplayer -ao alsa:device=bluetooth

Audacious
options->preferences->Audio->Current Output Plugin->ALSA
Output Plugin Preferences->Device Settings->audio device: "bluetooth"

Monday, March 23, 2009

Append text to cell data in Excel

A1 has "Bob"

in A2 type =a1&" Loblaw"

then A2 becomes Bob Loblaw

Convert .bin .cue to .iso

yum install bchunk
[user1@localhost Download]$ bchunk rcty.bin rcty.cue rcty

[user1@localhost Download]$ bchunk rcty.bin rcty.cue rcty
binchunker for Unix, version 1.2.0 by Heikki Hannikainen
Created with the kind help of Bob Marietta ,
partly based on his Pascal (Delphi) implementation.
Support for MODE2/2352 ISO tracks thanks to input from
Godmar Back , Colas Nahaboo
and Matthew Green .
Released under the GNU GPL, version 2 or later (at your option).

Reading the CUE file:

Track 1: MODE1/2352 01 00:00:00

Writing tracks:

1: rcty01.iso 237/237 MB [********************] 100 %

Wednesday, February 18, 2009

VMWare keypad doesn't work

~/.vmware/config

xkeymap.keycode.108 = 0x138 # Alt_R
xkeymap.keycode.106 = 0x135 # KP_Divide
xkeymap.keycode.104 = 0x11c # KP_Enter
xkeymap.keycode.111 = 0x148 # Up
xkeymap.keycode.116 = 0x150 # Down
xkeymap.keycode.113 = 0x14b # Left
xkeymap.keycode.114 = 0x14d # Right
xkeymap.keycode.105 = 0x11d # Control_R
xkeymap.keycode.118 = 0x152 # Insert
xkeymap.keycode.119 = 0x153 # Delete
xkeymap.keycode.110 = 0x147 # Home
xkeymap.keycode.115 = 0x14f # End
xkeymap.keycode.112 = 0x149 # Prior
xkeymap.keycode.117 = 0x151 # Next
xkeymap.keycode.78 = 0x46 # Scroll_Lock
xkeymap.keycode.127 = 0x100 # Pause
xkeymap.keycode.133 = 0x15b # Meta_L
xkeymap.keycode.134 = 0x15c # Meta_R
xkeymap.keycode.135 = 0x15d # Menu

Monday, February 16, 2009

Canon CHDK links

Includes HDR imaging, Depth of Field and CHDK firmware main site. Works on my SD630.

http://lifehacker.com/387380/turn-your-point+and+shoot-into-a-super+camera

http://chdk.wikia.com/wiki/CHDK_firmware_usage

http://abaditya.com/2008/04/19/playing-around-with-chdk-and-hdr-imaging/

http://chdk.wikia.com/wiki/Samples:_High-Speed_Shutter_&_Flash-Sync

Saving sound from Mame game

Parameter is wavwrite

sdlmame suprmrio -wavwrite suprmrio.wav

Windows Mobile default SIP keyboard with Opera

Search for "IsSIPInputMethod" in HKCR and then find {42429667-ae04-11d0-a4f8-00aa00a749b9}

Change the value from 0 to 1

Tuesday, February 3, 2009

USB HDD repeats [sdb] Sense Key : No Sense [current] error

Ok, my mistake. I tried it out another time and yes it works.

In FC10 you have to:
Nov 11 21:42:10 localhost kernel: sd 5:0:0:0: [sdb] Add. Sense: No additional
sense information
Nov 11 21:42:10 localhost kernel: sd 5:0:0:0: [sdb] Sense Key : No Sense [current]


sudo cp /lib/udev/rules.d/60-persistent-storage.rules
/etc/udev/rules.d/60-persistent-storage.rules

edit: /etc/udev/rules.d/60-persistent-storage.rules

change line 62 from: KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode"
to: KERNEL!="sr*", ENV{DEVTYPE}=="partition", IMPORT{program}="vol_id --export
$tempnode"


From https://bugzilla.redhat.com/show_bug.cgi?id=473017

Monday, February 2, 2009

mencoder to normalize audio in AVI for youtube

Before uploading to youtube

mencoder MVI_4930.AVI -ovc copy -oac mp3lame -af volume=12.1:0 -lameopts cbr:preset=128 -srate 22050 -o MVI_4930_plus_12db.AVI

This will reencode the audio in mvi-4930.avi to mp3 128kpbs/22050 sample rate and add 12db to the original volume

mencoder MVI_4930.AVI -ovc copy -af volnorm=1 -oac mp3lame -lameopts cbr:preset=128 -srate 22050 -o MVI_4930_normalize.AVI

This will reencode the audio and normalize the volume in mp3 format, constant 128kbps / 22050 sample rate.