Converting MJPEG from our Canon SD630 to DIVX
Wednesday June 14th 2006, 2:34 pm
Filed under:
Linux,
Video
We love the new camera, the 630 was the right choice for us. We are carrying it just about everywhere and have some amazing pics and video of our daughter. One the issue with the camera is that it captures video in MJPEG (yuck!), which leads to huge file sizes. I did some searching and cobbled up this script to do the conversion for me. It requires mencoder, but who doesn’t have that installed on their Linux box?
Anyways, here is the script:
#!/bin/sh
#
# Set the bitrate
BITRATE=1800
#
# Remove the log if it’s there
#
if [ -e divx2pass.log ]; then
rm -f divx2pass.log
fi
#
# Loop through the mencoder process twice for dual pass
#
for i in 1 2; do
/usr/bin/mencoder $1 -oac mp3lame -lameopts preset=medium -af-adv force=1 \
-mc 0 -channels 1 -srate 11025 -ovc lavc -lavcopts \
vcodec=mpeg4:autoaspect:vbitrate=${BITRATE}:vpass=${i} -o MPEG4-${1}
done
#
# Cleanup
#
rm -f divx2pass.log
Encrypting /home on FC5
Wednesday June 14th 2006, 2:32 pm
Filed under:
Linux,
Mobile
Since I’m carrying a bigger laptop around these days with enough room to have a dev environment and real desktop replacement work environment I decided that I needed some way to secure my confidential data. I found this link (Encrypt /home and swap over RAID with dm-crypt) and used a subset of it to encrypt my /home directory, at a minimum. It just seems like “The Right Thing(tm)” to do where you might have sensitive data that could be stolen.
I was able to bypass some of the step since I’m not using a RAID array. Here is the gist of what I did:
Create the logical volume called “sec”
lvcreate -L 16G -n sec vg0
Fill it with random noise
dd if=/dev/urandom of=/dev/vg0/sec bs=1M
Do the crypt setup, setup the encryption, create the /dev/mapper/device
cryptsetup -y -c twofish-cbc-essiv:sha256 create sec /dev/vg0/sec
Make a filesystem on the encrypted device.
mkfs.ext3 -b 4096 /dev/mapper/sec
Edit the startup script to taste.
vi /etc/init.d/encrypted_home.sh
Run the script and mount the volume
/etc/init.d/encrypted_home.sh
I also linked in the /etc/init.d/encrypted_home.sh script into /etc/rc3.d and /etc/rc5.d so my machine prompts me for my crypt password on boot, which FC5 handles quite nicely.