Monday, July 11, 2011

Watching videos on the iPad without iTunes

I bought an iPad when they came out and while it is a nice device it is crippled since you need to use iTunes for syncing. Having a wireless device which you have to connect to something else than a charger defeats the purpose.

However, since the iPad browser supports HTML5 it supports video and it is just a matter of getting the videos into the browser. Also, since the browser only supports H264 video and AAC audio you will need to do regular encoding jobs, as you might have videos with unsupported formats.



Step-by-step instruction


1. Install linux:)


2. Install the apache web server.

Run: 'sudo apt-get install apache2'

and surf to http://127.0.0.1 to see if it is up and running


3. Install the libx264 codec, the iPad will only playback videos with a h264 video stream and AAC audio stream.
http://ubuntuforums.org/showthread.php?t=786095


4. Install ffmpeg, for encoding videos

Run: 'sudo apt-get install ffmpeg'


5. Download my video scripts with:

git clone git://github.com/dkarlss/video-scripts.git

and put them in you bin directory: e.g. /home/username/bin


6. set up a user cronjob (which uses the previous referenced scripts) to encode videos

Run ' crontab -e' and add the line

0 0 * * * /home/testuser/bin/encode_all /home/testuser >> /tmp/testuser_encode_all.log 2>&1

and change testuser to your user name (or to a path were you videos are).

Video encoding will start at 00:00.


7. Set up a root cronjob to create links to all the videos (so that the web-server can reference them) and build a web page.

Run ' sudo crontab -e' and add the line

0 5 * * * /home/testuser/bin/build_video_web /home/testuser /home/testuser/bin >> /var/log/testuser_build_video_web.log 2>&1

and change testuser to your username (or to a path where your videos and bins are).

The webpage will be built at 5 in the morning since the video encoding
should be done by then.


8. You are done, just surf to you web server and watch your movies on the iPad.




No comments:

Post a Comment