First, follow these instructions:
http://korenkov.info/ipad-ipad2-charge-ubuntu
For later versions of udev (I tested this on Ubuntu 11.04), make sure that /etc/udev/rules.d/95-ipad_charge.rules looks like the following examples.
For iPad:
ENV{DEVTYPE}=="usb_device", ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="129a", RUN+="/usr/bin/ipad_charge"
For iPad2:
ENV{DEVTYPE}=="usb_device", ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="129f", RUN+="/usr/bin/ipad_charge"
Then restart udev or reboot.
This is a repository of all of my Linux/Unix writings as well as useful tips and tricks for systems administration, engineering, and programming.
Showing posts with label iPad 2. Show all posts
Showing posts with label iPad 2. Show all posts
Sunday, October 9, 2011
Monday, July 11, 2011
Convert videos to iPad 2 format
Recorded programs on my MythTV are in a lossless HD mpg format, which doesn't play well on my iPad2 using AirVideo Server over wlan (via wine). So, instead of having AirVideo Server converting it through the wine abstraction layer (which requires more CPU/memory, and uses ffmpeg.exe anyway), I just run this user job from my MythTV server to convert the files that I care to watch on my iPad.
Step 1:
Create this file which I call /usr/bin/mythconverttoipad. If you have an issue with "too may threads," remove -threads 16. I am using this script on a 3 core machine, the -threads option speeds things up a bit.
#!/bin/bash
DIR=$1
FILE=$2
echo $DIR
echo $FILE
ffmpeg -y -i $DIR/$FILE -ab 320kb -vcodec libx264 -b 3200kb -s 1280x720 -threads 16 $DIR/$FILE.m4v
Step 2:
Make the script executable.
chmod +x /usr/bin/mythconverttoipad
Step 3:
Add script as user job within MythTV.
Within mythtv-setup add the following user job:
/usr/bin/mythconverttoipad %DIR% %FILE%
Step 4:
Enable it within rules.
Within a program recording rule (within mythfrontent), enable this user job to be run post-recording.
Step 5:
Access the files from Air Video client or other player.
If you have questions, please comment.
Step 1:
Create this file which I call /usr/bin/mythconverttoipad. If you have an issue with "too may threads," remove -threads 16. I am using this script on a 3 core machine, the -threads option speeds things up a bit.
#!/bin/bash
DIR=$1
FILE=$2
echo $DIR
echo $FILE
ffmpeg -y -i $DIR/$FILE -ab 320kb -vcodec libx264 -b 3200kb -s 1280x720 -threads 16 $DIR/$FILE.m4v
Step 2:
Make the script executable.
chmod +x /usr/bin/mythconverttoipad
Step 3:
Add script as user job within MythTV.
Within mythtv-setup add the following user job:
/usr/bin/mythconverttoipad %DIR% %FILE%
Step 4:
Enable it within rules.
Within a program recording rule (within mythfrontent), enable this user job to be run post-recording.
Step 5:
Access the files from Air Video client or other player.
If you have questions, please comment.
Subscribe to:
Posts (Atom)