Video Player

From wikiPodLinux

Table of contents

Support

Video playback is now included in CVS. It should be able to display uncompressed AVI with audio encoded in the right format for your specific iPod.

Because they're uncompressed, videos converted for the iPod will inevitably end up as much larger files (typically 10 times larger) than the original versions.

Once you have converted a video file as per the below instructions, just drop the files onto your iPod, and select them from the File Browser to view them.

Status

Here's a table of the hardware that the video player supports on the various generations. (Yes I stole this from the Project Status page.)

Generation Video Compression Audio A/V Sync
1st Image:Tick.png Image:Cross.png Image:Tick.png Image:Cross.png
2nd Image:Tick.png Image:Cross.png Image:Tick.png Image:Cross.png
3rd Image:Tick.png Image:Cross.png Image:Tick.png Image:Cross.png
4th Image:Tick.png Image:Cross.png Image:Tick.png Image:Cross.png
5th Image:Cross.png Image:Cross.png Image:Cross.png Image:Cross.png
Mini Image:Tick.png Image:Cross.png Image:Tick.png Image:Cross.png
Mini 2G Image:Tick.png Image:Cross.png Image:Tick.png Image:Cross.png
Photo Image:Tick.png Image:Cross.png Image:Tick.png Image:Cross.png
Nano Image:Tick.png Image:Cross.png Image:Tick.png Image:Cross.png
1 - Will be inverted with backlight on. (this is a general issue that doesn't just affect the Video Player.)

As of right now this only plays **UNCOMPRESSED PRE-CONVERTED** videos. One of the sample videos was playing upside down because I forgot to flip it when it was encoded. Any distortion of videos (such as flipping) is due to the encoding of the video.

There is limited A/V sync which should work fine as long as you don't seek or pause.

Download

The video player is now included in the latest CVS. Check out and build from CVS or use nightlies (http://ipodlinux.org/builds) instead.

Note: You may need to install a new kernel as well as a new podzilla. If you get the screen "Loading video..." and possibly only sound when attempting to play the examples, this is your problem.

Converter

To convert for grayscale iPods a separate program is needed. The latest version is in CVS under tools/video/2bppconv and should generally be checked out and built from there.

Here is a package of prebuilt binaries, but there is no guarantee that it is up to date.

Sample Videos

A sample video from EBaum's World (http://www.ebaumsworld.com) (credit where credit is due):

iPod adverts (https://www.apple.com/ipod/ads) reformatted for the iPod:

Other stuff reformatted for the iPod:

Ant video with sound for photo (currently works):

Demonstration

Here's a video of different iPods playing some videos:

http://booc.coob.org/ipl-videoplayer.mp4 Note: Encoded in H.264 - Quicktime 7 or CVS MPlayer required.

This shows the 4G and photo playing the same video. Notice the stuttering on the photo; this stutter has been fixed in recent versions.

(If you get a page full of gibberish when clicking the link, go back and right- (or control-) click on the link and choose "download linked file" or something along those lines.)

O'Reilly MAKE's online blog (http://www.makezine.com/Blog/archive/2005/06/play_videos_on.html) also has a video showing the mini, photo and 3G running videos, although you can't make out the screens very well:

http://downloads.oreilly.com/make/ipod_video3.mov

They also made the mistake of installing iPL on a photo with 1.1 firmware, hence the messed up colours.

A fix dated 18 June 2005 was submitted to CVS which may fix the 1.1 color problem. Try the 19 June 2005 nightly build which I have confirmed actually WORKS with the right colors on an iPod photo 30GB. Now if only I could use my A/V cable to stream the video out to my TV (which I have confirmed does NOT work). :-)

Update January 3, 2006

MAKE's online magazine posted a new article on the Podzilla project. Here, they show a step-by-step method of installing podzilla on a Ipod Photo with an Apple G4. They also provide a video that shows some of the Podzilla functionality. The points of interest are two short clips of video; with and without audio. The movie is very clear and seems to show video playback accurately.

Article Site: http://www.makezine.com/extras/46.html

Movie Link: http://downloads.oreilly.com/make/ipodlinux.mov

Installation

Linux, Mac

  • For Linux or Mac, follow the console-based instructions in the install directions.
  • For Mac it is also possible to just replace the linux.bin in the official installer and then reinstall Linux on your iPod (remember to back up the folders that you have changed since the last installation, or else the changes will be gone), then add the new podzilla afterwards. To do this, rename the kernel image linux.bin, right- (or control-) click on the installer application, navigate to the Resources folder, and replace the existing linux.bin. Note that the application cannot be on the disk image (it is read-only).

Windows

  • For Windows, you can replace linux.bin in the iPodLinux installer directory with this download, then follow install directions as usual. Afterward, copy the video podzilla file onto the ipod and add the start file.

Bugs

  • iPod Photo/Color: Around on the forums we see many users complaining about how video doesn't work properly on these models. The issue only seems to arise with this line of iPods. The issue is that when you try to play video you only get the audio part of the .avi and not the video. When you press pause, the pause logo appears and the audio pauses, then when you press play the audio starts up again and the pause logo remains. But during this whole time you never get any sign of video just the Loading Video... screen There is no mention of a Kernel Issue, a podzilla issue or just conversion issues. The most commonly affected iPods are 20/30/40 GB iPods, the 60 gb iPods don't seem to be mentioned as having problems as often as the other models. (There are many topics on the forums regarding this issue but there has been no fix yet.)
Here is an UNSUPPORTED way of playing video on the iPod. Forum Topic (http://ipodlinux.org/forums/viewtopic.php?t=10628&highlight=)
Here is the Wiki page Mv Player (http://ipodlinux.org/Mv_player)

Please note that not all iPod Photo/Color are affected by this issue, most are but not all.

  • The other iPod models aren't as majorly affected as the photo/color line.

Video Conversion

Ah, the fun part. Videos must be first converted to uncompressed, 24-bit .avi files at the iPod's screen resolution. Then, they are reconverted to be the exact format needed for the iPod. A small program has been written to do this reconversion, but please do not look at the source code (the code is in shambles and looking at it will cause more harm than good).

This won't be the case in the future, but I currently haven't finished any part of my conversion utility.

Linux, Mac OS X

mencoder may be downloaded and compiled from: http://www.mplayerhq.hu/homepage/design7/dload.html

Or you can download a pre-compiled binary from: https://sourceforge.net/project/showfiles.php?group_id=62947&package_id=70503&release_id=132403 . You may need to get a different binary if you have a G3 processor from: https://sourceforge.net/project/showfiles.php?group_id=62947&package_id=70503&release_id=162732. To install, copy the mplayer and mencoder files to your /usr/bin folder. To go to that folder, press Command-Shift-G and type /usr/bin. You may need to authenticate in order to move the files.

2bppconv will be found in the ConverForGray-0_3.tgz file in the downloads section. 2bppconv-x86-linux is the binary for Linux, 2bppconv-ppc-osx is the binary for Mac OS X.

To install ffmpeg and mencoder in debian it's more easy to write

$ sudo apt-get install mencoder

and

$ sudo apt-get install ffmpeg
Nano

Please note that the latest released version of mencoder for Mac OS X (binary / Unix executable) has an RGB colour bug, which means that you will not be able to get the correct colour result on your iPod Nano.

Use following mencoder commands:

convert to raw pcm_s16le audio

$ ffmpeg -vcodec rawvideo -acodec pcm_s16le -r 15 -i file.avi -s 220x176 -aspect 4:3 output.avi

Then convert to raw video bgr16

$ mencoder -ovc raw -ofps 15 -oac pcm -vf scale=176:-2,expand=176:132,format=bgr16 in.avi -o out.avi
Photo

Please note that the latest released version of the mencoder for Mac OS X (binary / Unix executable) has an RGB colour bug, which means that you will not be able to get the correct colour result on your iPod Photo.

You have to compile mencoder on Mac OS X from the sources!

Use following mencoder command:

$ mencoder -ovc raw -ofps 15 -oac pcm -vf scale=220:-2,expand=220:176,format=bgr16 in.avi -o out.avi
Grayscale iPods

A much more in-depth tutorial for converting to Grayscale iPods/iPod Minis can be found link here (http://ipodlinux.org/Grayscale_Conversion_on_Mac).
Use the following mencoder command, then run the conversion program on the output of mencoder. (The conversion program can be found in the downloads section.):

$ mencoder -ovc raw -ofps 15 -oac pcm -vf scale=160:-2,expand=160:128,format=bgr24 in.avi -o out.avi
$ 2bppconv out.avi ipodmovie.avi
Mini
$ mencoder -ovc raw -ofps 15 -oac pcm -vf scale=138:-2,expand=138:110,format=bgr24 in.avi -o out.avi
$ 2bppconv out.avi ipodmovie.avi

Windows

This tutorial assumes that you already have cygwin (http://www.cygwin.com/) installed on Windows. If you are installing on an iPod Photo or Nano, neither 2bppconv nor cygwin is necessary. A simpler guide (for the iPod Photo or nano only) can be found here: Video conversion guide for Windows. A simpler way of doing this with an iPod Nano can be found here: vid4nano package (http://www.iainlearmonth.com/mediawiki/index.php?title=Vid4nano)

  • Download mplayer for Windows (ftp://ftp.kaist.ac.kr/MPlayer/releases/win32/)
  • After unzipping it, put the mplayer folder in C:\cygwin\home\YourName
  • Download 2bppconv (http://so2.sys-techs.com/ipod/2bppconv)
  • Put 2bppconv in the mplayer folder
  • Place the video you are converting in the mplayer folder
  • Launch cygwin and type:
$ cd mplayer
Nano
$ ./mencoder.exe -ovc raw -ofps 15 -oac pcm -vf scale=176:-2,expand=176:132,format=bgr16 filename.here -o out.avi

To do this without cygwin open "Run" and type this in:

"C:\folder\mencoder.exe" -ovc raw -ofps 15 -oac pcm -vf scale=176:-2,expand=176:132,format=bgr16 "Z:\folder\in.avi" -o "Z:\folder\output.avi"
Photo
$ ./mencoder.exe -ovc raw -ofps 15 -oac pcm -vf scale=220:-2,expand=220:176,format=bgr16 filename.here -o out.avi

To do this without cygwin open "Run" and type this in:

"C:\folder\mencoder.exe" -ovc raw -ofps 15 -oac pcm -vf scale=220:-2,expand=220:176,format=bgr16 "Z:\folder\in.avi" -o "Z:\folder\output.avi"
Grayscale iPods

Use the following mencoder command, then run the conversion program on the output of mencoder:

$ ./mencoder.exe -ovc raw -ofps 15 -oac pcm -vf scale=160:-2,expand=160:128,format=bgr24 filename.here -o out.avi
$ ./2bppconv out.avi ipodmovie.avi
Mini
$ ./mencoder.exe -ovc raw -ofps 15 -oac pcm -vf scale=138:-2,expand=138:110,format=bgr24 filename.here -o out.avi
$ ./2bppconv out.avi ipodmovie.avi


  • Replace filename.here with the filename of the video you are converting.
Views
Personal tools