Sunday, July 24, 2011
Wednesday, February 17, 2010
Java Console for firefox
These rather cryptic command installs the java console addon for firefox.
$ cd /usr/lib/firefox-addons/extensions
$ sudo jar -xvf `find /usr/lib/jvm -name ffjcext.zip`
$ cd /usr/lib/firefox-addons/extensions
$ sudo jar -xvf `find /usr/lib/jvm -name ffjcext.zip`
Friday, January 1, 2010
Maudio-1010LT and ubuntu 9.10
Initially I could get no sound with 9.10 after much research I managed to get a /usr/share/alsa/cards/ICE1712.conf that works!!
#
# Configuration for the ICE1712 (Envy24) chip
#
# default with dmix & dsnoop
ICE1712.pcm.default {
@args [ CARD ]
@args.CARD {
type string
}
type asym
playback.pcm {
type plug
slave.pcm {
@func concat
strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]
}
}
capture.pcm {
type plug
slave.pcm {
@func concat
strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ]
}
}
}
ICE1712.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
}
type asym
playback.pcm {
type route
ttable.0.0 1
ttable.1.1 1
slave.pcm {
type hw
card $CARD
}
slave.format S32_LE
slave.channels 10
}
capture.pcm {
type route
ttable.0.6 1 # I use 7/8 on the card for input
ttable.1.7 1 # change the 6 and 7 to suit.
slave.pcm {
type hw
card $CARD
}
slave.format S32_LE
slave.channels 12
}
}
# Original digital IO (not tested)
#
ICE1712.pcm.iec958.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD {
type string
}
@args.AES0 {
type integer
}
@args.AES1 {
type integer
}
@args.AES2 {
type integer
}
@args.AES3 {
type integer
}
type asym
playback.pcm {
type hooks
slave.pcm {
type route
ttable.0.8 1
ttable.1.9 1
slave.pcm {
type hw
card $CARD
}
slave.format S32_LE
slave.channels 10
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
name "IEC958 Playback PCM Stream"
lock true
preserve true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
]
}
}
capture.pcm {
type route
ttable.0.8 1
ttable.1.9 1
slave.pcm {
type hw
card $CARD
}
slave.format S32_LE
slave.channels 12
}
}
envy24control does not work out of the box I got this ,
I installed everything from source (this overwrites the ICE1712.conf . . . fix it again!)
#
# Configuration for the ICE1712 (Envy24) chip
#
# default with dmix & dsnoop
ICE1712.pcm.default {
@args [ CARD ]
@args.CARD {
type string
}
type asym
playback.pcm {
type plug
slave.pcm {
@func concat
strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]
}
}
capture.pcm {
type plug
slave.pcm {
@func concat
strings [ "dsnoop:" $CARD ",FORMAT=S32_LE" ]
}
}
}
ICE1712.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
}
type asym
playback.pcm {
type route
ttable.0.0 1
ttable.1.1 1
slave.pcm {
type hw
card $CARD
}
slave.format S32_LE
slave.channels 10
}
capture.pcm {
type route
ttable.0.6 1 # I use 7/8 on the card for input
ttable.1.7 1 # change the 6 and 7 to suit.
slave.pcm {
type hw
card $CARD
}
slave.format S32_LE
slave.channels 12
}
}
# Original digital IO (not tested)
#
ICE1712.pcm.iec958.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD {
type string
}
@args.AES0 {
type integer
}
@args.AES1 {
type integer
}
@args.AES2 {
type integer
}
@args.AES3 {
type integer
}
type asym
playback.pcm {
type hooks
slave.pcm {
type route
ttable.0.8 1
ttable.1.9 1
slave.pcm {
type hw
card $CARD
}
slave.format S32_LE
slave.channels 10
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
name "IEC958 Playback PCM Stream"
lock true
preserve true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
]
}
}
capture.pcm {
type route
ttable.0.8 1
ttable.1.9 1
slave.pcm {
type hw
card $CARD
}
slave.format S32_LE
slave.channels 12
}
}
envy24control does not work out of the box I got this ,
Unable to read peaks: No such file or directoryInstall the latest alsa see
I installed everything from source (this overwrites the ICE1712.conf . . . fix it again!)
Java Media Framework (JMF) and ubuntu 9.10
Download and installing JMF
Down load the JMF installation from here
The install instructions don't work! But you can extract like this.
unzip jmf-2_1_1e-linux-i586.bin
Testing
To use initialise go into bin and
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so ./jmfinit
All the commands need this prefix because JMF uses an older version of vl4. To test
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so ./jmstudio
If you get this error
Exception in thread "JavaSound PushThread" java.lang.IllegalArgumentException: amount of data to read does not represent an integral number of frames
at org.classpath.icedtea.pulseaudio.PulseAudioTargetDataLine.read(PulseAudioTargetDataLine.java:152)
at com.sun.media.protocol.javasound.PushThread.process(JavaSoundSourceStream.java:790)
at com.sun.media.util.LoopThread.run(LoopThread.java:135)
You are probably using openjdk
update-java-alternatives -l
java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk
java-6-sun 63 /usr/lib/jvm/java-6-sun
Switch to the sun java
sudo update-java-alternatives -s java-6-sun
Wednesday, December 30, 2009
Streaming webcam via http
MJPG-streamer
Project at source forge
Youtube demo
mjpg_streamer -i "input_uvc.so -d /dev/video0" -o "output_http.so"
http://localhost:8080/?action=snapshot
http://localhost:8080/?action=stream
Animation
My animation setup for linux (ubuntu 9.10 i386).
I want to create animations from a sequence of capture images. This article describes the hardware and software set-up.
Camera
The Logitech QuickCam Pro 9000 Webcam is well support under linux works out of the box.
Controlling the Camera
To control the focus/exposure I am using guvciew. You need to run it a root to get all the features. Here is the app launcher and the controls you get.


