![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Outdated Tutorials & Tips Outdated Tutorials & Tips |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Dipped in Ubuntu
![]() Join Date: Oct 2005
Location: Dallas
Beans: 616
Ubuntu 7.04 Feisty Fawn
|
HowTo: Encode Video for iPod Video
------Last Update------
January 1, 2008: Started the New Year off with minor changes. Modified the installed packages for Gutsy and the FFMPEG SVN configure commands for the latest SVN. ------------------------ After much searching and about a week of on and off again attempts, I finally got video to encode for my iPod Video. So, I thought I'd share with you how. This HowTo is broken up into three sections: Vive Transferring Video to the iPod Video Encoding Video to the iPod Video Vive Vive is the project that stemmed out of this HowTo. It is a GUI for ffmpeg, but has presets already loaded for the iPod (just for you!). Downloads can be found here. Currently, 2.0.0-beta1 is released, or you can use the SVN version. I always make sure that it runs before I commit to the SVN, so that would be the recommended way to go about it. Here's how to install it (you need to install ffmpeg first, so see below for it): Code:
sudo apt-get install vobcopy mplayer libgtk2.0-dev libvte-dev libgnome2-dev libgnomeui-dev Code:
sudo apt-get install libdvdcss2-dev libdvdnav-dev libdvdread-dev Code:
./configure --prefix=/usr make sudo make install Code:
mkdir ~/.vive cp examples/preferences ~/.vive You will need to use gtkpod to transfer your files to your iPod. It's only one command: Code:
sudo apt-get install gtkpod-aac Congratulations, you can now transfer videos to your iPod Video Encoding Video for the iPod Video Dapper Packages!!! SBX has been kind enough to create .deb packages for ffmpeg and Vive for Dapper. You can get them here and install them both with sudo dpkg -i packagename.deb. Thanks so much to SBX for this contribution! In order to encode video for the iPod Video, you need to install ffmpeg from source because it does not come with the support needed for the iPod Video format for a litany of legal reasons concerning the distribution of Ubuntu. Luckily, this is still very legal, and you are not breaking any law in the United States or anywhere else by configuring and installing ffmpeg in this way. This section of the guide is broken into two subsections: 1. Installing ffmpeg 2. ipodvidenc Script The ipodvidenc Script is a simple bash script written by me to make encoding videos for the iPod Video quick and painless. Now, without further interruption, how to encode video for the iPod Video: Installing ffmpeg First, we need to fix ffmpeg for Ubuntu. We'll build it from source...but don't worry, it won't hurt. We'll also need to install some other libraries. So, here goes: Code:
sudo apt-get install liblame-dev libxvidcore4-dev libx264-dev libfaac-dev libfaad2-dev liba52-dev libdc1394-dev libgsm1-dev libtheora-dev libvorbis-dev sudo apt-get build-dep ffmpeg Without x264: Code:
apt-get source ffmpeg cd ffmpeg-*/ ./configure --enable-gpl --enable-pp --enable-vorbis \ --enable-libogg --enable-a52 --enable-dts \ --enable-dc1394 --enable-libgsm --disable-debug --enable-mp3lame \ --enable-faad --enable-faac --enable-xvid --enable-pthreads --enable-shared make sudo make install Code:
sudo apt-get install subversion svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg cd ffmpeg/ ./configure --prefix=/usr --enable-gpl --enable-pp --enable-pthreads --enable-libdc1394 --enable-liba52 --enable-libfaac \ --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis \ --enable-libx264 --enable-libxvid --enable-shared --disable-debug make sudo make install ipodvidenc Script And last, but certainly not least, you can create a script for converting your videos to iPod Video format. Code:
gedit Code:
#!/bin/bash
## ipodvidenc - The iPod Video Encoder for Linux.
## Created by Eric Hewitt, January 9, 2006.
## Released under the GPL. Go nuts.
input_file=$1
echo "What would you like to name the output file (sans extension)?"
read output_file_name
echo "$output_file_name will be located in $PWD. Is this acceptable? [y/n]"
read output_file_loc_permis
if [ $output_file_loc_permis = 'n' ] || [ $output_file_loc_permis = 'N' ]
then
echo "Where would you like to store $output_file_name.mov?"
read output_dir
else
output_dir=$PWD
fi
ffmpeg -i "${input_file}" -f mp4 -vcodec mpeg4 -maxrate 1000k -b 700k -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab 192 -s 320x240 -aspect 4:3 "${output_dir}/${output_file_name}.mov"
Code:
chmod 755 ipodvidenc sudo mv ipodvidenc /usr/bin Code:
ipodvidenc video.avi *Note: You can now use ipodvidenc to encode straight from a *.vob file. This way, you can rip your DVDs using dvd::rip, and then simply encode them by passing them through ipodvidenc. Make sure that you compile ffmpeg with a52 support in order to do this, though. This is a very basic script if you do not want the much larger and GUI version of ipodvidenc which can be found attached. Fixing Video for the 60GB iPod v1.1 Firmware In the new firmware for the 60GB iPods, video will play for 15 seconds, stop, and then continue without audio. If this happens to you, you need to install gpac, like this: Code:
sudo apt-get install gpac Code:
MP4Box -add videofile.mov videofile.mov Happy encoding! Credits: Original Sources:
Much thanks to:
__________________
Need help? Look here first: Ubuntu Forums Search | Ubuntu Wiki | Ubuntu Document Storage Facility
My HowTos: Video for the iPod Video | Connect to a Microsoft PPTP VPN | Vive - Vive Is Video Encoding | Last edited by endersshadow; January 1st, 2008 at 04:23 AM.. |
|
|
|
|
|
#2 |
|
Dipped in Ubuntu
![]() Join Date: Oct 2005
Location: Dallas
Beans: 616
Ubuntu 7.04 Feisty Fawn
|
Re: HowTo: Encode Video for iPod Video
Update: Now on the Wiki
I've decided to make this post the Change Log, so here it is: ------------------------ Updated: January 1, 2008: Started the New Year off with minor changes. Modified the installed packages for Gutsy and the FFMPEG SVN configure commands for the latest SVN. Updated: July 20, 2007: Huge news! Vive 2.0.0 has finally been released! Download it here! Also, an Ubuntu Feisty package has been added. I suggest that you use the Medibuntu repository to meet the dependencies, as the Ubuntu package is compiled to allow DVD usage. Enjoy! Updated: July 11, 2007: Vive 2.0.0-beta2 is now available! New features include multiple file and folder support, a simplified and streamlined interface, and a lot of behind the scenes stuff that makes me sleep better at night but you won't notice unless you look at the code. So download it today! Updated: June 1, 2007: Fixed some legacy issues with the bitrate handling of ffmpeg (used to be in kb/s, now in b/s) for the script and ipodvidenc, which is now v1.6. Updated: April 20th, 2007: Major update for Feisty & Edgy - MUCH EASIER!!! Updated: December 12th, 2006: ffmpeg configure altered to support H.264 format. Updated: November 7th, 2006: Post updated with tweaks so that it will work on Edgy. Updated: October 2nd, 2006: Released Vive 1.0.2 as a bug-fix release. You can find it on Sourceforge. Updated: September 20th, 2006: Released Vive 1.0.1 to fix the configure script. Updated: September 18th, 2006: Released Vive 1.0.0. Check it out at http://vive.sourceforge.net! Note: It will detect a previous version of Vive and update it accordingly without deleting any of your previously saved preferences! Updated: June 4th, 2006: Released Vive 0.3 Beta 2 Release. Check it out at http://vive.sourceforge.net! Note: It will detect a previous version of Vive and update it accordingly without deleting any of your previously saved preferences! Updated: May 21st, 2006: Added error correction for mpeg4ip thanks to Sir_Yaro. Also added the shameless self promotion of Vive. Updated: April 30th, 2006: Okay, I know that it's been a while, but here are some updates. First, SBX gave us Dapper packages of Vive and ffmpeg. Go SBX. Second, I found out that the XML Perl Parser is in the repos...I'm an idiot...so I included it. Third, I added how to remux videos for the 60GB iPod v1.1 Firmware, and much thanks to hal pacino for that. I haven't forgotten about Vive...I'm just really busy, but it's almost ready for 0.3 to be unleashed...I went back and rewrote most of the code to make it a bit better. Updated: March 23rd, 2006: I've released Vive 0.2 (Beta Release), and have attached a screenshot of the main window and the preferences window! Updated: February 27th, 2006: I've released Vive, and have attached a screenshot! Updated: February 10th, 2006: Updated install script and HowTo to correct libgpod installation issues, as well as added to the HowTo and the Wiki the same information. Updated: January 26th, 2006: Updated iPod Video Encoder to version 1.5 to include OGM support as requested here. Updated: January 25th, 2006: Updated iPod Video Encoder to version 1.4. There are so many new features, that I'm just including the full change log: NEW: Added default videos directory option. NEW: Added CLI interface. NEW: Added support for standard size AVI encoding. NEW: Added support for standard size MPEG encoding. NEW: Added a preview feature. NEW: Added help file. (Access via ipodvidenc -h). IMPROVED: Condensed the installation to one script that automatically detects your previous level of installation. IMPROVED: Uninstall script updated. BUG FIX: Inability to remove original files with spaces in the name bug fixed. BUG FIX: Overwriting existing files bug fixed. Updated: January 24th, 2006: Updated iPod Video Encoder to version 1.3 to fix a couple of bugs and add a new feature, options, to cut down on the number of dialogs in the ripping and encoding process. Updated: January 23rd, 2006: Updated iPod Video Encoder and HowTo to correct some ffmpeg configuration errors. Also added some features/improvements and bug fixes to iPod Video Encoder. See attached README file for a detailed list of changes to iPod Video Encoder Updated: January 17th, 2006: Updated HowTo and iPod Video Encoder (to v1.1) to use dpkg-buildpackage to build ffmpeg. Much thanks to pestilence4hr, who brought this to my attention! Updated: January 16th, 2006: Added iPod Video Encoder (ipodvidenc), the GUI to make iPod Videos. Updated: January 14th, 2006: Added .deb package for mpeg4ip and updated format of the HowTo as well as the Sources. Also editted the title. Updated: January 13th, 2006: Added support for encoding vob files, and ipodvidenc script modified slightly for optimization. Also corrected the commands to install mpeg4ip. Updated: January 12th, 2006: Corrected commands associated with compiling and installing mpeg4ip. ------------------------
__________________
Need help? Look here first: Ubuntu Forums Search | Ubuntu Wiki | Ubuntu Document Storage Facility
My HowTos: Video for the iPod Video | Connect to a Microsoft PPTP VPN | Vive - Vive Is Video Encoding | Last edited by endersshadow; January 1st, 2008 at 04:23 AM.. |
|
|
|
|
|
#3 |
|
Fresh Brewed Ubuntu
![]() Join Date: Sep 2005
Location: Bellingham, WA
Beans: 1,532
Ubuntu Jaunty Jackalope (testing)
|
Re: HowTo: Encode Video for iPod Video
Good guide. I'll do it someday, when I get a 5th generation iPod. Until then, I'll adapt it to my *cough* encoding needs.
__________________
This space intentionally left blank. Last edited by Iandefor; January 14th, 2006 at 11:47 PM.. |
|
|
|
|
|
#4 |
|
5 Cups of Ubuntu
![]() |
Re: HowTo: Encode Video for iPod Video
Thanks for this howto that i've aked for!!!
You're great!! |
|
|
|
|
|
#5 |
|
Dipped in Ubuntu
![]() Join Date: Oct 2005
Location: Dallas
Beans: 616
Ubuntu 7.04 Feisty Fawn
|
Re: HowTo: Encode Video for iPod Video
Quite welcome...and trust me, I'm not that great...just a guy who was determined to get his iPod Video to work on Ubuntu
![]()
__________________
Need help? Look here first: Ubuntu Forums Search | Ubuntu Wiki | Ubuntu Document Storage Facility
My HowTos: Video for the iPod Video | Connect to a Microsoft PPTP VPN | Vive - Vive Is Video Encoding | |
|
|
|
|
|
#6 |
|
Just Give Me the Beans!
![]() Join Date: Mar 2005
Beans: 59
|
Re: HowTo: Encode Video for iPod Video
Thanks for the tutorial. I'm having some trouble getting the dependencies installed.
sudo apt-get install libfaad2-dev libfaac-dev libxvidcore4-dev checkinstall fakeroot Reading package lists... Done Building dependency tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libxvidcore4-dev: Depends: libxvidcore4 (= 2:1.0.3-0.0) but 2:1.1.0-beta1-0.0 is to be installed E: Broken packages I don't think I've done anything to get a special version of libxvidcore4, but I suppose it is possible. Do you have any suggestions on how to fix this? |
|
|
|
|
|
#7 |
|
Just Give Me the Beans!
![]() Join Date: Mar 2005
Beans: 59
|
Re: HowTo: Encode Video for iPod Video
I got synaptic to pin the older version of libxvidcore4, so I'm ok with that now.
But now I'm getting confused while compiling and installing mpeg4ip. It looks to me like Code:
cp mpeg4ip_config.h mpeg4ip_version.h /usr/local/include cp include/mpeg4ip.h /usr/local/include Code:
sudo cp mpeg4ip_config.h /usr/local/include sudo cp include/mpeg4ip.h include/mpeg4ip_version.h /usr/local/include Then, you edit the makefile for the lib/mp4v2 subfolder. Do you compile within that subfolder, or go back to the root folder to compile everything? When it asks for a package name, it's suggesting mp4v2, which seems a far cry from mpeg4ip. |
|
|
|
|
|
#8 |
|
Dipped in Ubuntu
![]() Join Date: Oct 2005
Location: Dallas
Beans: 616
Ubuntu 7.04 Feisty Fawn
|
Re: HowTo: Encode Video for iPod Video
All apologies...you're right, it does need to be sudo.
And you need to do the configure, make, and install from the main mpeg4ip directory. I'll update the HowTo. I apologize...as I said, it was a long time of me trying different things, and then finally getting to work, and then I had to sort through my .bash_history file to get all the correct commands...sorry for that!
__________________
Need help? Look here first: Ubuntu Forums Search | Ubuntu Wiki | Ubuntu Document Storage Facility
My HowTos: Video for the iPod Video | Connect to a Microsoft PPTP VPN | Vive - Vive Is Video Encoding | |
|
|
|
|
|
#9 |
|
A Carafe of Ubuntu
![]() Join Date: Oct 2005
Location: Edmonton
Beans: 92
Kubuntu 8.10 Intrepid Ibex
|
Re: HowTo: Encode Video for iPod Video
just a note, the deb that SBX created is missing the following dependencies:
- libglib-perl - libgtk2-perl There may be others missing, but these two were the only packages that i noticed.
__________________
The goggles... they do nothing! |
|
|
|
|
|
#10 |
|
Just Give Me the Beans!
![]() Join Date: Mar 2005
Beans: 59
|
Re: HowTo: Encode Video for iPod Video
No need to apologize, I understand how hard this must have been to get together.
As a stickler, here's a couple of corrections: Code:
sudo cp mpeg4ip_config.h mpeg4ip_version.h /usr/local/include sudo cp include/mpeg4ip.h /usr/local/include Code:
sudo cp mpeg4ip_config.h /usr/local/include sudo cp include/mpeg4ip.h include/mpeg4ip_version.h /usr/local/include Code:
cd ../ make sudo checkinstall -D make install Code:
cd ../.. make sudo checkinstall -D make install |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|