My name is Philipp C. Heckel and I write about nerdy things.

Copy videos from Youtube & Co. to your iPod Video with Ubuntu


Linux, Multimedia

Copy videos from Youtube & Co. to your iPod Video with Ubuntu


Since nearly everybody in the US and more and more Europeans have an iPod and the whole world loves Youtube, wouldn’t it be nice to copy these flash streaming videos (flv-files) to your iPod Video? — Yes, it is possible. And I will tell you how.


Contents


1. Copy the flash video files (capture the FLV-files)

Ubuntu (and I guess nearly every Linux distribution) makes it really easy to download the flash videos which can be streamed on platforms like Youtube and all the others. Bad luck for Windows users.

  • Just open your browser (Opera in my case, Firefox does it too)
  • Go to the website with the video you want to stream
  • Hit “Play”, wait a few seconds and push “Pause” so that the video starts to buffer
  • Now open the /tmp-folder in a file manager like Nautilus or Konquerer
  • You will find a file with a name like “Flashzad23”, in any case something starting with “Flash”
  • Rename this file to “my-youtube-video.flv”. This also works when the buffering process has not been finished yet

That’s it.

If you just want to watch the video, it’s possible to just open it with your favourite player such as VLC, Totem, MPlayer, etc. This also works while it is still buffering! But since you want to copy it to the iPod Video, you need to resize/re-encode it to a m4v– or mov-file.

2. Resize/Re-encode the flv-file for the iPod Video

Unfortunately, I didn’t find a perfect and fast solution to re-encode flv-videos for the iPod. I will demonstrate two ways, the fast one for movies and series you only want to watch once. And the perfect one for videos you want to keep on the iPod for a longer time.

2.1. Install “ffmpeg” from the Medibuntu repository

For both ways it is at least necessary to install the packages ffmpeg and libavcodec0 from the Medibuntu Repository instead of the regular Ubuntu reps.

You can find out how to do this on the Ubuntu help pages.

2.2. The fast way

The fast way a one big disadvantage: The iPod isn’t able to estimate the length of the video. That means it’s not possible to use the nice diamond control to jump within the video. Regular rewind and fast-forward is still possible anyway.

Luckily, you only need one tool: ffmpeg. Just install it via apt-get:

Basically, just use this command to convert a flv-file to a mov-file (readable/playable by the iPod Video):

To simplify the mass-conversion, I wrote a tiny script which can be copied to your own “.bin”-directory (cp. this article):

2.3. The perfect (and slow) way

Well, this way might be the better one since the disadvantage from above doesn’t occur. Unfortunately, it does take a lot longer. A LOT! But just try it out by yourself.

I found an flv-to-iPod (m4v) encoding script on ubuntu.com written by John Dong. Find instructions and installation hints to the script on the Ubuntu Wiki

3. Transfer the video to the iPod

Use gtkpod or your favorite iPod managing software to transfer the video to your iPod.
I hope this helped a little. Please let me know if you have difficulties or found a better (easier) way to do the conversion!

4 Comments

  1. ricky

    can you give me the code, and help for the youtube videos in the ipod, please i’ll appreciate it

    [Edit by Philipp]
    Unfortunately, Ricky didn’t reply to the mail I wrote him and since I have no idea what he was talking about I can’t help here :-/


  2. luca

    hy,
    I was able to easily convert a youtube video to .m4v with Download helper , a firefox extension.
    I’ didn’t tried the video on ipod yet


  3. luca

    I confirm i sucesfully imported a video from youtube to my 7 generation nano ipod
    using a firefox extension available here http://www.downloadhelper.net/
    then I transfered the file with gtkpod
    and gtkpod-aac packages from medibuntu 9.04 repos.
    The audio is OK and i could seek through the video


  4. sandrar

    Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.