Software for capture and preview.
For assembling the images I use stopmotion
sudo apt-get install stopmotion
The video capture in stopmotion capture is done by specifying a command (a deamon that puts the webcam image into a JPG file which is then imported into stopmotion). Yo will need to install vgrabbj
sudo apt-get install vgrabbj
However the default command in stopmotion does not workout the box.
To make it work I replaced video import Start deamon command with
vgrabbj1 -f $IMAGEFILE -d $VIDEODEVICE -b -D 0 -i vga -L250
vgrabbj1 is a simple script that preloads a compatibility library.
#!/bin/sh
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so vgrabbj $*
Put this script somewhere in your PATH for example /usr/bin/
I also replaced the stop deamon command
killall vgrabbj
stopmotion also uses a script to export the video (created from the captured jpeg images). The default is:
ffmpeg -r 10 -b 1800 -i "$IMAGEPATH/%06d.jpg" "$VIDEOFILE"
Assembling and editing the clips.
I plan to use kdenlive. The default version 0.7.5 did not work very well (100% CPU and crashes). Instructions to install the latest version are here
Other software
gimp-gap might be useful for constructing animations using moving layers etc but I have not investigated.
I want to create animations from a sequence of capture images. This article describes the hardware and software set-up.
Camera
The Logitech QuickCam Pro 9000 Webcam is well support under linux works out of the box.
Controlling the Camera
To control the focus/exposure I am using guvciew. You need to run it a root to get all the features. Here is the app launcher and the controls you get.


Software for capture and preview.
For assembling the images I use stopmotion
sudo apt-get install stopmotion
The video capture in stopmotion capture is done by specifying a command (a deamon that puts the webcam image into a JPG file which is then imported into stopmotion). Yo will need to install vgrabbj
sudo apt-get install vgrabbj
However the default command in stopmotion does not workout the box.
To make it work I replaced video import Start deamon command with
vgrabbj1 -f $IMAGEFILE -d $VIDEODEVICE -b -D 0 -i vga -L250
vgrabbj1 is a simple script that preloads a compatibility library.
#!/bin/sh
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so vgrabbj $*
Put this script somewhere in your PATH for example /usr/bin/
I also replaced the stop deamon command
killall vgrabbj
stopmotion also uses a script to export the video (created from the captured jpeg images). The default is:
ffmpeg -r 10 -b 1800 -i "$IMAGEPATH/%06d.jpg" "$VIDEOFILE"
Assembling and editing the clips.
I plan to use kdenlive. The default version 0.7.5 did not work very well (100% CPU and crashes). Instructions to install the latest version are here
Other software
gimp-gap might be useful for constructing animations using moving layers etc but I have not investigated.
Subscribe to:
Posts (Atom)