Author |
Message |
insaner
|
Posted: Tue Nov 22, 2005 8:40 pm |
|
Joined: Tue Dec 07, 2004 11:04 pm
Posts: 23
|
I found this article and thought it might be of some value:
http://www.ilounge.com/index.php/articl ... solutions/
Quote: Apple publicly says that the iPod has the following video limitations:
H.264 MPEG-4 Maximum Resolution 320x240 480x480 Maximum Bitrate 768 kbps 2500 kbps Maximum Framerate 30 fps 30 fps
However, the company has actually simplified the iPod’s real limitations to make them easier for people to understand. Many users have discovered that while the bitrate limits above appear to be absolute, the resolutions are not. Rather, they observed that the equivalent number of total pixels appeared to be the practical limit for both H.264 and MPEG-4 - 76,800 and 230,400, respectively. Like Apple’s own numbers, these pixel limits are useful and simple ways to make sure your files run properly, but these numbers are not technically correct, either.
Rather, the correct limit can be stated as follows:
For H.264, you’re allowed 300 square blocks of pixels (called “macroblocks"), 16 pixels on a side. For MPEG-4, you’re allowed 900.
The widely-published “total pixel limits” for H.264 and MPEG-4 will indeed work in most cases, but not always, and macroblocks yield the right numbers. For example, an MPEG-4 video of dimensions 725 x 315 has less than 230,400 pixels, but 920 macroblocks. Such a file would be incompatible with the iPod.
For reference, here are a few resolutions that satisfy the maximum macroblock limits at various video aspect ratios:
H.264 480x160 432x176 400x192 368x208 336x224 320x240 288x256 272x272
MPEG-4 784x288 752x304 720x320 672x336 640x352 624x368 592x384 576x400 480x480
|
|
Top |
|
 |
solarisdreams
|
Posted: Wed Nov 23, 2005 1:38 am |
|
Joined: Wed Nov 23, 2005 1:24 am
Posts: 3
|
...and now I have myth2ipod working.
Now I'm regretting it because I have over 80 shows I need to encode. That will mean I need a new machine!
Anyways, I'll get to my question. How can I had a recording profile all automatically run the ipod encoding user job? So far I've been manually going through the frontend/tv gui and selecting each episode i want to encode. For example, it would be nice if I could record all episodes of The Simpsons, auto flag/skip commercials, then auto encode for ipod podcast downloads. Is that possible with this version of myth2ipod?
btw, GREAT JOB GUYS!!!
|
|
Top |
|
 |
rteichman
|
Posted: Wed Nov 23, 2005 9:37 am |
|
Joined: Wed Feb 02, 2005 4:07 pm
Posts: 141
|
solarisdreams wrote: ... For example, it would be nice if I could record all episodes of The Simpsons, auto flag/skip commercials, then auto encode for ipod podcast downloads. Is that possible with this version of myth2ipod? btw, GREAT JOB GUYS!!!
Simple, after you select and item to record, you can set a post processing option to call the user jobs you want. For example, after selecting Simpsons to record (every show on every channel <g>), select post processing option and tell it to run you user job
|
|
Top |
|
 |
solarisdreams
|
Posted: Wed Nov 23, 2005 9:53 am |
|
Joined: Wed Nov 23, 2005 1:24 am
Posts: 3
|
Can I only do this through the tv gui?
|
|
Top |
|
 |
solarisdreams
|
Posted: Wed Nov 23, 2005 10:05 am |
|
Joined: Wed Nov 23, 2005 1:24 am
Posts: 3
|
Does anybody know why I get this error message?
Code: Starting pass 1 of 2... /usr/local/bin/ffmpeg -i /300gb/tv/1010_20051009230000_20051010000000.nuv -comment '1010_20051009230000_20051010000000.nuv' -title 'Nova' -author 'MythTV - myth2ipod' -timestamp 'Wed Nov 23 07:34:32 PST 2005 ' -y -cropleft 10 -cropright 10 -croptop 8 -cropbottom 8 -deinterlace -vcodec xvid -s 320x240 -r 29.97 -b 384 -qmin 2 -qmax 5 -bufsize 4096 -acodec aac -ab 96 -g 300 -pass 1 -passlogfile /tmp/myth2ipod_log -f mov /var/www/ipodfeed/'Nova-The_Elegant_Universe:_String's_the_Thing-20051009'.pass1 sh: -c: line 1: unexpected EOF while looking for matching `'' sh: -c: line 2: syntax error: unexpected end of file Pass one failed Pass 1 competed, starting pass 2 of 2... /usr/local/bin/ffmpeg -i /300gb/tv/1010_20051009230000_20051010000000.nuv -comment '1010_20051009230000_20051010000000.nuv' -title 'Nova' -author 'MythTV - myth2ipod' -timestamp 'Wed Nov 23 07:34:32 PST 2005 ' -y -cropleft 10 -cropright 10 -croptop 8 -cropbottom 8 -deinterlace -vcodec xvid -s 320x240 -r 29.97 -b 384 -qmin 2 -qmax 5 -bufsize 4096 -acodec aac -ab 96 -g 300 -pass 2 -passlogfile /tmp/myth2ipod_log -f mov /var/www/ipodfeed/'Nova-The_Elegant_Universe:_String's_the_Thing-20051009'.pass2 sh: -c: line 1: unexpected EOF while looking for matching `'' sh: -c: line 2: syntax error: unexpected end of file Pass two failed Pass 2 competed, building video XML file "Nova-The_Elegant_Universe:_String's_the_Thing-20051009" has been added to the feed. XML file created for "Nova-The_Elegant_Universe:_String's_the_Thing-20051009" : Cleaning up temporary files mv -f /var/www/ipodfeed/'Nova-The_Elegant_Universe:_String's_the_Thing-20051009'.pass2 /var/www/ipodfeed/'Nova-The_Elegant_Universe:_String's_the_Thing-20051009'.ipod.mov mv: missing file argument Try `mv --help' for more information. Moving pass2 to final .mov failed rm -f /tmp/myth2ipod_log* rm -f /var/www/ipodfeed/'Nova-The_Elegant_Universe:_String's_the_Thing-20051009'.pass1 sh: -c: line 0: unexpected EOF while looking for matching `'' sh: -c: line 1: syntax error: unexpected end of file Removing pass 1 file failed Nova is ready for your ipod
It simply fails on this one and goes onto the next job....
|
|
Top |
|
 |
cryoforever
|
Posted: Wed Nov 23, 2005 10:18 am |
|
Joined: Mon Nov 21, 2005 7:20 pm
Posts: 2
|
I think it might be the apostophe in the name.I am having a heck of a time with them.
|
|
Top |
|
 |
pucky
|
Posted: Sat Nov 26, 2005 2:08 pm |
|
Joined: Sat Nov 26, 2005 2:02 pm
Posts: 3
|
I'm on fedora core 4 with a pvr150 running the script works if I change aac to mp3 but I get no audio. If I try with acc I get the following, can anyone help? I know I'm missing something. but what? I've got faac-1.24-1.2.fc4
faac-devel-1.24-1.2.fc4 installed.
Code: myth2ipod /video/recordings/ 1054_20051126033000_20051126040000.nuv Starting pass 1 of 2... /usr/bin/ffmpeg -i /video/recordings//1054_20051126033000_20051126040000.nuv -comment '1054_20051126033000_20051126040000.nuv' -title 'The Berenstain Bears' -author 'MythTV - myth2ipod' -timestamp 'Sat Nov 26 10:55:17 PST 2005 ' -y -cropleft 10 -cropright 10 -croptop 8 -cropbottom 8 -deinterlace -vcodec xvid -s 320x240 -r 29.97 -b 384 -qmin 2 -qmax 5 -bufsize 4096 -acodec aac -ab 96 -g 300 -pass 1 -passlogfile /tmp/myth2ipod_log -f mov /myth/ipod/'The_Berenstain_Bears-Attic_Treasure;_Moving_Day-20051126'.pass1 ffmpeg version 0.4.9-pre1, build 4756, Copyright (c) 2000-2004 Fabrice Bellard configuration: --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --enable-mp3lame --enable-vorbis --enable-faadbin --disable-faac --enable-xvid --enable-a52bin --disable-dts --enable-pp --enable-shared-pp --enable-shared --disable-amr_nb --disable-amr_nb-fixed --disable-amr_wb --disable-sunmlib --enable-pthreads --enable-dc1394 --enable-gpl --disable-strip --extra-cflags=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables make built on Jun 13 2005 10:05:53, gcc: 4.0.0 20050519 (Red Hat 4.0.0-8) Input #0, mpeg, from '/video/recordings//1054_20051126033000_20051126040000.nuv': Duration: 00:29:56.4, start: 0.333822, bitrate: 4990 kb/s Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 29.97 fps, 6000 kb/s Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 192 kb/s Unknown codec 'aac' Pass one failed Pass 1 competed, starting pass 2 of 2... /usr/bin/ffmpeg -i /video/recordings//1054_20051126033000_20051126040000.nuv -comment '1054_20051126033000_20051126040000.nuv' -title 'The Berenstain Bears' -author 'MythTV - myth2ipod' -timestamp 'Sat Nov 26 10:55:17 PST 2005 ' -y -cropleft 10 -cropright 10 -croptop 8 -cropbottom 8 -deinterlace -vcodec xvid -s 320x240 -r 29.97 -b 384 -qmin 2 -qmax 5 -bufsize 4096 -acodec aac -ab 96 -g 300 -pass 2 -passlogfile /tmp/myth2ipod_log -f mov /myth/ipod/'The_Berenstain_Bears-Attic_Treasure;_Moving_Day-20051126'.pass2 ffmpeg version 0.4.9-pre1, build 4756, Copyright (c) 2000-2004 Fabrice Bellard configuration: --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --enable-mp3lame --enable-vorbis --enable-faadbin --disable-faac --enable-xvid --enable-a52bin --disable-dts --enable-pp --enable-shared-pp --enable-shared --disable-amr_nb --disable-amr_nb-fixed --disable-amr_wb --disable-sunmlib --enable-pthreads --enable-dc1394 --enable-gpl --disable-strip --extra-cflags=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables make built on Jun 13 2005 10:05:53, gcc: 4.0.0 20050519 (Red Hat 4.0.0-8) Input #0, mpeg, from '/video/recordings//1054_20051126033000_20051126040000.nuv': Duration: 00:29:56.4, start: 0.333822, bitrate: 4990 kb/s Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 29.97 fps, 6000 kb/s Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 192 kb/s Unknown codec 'aac' Pass two failed Pass 2 competed, building video XML file "The_Berenstain_Bears-Attic_Treasure;_Moving_Day-20051126" has been added to the feed. XML file created for "The_Berenstain_Bears-Attic_Treasure;_Moving_Day-20051126" : Cleaning up temporary files mv -f /myth/ipod/'The_Berenstain_Bears-Attic_Treasure;_Moving_Day-20051126'.pass2 /myth/ipod/'The_Berenstain_Bears-Attic_Treasure;_Moving_Day-20051126'.ipod.mov mv: cannot stat `/myth/ipod/The_Berenstain_Bears-Attic_Treasure;_Moving_Day-20051126.pass2': No such file or directory Moving pass2 to final .mov failed rm -f /tmp/myth2ipod_log* rm -f /myth/ipod/'The_Berenstain_Bears-Attic_Treasure;_Moving_Day-20051126'.pass1 The Berenstain Bears is ready for your ipod [/code]
|
|
Top |
|
 |
steff
|
Posted: Sat Nov 26, 2005 2:14 pm |
|
Joined: Wed Nov 02, 2005 3:47 am
Posts: 10
|
You are missing step #1 in the install instructions.
|
|
Top |
|
 |
pucky
|
Posted: Sat Nov 26, 2005 2:42 pm |
|
Joined: Sat Nov 26, 2005 2:02 pm
Posts: 3
|
I did step one I've done it 5 times. Could it be that since I've installed via atrpms repo for mythtv that it's ffmpeg is getting in the way.
|
|
Top |
|
 |
pucky
|
Posted: Sat Nov 26, 2005 6:05 pm |
|
Joined: Sat Nov 26, 2005 2:02 pm
Posts: 3
|
I ended up moving the ffmpeg files from /usr/bin that were install via the rpms at atrpms.net. then ln -s /usr/local/bin/ffmpeg /usr/bin/ffmpeg. it works now.
|
|
Top |
|
 |
jstripli
|
Posted: Sun Nov 27, 2005 12:01 am |
|
Joined: Sat Nov 26, 2005 11:51 pm
Posts: 1
|
I am having trouble compiling ffmpeg. I installed the faac libraries however I think I may still be missing something. I am getting compile errors such as:
Code: mjpeg.c: In function ‘mjpeg_decode_com’: mjpeg.c:1746: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness mjpeg.c:1746: warning: pointer targets in passing argument 1 of ‘__builtin_strcmp’ differ in signedness mjpeg.c:1746: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
Has anyone seen this?
|
|
Top |
|
 |
wififun
|
Posted: Wed Nov 30, 2005 5:14 pm |
|
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location:
Ontario, CA
|
yea there is still some work to be done to rid the titles of bad characters. There is also another problem which has kept me from updating anything. I need to get the script changed to myth2portable. The use of iPod, seems to have raised some unwanted eyebrows. I will get the changes and updates posted to the site very soon, and this should work out the other characters that are causing these failures.
|
|
Top |
|
 |
rteichman
|
Posted: Thu Dec 01, 2005 10:37 am |
|
Joined: Wed Feb 02, 2005 4:07 pm
Posts: 141
|
wififun wrote: The use of iPod, seems to have raised some unwanted eyebrows.
That's a cryptic message? What sort of "eyebrows"? Also is there any way to set it up so in converting for ipod it also removes commercials? I know I could transcode, and then use nuv2export, but I don't want to reduce the quality of the stuff I watch on TV and the transcode does that.
|
|
Top |
|
 |
steff
|
Posted: Fri Dec 02, 2005 10:55 am |
|
Joined: Wed Nov 02, 2005 3:47 am
Posts: 10
|
Just in case someone might be interested - I`ve patched the script to use nuvexport instead, and I`ve been running it just fine for the last couple of weeks. It works great for me.
Mind you, this is just a hack of wififun´s code, and I don´t really do perl, but it works, so don´t shoot me for not doing it properly.
myth2portable.patch:
Code: --- myth2ipod.txt 2005-11-04 20:04:01.000000000 +0100 +++ myth2ipod_modified.txt 2006-01-02 16:23:46.936914328 +0100 @@ -3,6 +3,7 @@ # Get the latest version, and change log at myth2ipod.com # Author: Chris aka Wififun - email: wififun@myth2ipod.com # Contributions and testing by Paul Egli +# modified to use nuvexport by starv at juniks dot org # Includes use DBI; @@ -16,10 +17,6 @@ my $wwwloc = "/var/www/"; my $feedurl = "http://www.yourhostnamehere.com/ipodfeed/"; - # Ecoder settings, may be modified to support other devices - # 5G iPod with Video compatable settings. MPEG4/XVID AAC audio - my $encodeopt = "-y -cropleft 10 -cropright 10 -croptop 8 -cropbottom 8 -deinterlace -vcodec xvid -s 320x240 -r 29.97 -b 384 -qmin 2 -qmax 5 -bufsize 4096 -acodec aac -ab 96 -g 300"; - # Some variables our ($dest, $format, $usage); our ($db_host, $db_user, $db_name, $db_pass, $video_dir); @@ -107,45 +104,22 @@ $filename = $title."-".$subtitle."-".substr $start, 0, 8; $filename =~ s/ /_/g; - printf("Starting pass 1 of 2...\n"); - DoPassOne(); - printf("Pass 1 competed, starting pass 2 of 2...\n"); - DoPassTwo(); - printf("Pass 2 competed, building video XML file\n"); + printf("Starting nuvexport...\n"); + EncodeIt(); + printf("Nuvexport completed, starting xml generation...\n"); CreateItemXML(); - printf("XML file created for \"$filename\" : Cleaning up temporary files\n"); - $cmd = "mv -f $feedpath'$filename'.pass2 $feedpath'$filename'.$portable.mov"; - print $cmd."\n"; - if(system($cmd)) { print "Moving pass2 to final .mov failed\n"; } - - $cmd = "rm -f /tmp/myth2ipod_log*"; - print $cmd."\n"; - if(system($cmd)) { print "Removing pass 1 file failed\n"; } - - $cmd = "rm -f $feedpath'$filename'.pass1"; - print $cmd."\n"; - if(system($cmd)) { print "Removing pass 1 file failed\n"; } + printf("XML file created for \"$filename\" : Yipeee\n"); return 0; } # -# Encode for Portable Pass 1 -# -sub DoPassOne { - $cmd = "/usr/local/bin/ffmpeg -i $directory/$file -comment '$file' -title '$title' -author 'MythTV - myth2ipod' -timestamp '$rightnow' $encodeopt -pass 1 -passlogfile /tmp/myth2ipod_log -f mov $feedpath'$filename'.pass1"; - print $cmd."\n"; - if(system($cmd)) { print "Pass one failed\n"; } - return 0; -} - -# -# Encode for Portable Pass 2 +# Encode for Portable # -sub DoPassTwo { - $cmd = "/usr/local/bin/ffmpeg -i $directory/$file -comment '$file' -title '$title' -author 'MythTV - myth2ipod' -timestamp '$rightnow' $encodeopt -pass 2 -passlogfile /tmp/myth2ipod_log -f mov $feedpath'$filename'.pass2"; +sub EncodeIt { + $cmd = "/usr/bin/nuvexport --chanid=$chanid --start=$start --mode=iPod --denoise --filename=$chanid.$start.$portable --path=$feedpath"; print $cmd."\n"; - if(system($cmd)) { print "Pass two failed\n"; } + if(system($cmd)) { print "Encoding seems to have failed\n"; } return 0; } @@ -162,7 +136,7 @@ print ITEM "<comments>".&encodeForXML($file)."</comments>\n"; print ITEM "<description>".&encodeForXML($description)."</description>\n"; print ITEM "<pubDate>".$recorddate."</pubDate>\n"; - print ITEM "<enclosure url=\"".&encodeForXML("$feedurl$filename.$portable.mov")."\" type=\"video/quicktime\" />\n"; + print ITEM "<enclosure url=\"".&encodeForXML("$feedurl$chanid.$start.$portable.mov")."\" type=\"video/quicktime\" />\n"; print ITEM "<itunes:duration></itunes:duration>\n"; print ITEM "<itunes:keywords>".&encodeForXML($title." - ".$subtitle." - ".$category)."</itunes:keywords>\n"; print ITEM "<category>".&encodeForXML($category)."</category>\n";
This also "solves" the file naming problems by naming the files with channel.startime instead, like this: 1007.20051201233000.ipod.mov
(I mean, you never see the original file names anyway in iTunes, see? iTunes takes care of everything and names it from the metadata.)
Last edited by steff on Mon Jan 02, 2006 9:34 am, edited 2 times in total.
|
|
Top |
|
 |
wififun
|
Posted: Fri Dec 02, 2005 6:13 pm |
|
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location:
Ontario, CA
|
Quote: That's a cryptic message? What sort of "eyebrows"?
Yea it was wasn't it.. Well I happen to have a couple of friends who work in certain places, and it turns out that thanks to a Digg, this little script is floating around all over. My site stats show a company named after a fruit has accessed and dl'ed the script a number of times.
Anyway.. as for the commercial thing. Yea, using nuvexport is a good option for some. Right now, I think I have h.264 working, and the ipod files are about 1/2 the size they currently are with the script for the same or better quality. It is sweet, but I want to test another day or so before posting. I need to see if this can be done with nuvexport too.
|
|
Top |
|
 |