Archive for November, 2007

DeVeDe

November 30, 2007

I wrote a mencoder script back when I was still running Ubuntu 6.06 Dapper to which I could pass various options in order to convert videos from avi to dvd. Three upgrades later, and I seem to have lost the script. I had two choices; one spend a considerable amount of time remembering and re-writing the script, or two look at at using a gui application. I chowse option two. The one that struck me most (other than the front-end to transcode) was DeVeDe. Its a nice simple application that can encode a number of different video formats to DVD, VCD, sVCD formats suitable for playback on your home dvd player (provided you have the dependencies which are mplayer, mencoder, vcdimager, dvdauthor, mkisofs). It has a really simple interface yet provides a fair amount of options for video conversion . You just tell it what you want it to do and it does the conversion and creates a ready to burn iso for you. I found it quite useful.

One thing to note:

“for Ubuntu Gutsy users: by default (as November 21, 2007) Gutsy comes with Mplayer/Mencoder buggy version 1.0RC1 (like Feisty); but fortunately there’s the version 1.0rc2 avaiblable in the backports repository, which fixes the sound bug.”

So had I found my script, I think I would have run into a problem anyways 😉

Jumping into local Only.

November 18, 2007

After reading Stefano Rivera’s (tumbleweed) post about local only ADSL accounts I had decided to implement the idea on my home network, which has an overworked 400mhz celeron box, running debian between my router and switch doing masquerading.
I fired up my favourite terminal and started off my creating another provider script for the new IS account. I modified Stefano’s source routing script and created a script in /etc/ppp/ip-up.d/ to setup the routing accordingly.

root@hopkin:/etc/ppp/ip-up.d# cat setuprouting
#!/bin/sh
# based on tumbleweed’s split routes script
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
export PATH
ROUTES=/etc/routes/localroutes

# Is this our internal ppp session?
if [ “$PPP_IFACE” = “ppp0” ]; then
peer=`ip addr show dev $PPP_IFACE | sed -n ‘/inet/ s#.* peer \([0-9.]*\)/.*#\1# p’`
address=`ip addr show dev $PPP_IFACE | sed -n ‘/inet/ s/.* inet \([0-9.]*\) .*/\1/ p’`

ip route add “$peer” dev “$PPP_IFACE” src “$address” table 1
ip route add default via “$peer” table 1
ip rule add from “$address” table 1
fi

# Is this our local ppp session?
if [ “$PPP_IFACE” = “ppp1” ]; then
cat “$ROUTES” | while read route; do
ip route add “$route” dev “$PPP_IFACE”
done

peer=`ip addr show dev $PPP_IFACE | sed -n ‘/inet/ s#.* peer \([0-9.]*\)/.*#\1# p’`
address=`ip addr show dev $PPP_IFACE | sed -n ‘/inet/ s/.* inet \([0-9.]*\) .*/\1/ p’`

ip route add “$peer” dev “$PPP_IFACE” src “$address” table 1
ip route add default via “$peer” table 2
ip rule add from “$address” table 2
fi

That was it! I lie. It would of been if not for me forgetting to modify the firewall rules. So technically that was it after 3mins of pondering about the ridiculously obvious.