1 |
On Sun, 30 Oct 2005 14:00:23 +1300 |
2 |
Nick Rout wrote: |
3 |
|
4 |
> yes i was reading a threa on the knoppmythwiki last night. I suggest you read there. |
5 |
> |
6 |
|
7 |
ooops wrong reference, it was on the knoppmyth forums, specifically |
8 |
here: |
9 |
|
10 |
http://mysettopbox.tv/phpBB2/viewtopic.php?t=6467&postdays=0&postorder=asc&highlight=ipod&start=15 |
11 |
|
12 |
basically the author suggests a two pass use of ffmpeg: |
13 |
|
14 |
# mpg2ipod |
15 |
# quick script to transcode to an 5G iPod compatible video file |
16 |
# requires recompiling of ffmpeg with xvid, and facc enabled |
17 |
# you can tweak any of the crop, bitrate, etc. |
18 |
# video size has worked for me up to 480x352 |
19 |
# this does a 2nd pass because it decreases file size greatly |
20 |
# remove this pass to speed things up |
21 |
# this was a quick hack, but is works for now |
22 |
|
23 |
for file in $* |
24 |
do |
25 |
/usr/local/bin/ffmpeg -i $file -cropleft 4 -cropright 10 -deinterlace -vcodec xvid -s 320x240 -r 29.97 -b 384 -qmax 5 -bufsize 4096 -acodec aac -ab 96 -g 300 -pass 1 -passlogfile mpg2ipod_log -f mov $file.pass1.mov |
26 |
/usr/local/bin/ffmpeg -i $file -cropleft 4 -cropright 10 -deinterlace -vcodec xvid -s 320x240 -r 29.97 -b 384 -qmax 5 -bufsize 4096 -acodec aac -ab 96 -g 300 -pass 2 -passlogfile mpg2ipod_log -f mov $file.ipod.mov |
27 |
rm -f $file.pass1.mov |
28 |
rm -f mpg2ipod_log* |
29 |
done |
30 |
|
31 |
|
32 |
basically the video codec can be xvid ox x.264, the audio codec is aac, |
33 |
the container format is .m4v, .mp4 or .mov by the looks of it. The other specs are in that thread. I do suggest you read the whole thread, as it |
34 |
also sets up an RSS service for itunes (so you can just grab new videos |
35 |
for the ipod) and the transcoding operations amy have been tweaked (the |
36 |
above was the guy's first try, and may have been changed in his later |
37 |
posts) |
38 |
|
39 |
I downloaded a movie made for ipod last night and it played in ffplay, |
40 |
so i am guessing that I have ffmpeg compiled with the right options. |
41 |
(Not that I have an ipod, I am just nterested in multimedia and |
42 |
trancoding) |
43 |
|
44 |
My ffmpeg use flags are below. I think aac and xvid are the ones that |
45 |
are really needed here. |
46 |
|
47 |
nick@sf ~ $ equery uses ffmpeg |
48 |
[ Searching for packages matching ffmpeg... ] |
49 |
[ Colour Code : set unset ] |
50 |
[ Legend : Left column (U) - USE flags from make.conf ] |
51 |
[ : Right column (I) - USE flags packages was installed with ] |
52 |
[ Found these USE variables for media-video/ffmpeg-0.4.9_p20050226-r5 ] |
53 |
U I |
54 |
+ + aac : Enables support for MPEG-4 AAC Audio |
55 |
- - altivec : Adds support for optimizations for G4 and G5/ppc970 processors |
56 |
- - debug : Tells configure and the makefiles to build for debugging. Effects vary across packages, but generally it will at least add -g to CFLAGS. Remember to set FEATURES=nostrip too |
57 |
+ + doc : Adds extra documentation (API, Javadoc, etc) |
58 |
+ + ieee1394 : Enable FireWire/iLink IEEE1394 support (dv, camera, ...) |
59 |
+ + a52 : Enables support for decoding ATSC A/52 streams used in DVD |
60 |
+ + encode : Adds support for encoding of audio or video files |
61 |
+ + imlib : Adds support for media-libs/imlib (Image loading and rendering library) |
62 |
+ + mmx : Adds support for optimizations for Pentium MMX and Athlon class processors |
63 |
+ + ogg : Adds support for the Ogg container format (commonly used by Vorbis, Theora and flac) |
64 |
+ + vorbis : Adds support for the OggVorbis audio codec |
65 |
+ + oss : Adds support for OSS (Open Sound System) |
66 |
- - threads : Adds threads support for various packages. Usually pthreads |
67 |
+ + truetype : Adds support for FreeType and/or FreeType2 fonts |
68 |
+ + v4l : Enables video4linux support |
69 |
+ + xvid : Adds support for xvid.org's open-source mpeg-4 codec |
70 |
+ + dts : Enables libdts (DTS Coherent Acoustics decoder) support |
71 |
+ + network : Enables network streaming support |
72 |
+ + zlib : Adds support for zlib (de)compression |
73 |
+ + sdl : Adds support for Simple Direct Layer (media library) |
74 |
|
75 |
-- |
76 |
Nick Rout <nick@×××××××.nz> |
77 |
|
78 |
-- |
79 |
gentoo-user@g.o mailing list |