Converting Videos to work on IPOD

05/01/08 | by turnerst [mail] | Categories: General

See earlier post on converting You Tube movies to avi. Works fine if you want to play on your computer, however the videos won't work on the ipod.

Did a lot of investigation and it seems like a number of people are having a similar problem.

This is how I got it to work.

I'm using Ubunty 7.10 (Gutsy) BTW.

  • Add the Medibuntu repository if you don't already have it. This link gives instructions on how to do it.
  • Go to Main Menu -> System -> Administration -> Synaptic Package Manager
  • Click on the "Mark all Upgrades" toolbar icon. Click the "apply" toolbar icon to install the updates.
    You will now have a version of ffmpeg that can convert the avi video to the format that the ipod likes.
  • Use the command:
    ffmpeg -i input.avi.1 -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab 192 -s 320x240 -aspect 4:3 output.mp4 to convert the video.
  • Load the video on to your ipod and play!

Discovered a few other things on my travels of some interest:

  • The kids are using the ipod software on windows and I have to say I was shocked at how bad it is. From having to put your credit card details in to the way it manages a music library and the album art retrieval is limited to say the least!. Found gtkpod for linux which looks interesting. Haven't tried it as I haven't converted the kids to LINUX yet. I use Amarok on Ubuntu as it works with my creative zen and I'm so impressed how it manages album art, podcasts etc. Thumbs up to amarok.
  • Found vive, which claims to have preset conversions for ipods etc. Software downloaded ok etc, however the presets were not there which was disappointing.
  • This page gave me the ffmpeg command to use. Thanks!

Converting You Tube Videos to avi in LINUX

13/12/07 | by turnerst [mail] | Categories: Code

My youngest Son asked ...

"Dad can I download the Gorilla advert from You Tube to my phone?"

Challenge: You Tube videos are in FLV format.

Quick browse on the web, help is at hand:

This is a general guide and this piece of software downloads the flv to your local disk.

Already had mencoder installed, so just needed the following two commands:

python youtube-dl.py http://uk.youtube.com/watch?v=Wy52yueBX_s

mencoder Wy52yueBX_s.flv -ofps 10 -vf scale=300:-2 -oac lavc -ovc lavc -lavcopts vcodec=msmpeg4v2:acodec=mp3:abitrate=64 -o gorilla.avi

Note that the above mencoder line results in a buzzing noise on the video produced.

Rather than dig through all the mencoder command options, found ffmpeg which does the job using the following command:

ffmpeg -i Wy52yueBX_s.flv gorilla.avi

Enjoy!

Orange Option Icon 3G Data Card

05/12/07 | by turnerst [mail] | Categories: Code

Have just been on a journey to get my Orange Option Icon 3G Data USB Modem working.

First issue is that the USB Device comes with a flash disk which is loaded in preference to any modem drivers.

No worries, help is at hand.

http://www.draisberghof.de/usb_modeswitch/

With that compiled, then followed instructions here:

http://www.timberwolf.ukfsn.org/debian-orange-3g.html

Took out this line:

# Check the whether 3G or GPRS
OK-AT-OK "AT$NWRAT?"

As it didn't work.

Also found the following utility useful:

gcom - good utility for looking at signal strength etc.

gpppon is useful for dialing up the orange connection.

Ubuntu / Blackberry / Bluetooth / GPRS

22/11/07 | by turnerst [mail] | Categories: Code

Was considering getting a data card for my laptop as deals are getting more reasonable. You can get 3GB of data from T-Mobile for 20 GBP per month, which includes a free USB modem. They have a fair usage policy over 3GB which means you don't get charged more, however your bandwidth speed may go down.

Before committing, thought I would see if I could get my firm provided Blackberry 8800 / Pearl to connect to Ubuntu. We have a fixed tariff with Vodafone which allows as much data as you like over GPRS for a fixed fee per month.

For fun, I thought I'd go the Bluetooth route as I have a Bluetooth USB device that the kids have been using to sync music and pictures to / from their phones using Windows. The USB Bluetooth device I have is a Belkin and the specific model number is: F8T012xx1 (on the back of the device).

Plugged the Bluetooth device in to the laptop (Running latest version of Ubuntu Desktop 7.10), the blue light came on and ... nothing. After some investigation found out the following:

  1. Bluetooth services are not started. Go to System / Administration / Services and enable
  2. Wrong drivers are loaded. If you do a:dmesg | tail, you will find that a driver called "peagasus" gets loaded. Sudo to root and edit the /etc/modprobe.d/blacklist file. Add a line:blacklist pegasus, and restart the user driver services and bluetooth:/etc/indit.d/udev restart
    /etc/init.d/bluetooth restart
    . Insert the USB device and the blue light should come on and you should get a system tray icon showing that bluetooth has been recognised.
  3. Now pair the device, I fiddled around here for a while, however go the devices to pair in the end after exchanging various pin numbers etc.
  4. Now run a command to find out the address of the paired device. hcitool scan The command will return a hex number something like: FF:65:56:12:23:35. Note the number, you will need it.
  5. Now run another command: sdptool browse (the number you just wrote down). That command will produce a list of the services offered by the device along with a channel number. Look for the block which describes itself as a Modem. Note the channel number.
  6. Now edit the /etc/rfcomm.conf file. Where it has device, put your device number and where it says channel put your channel number for the Modem.
  7. Restart bluetooth: /etc/init.d/bluetooth restart
  8. Pair the devices again and now to get the dialer working. Edit the /etc/wvdial.conf file. Add an entry as follows:
    [Dialer berry]
    Phone = *99***1#
    Username = web
    Password = web
    Modem = /dev/rfcomm0
    Baud = 115200
    Init1 = ATZ
    Init2 = AT+CGDCONT=1,"IP","internet";
    Flowcontrol = None
    Dial Command = ATDT
    The phone number you use will depend on your phone setup. Phones have multiple ways to connect and each phone stores these differently, essentially you are looking for the connection on your phone that gives you GPRS, if its listed first then use 1, second use 2 etc. There are only a max of 8 allowed, so you can start from 1 and try up to 8 if you are not sure. Username, password and the word "internet" at the end of the Init2 string should be obtained from your service provider. This page has a good reference for settings.
  9. Now type: wvdial berry and voila you should get connected.
  10. Bad News - my firm restricted me on the berry from doing this, so learned a lot and am now going to go to the T-Mobile shop.

Simple Mail Folder Reader

22/11/07 | by turnerst [mail] | Categories: Python

I work a lot and because of company firewalls etc, I can't get to my personnal mail whilst at work. I've thought about buying myself a blackberry, or using a mobile data card for my laptop, however, I don't want to shell out any more money every month!

So I wrote a python script that scans my mail box and puts up a very simple web page of my email. Completely insecure etc, et, but obfuscated enough that it won't be found and hey, there is never anything that secret in there.

I made a goof in that although I only displayed a small portion of the email, the script downloaded all of the email each time. So, when someone sent me a huge email and I was on holiday, my script kindly downloaded the mail of well over 5MB every 10 minutes and quickly killed my bandwidth so I was out of quota and all my websites didn't work!

I tried doing an IMAP SEARCH and asking for messages "SMALLER 10000", that didn't work, I just got junk back from the server. What I've gone for now is to FETCH the size of the message, check and only download headers if the message is less than 10K. here's the code fragment:


result, data = m.fetch(msgid, 'RFC822.SIZE')
size = int(data[0].split(' ')[-1][:-1])

if size > 10000:
msg = m.fetch(msgid, '(RFC822.HEADER)')
else:
msg = m.fetch(msgid, '(RFC822)')

# Re-construct the email message
emails.append( email.message_from_string(msg[1][0][1]))

Pages: << 1 2 3 4 5 6 7 8 9 10 11 ... 26 >>

September 2010
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
powered by b2evolution