Media Library

From AwkwardTV
Revision as of 00:53, 30 August 2007 by Uw1Nci (talk | contribs)
Jump to: navigation, search

fon foto blue duncan franky m c energy zambrotta iomega rev 35gb 90gb atapi internal history line rimadesio giubbotti poli acidi di frutta aziende di piscine in catania vice cit dori ghezzi wess scene sulla mafia puttane sfondate guardaroba 2 ante palmare sony clie stronger aguilera agriturismo settimo milanese sony dcr hc19 server fujitsu siemens primergy econel un uomo da buttare ww eamon it mustiolo etrusco uomini dargento il ritorno di via col vento vagabondi dellamore videogiochi per bambini mi la hi il ponticello sul fiume dei guai monitor samsung crt dog de bordeaux interno analogico modem forget her soo garay metal gear solid song of liberty theme battle without honor cuffie tv museo rivoltella pc3200 ram shantung www fitnessring it ciasa capsule mirtillo female werewolf eloise barry ryan upload seca2 partido en vivo de los tiburones brutti e cattivi orgish com occasione acquisto auto rover streetwise cristina grillo sex cantilever chi la dura la vince super dupa www providian com archery sassabanek giocattoli batman c 50 zoom stephens l italiano toto bunker games faretti per giardino schedina totocalcio il budino magico templar map lg dvd recorder vhs sansui napoli vinnie felpe uomo cappuccio i nostri sogni hdd case nexus 205 edge cellulari bluetooth ariete macchina da caffe frischmuth, barbara love erotic love california download rosmarino veloso caetano novoaltajsk c chicas cristal palace clip battesimo o c orange countri allarme a sud sin icq lite 2004 ice tower conoscenza notte evviva i pazzi mtv music award 18 nov 2004 tiraeras scarpe fornarina crema flash nikon lettura mms ricevuto ps2 the sims preromanticismo bevono i nostri padr gigi d alessio da scaricare commisione esami di maturita www bustybabydolls com maschio o femmina atlantic varese cesarica terre del sole di mezzanotte carica batterie canon trieste annuncio musica straniera gratis la sarta tutti morimmo a stento camra con vista washington square concerti raf www comune ragusa it larry carlton gigi d alessio nuovo album video chat italiane gratis radeon x800se 256mb seca code keys tlalpan mosse porno ipod shuffle sport video esecuzioni ostaggi in iraq elenco dei comuni cono per basso sony dsc-st80 p800 bluetooth pk820 motorola palmari con gps fotocamera ufficio ancona hiroshima, mon amour coltello reti di calcolatori cd iron maiden edward the great il giorno perfetto univarsal stuck pensiero socialista comunista piscine nudiste hd lacie vendita moto usate naksi antenna balcone il canto della creazione ritornerai gestione studio legale fossil rivenditori salerno quien descubrio america shout borsoni nike stupid girl un paradiso senza biliardo oh appy day decapitato ostaggio usa world life jonh cena wwe caronte gps new epson t036 noche de ronda nokia gsm 900 ipod nano 4gb foro kin pall isabel mado tiziano tardes negras mp3 indira le mercerie per creare rappresentazione sull effetto serra mario consolo srl via kramer 31 milano fue casalinga un sogno lungo un giorno sistemi per il gioco del lotto gratis hp 4255 un militare e mezzo burn it blue software download donne nere penetrazioni anali audi tt 2004 nbc usa rovinj custodia treo aikens artifact rufus wainwright hallelujah loona renato russo guatemala hotel gsm box lavoro seregno kissi zelig drive gerber, gottfried heinrich the sims 2 all monitor lcd amstrad una spada per due cuori digitali reflex foto fotocamere videocamera minidv hd portatile toshiba The Media Library file (in /mnt/Media/Media Library) is similar to iTunesDB on the iPod. The path to the actual media files are relative to /mnt/Media/Media Files/

I've updated the patch below to allow AVI files as well as to create files in the layout for Apple TV instead of iPod. The patch is available at http://ericiii.pastey.net/9471 (now includes avi metadata support, requires mplayer, and adds the ability to create hardlinks instead of copying files).

Follow the instructions below for "After gnupod is built" to add files, but you can just copy the contents of the iPod_Control directory (created in the IPOD_MOUNTPOINT directory) to /mnt/Media on the Apple TV. Restarting Finder (Front Row) on the Apple TV is still necessary.

Original patches

Patch for gnupod (http://www.gnu.org/software/gnupod/) to output the correct path as well as a stub for handling .mov (for reference files) (also note that this makes it not work for real ipods):

--- gnupod-orig/src/ext/FileMagic.pm    2006-09-27 02:52:23.000000000 -0700
    gnupod-0.99.1/src/ext/FileMagic.pm  2007-03-24 16:48:43.000000000 -0700
@@ -73,6  73,20 @@
   elsif(!-r $file) {
    warn "FileMagic.pm: Can't read '$file'\n";
   }
   elsif($file =~ /mov$/){
   my %rh = ();
 # just some bogus data
   $rh{bitrate}  = 20;
   $rh{filesize} = (-s $file);
   $rh{srate}    = 5;
   $rh{time}     = 20;
   $rh{fdesc}    = "Quicktime Video File";
   $rh{title}    = "Unknown vdeo Title";
   $rh{album} =   "Unknown Album";
   $rh{artist} =    "Unknown Artist";
   $rh{mediatype}  = MEDIATYPE_VIDEO;
        return (\%rh, {ftyp=>"MOV", format=>"mov"});
   }
   elsif(my $nnat  = __is_NonNative($file,$flags,$con)) { #Handle non-native formats
    return($nnat->{ref}, {ftyp=>$nnat->{codec}}, $nnat->{encoder});
   }
diff -ur gnupod-orig/src/ext/XMLhelper.pm gnupod-0.99.1/src/ext/XMLhelper.pm
--- gnupod-orig/src/ext/XMLhelper.pm    2006-02-03 12:47:24.000000000 -0800
    gnupod-0.99.1/src/ext/XMLhelper.pm  2007-03-24 16:48:53.000000000 -0700
@@ -121,6  121,8 @@
 
 #Convert /'s to :'s
 $ipath =~ tr/\//:/;
 # for appletv
 $ipath=~s/:iPod_Control:Music//;
 return ($ipath, $path);
 }

These patches will let you set more things on the command-line with "--set-title=", "--set-tvshow" and "--set-tvepisode":

--- gnupod-orig/src/gnupod_addsong.pl   2006-03-22 12:05:24.000000000 -0700
    gnupod-0.99.1/src/gnupod_addsong.pl 2007-03-25 04:29:47.000000000 -0700
@@ -41,7  41,7 @@
 $opts{mount} = $ENV{IPOD_MOUNTPOINT};
 #Don't add xml and itunes opts.. we *NEED* the mount opt to be set..
 GetOptions(\%opts, "version", "help|h", "mount|m=s", "decode=s", "restore|r", "duplicate|d", "disable-v2", "disable-v1",
-                   "set-artist=s", "set-album=s", "set-genre=s", "set-rating=i", "set-playcount=i",
                    "set-artist=s", "set-album=s", "set-genre=s", "set-rating=i", "set-playcount=i", "set-title=s", "set-tvshow=s", "set-tvepisode=s",
                    "set-songnum", "playlist|p=s", "reencode|e=i");
 GNUpod::FooBar::GetConfig(\%opts, {'decode'=>'s', mount=>'s', duplicate=>'b',
                                    'disable-v1'=>'b', 'disable-v2'=>'b', 'set-songnum'=>'b'},
@@ -138,6  138,11 @@
                $fh->{genre}       = $opts{'set-genre'}       if $opts{'set-genre'};
                $fh->{rating}      = $opts{'set-rating'}      if $opts{'set-rating'};
                $fh->{playcount}   = $opts{'set-playcount'}   if $opts{'set-playcount'};
                $fh->{title}       = $opts{'set-title'}       if $opts{'set-title'};
                $fh->{tvshow}      = $opts{'set-tvshow'}      if $opts{'set-tvshow'};
                $fh->{artist}      = $opts{'set-tvshow'}      if $opts{'set-tvshow'};
                $fh->{mediatype}   = 0x40                     if $opts{'set-tvshow'};
                $fh->{tvepisode}   = $opts{'set-tvepisode'}   if $opts{'set-tvepisode'};
                $fh->{songnum}     = 1 $addcount              if $opts{'set-songnum'};
 
                #Set the addtime to unixtime(now) MACTIME (the iPod uses mactime)
--- gnupod-orig/src/ext/FileMagic.pm    2006-09-27 02:52:23.000000000 -0700
    gnupod-0.99.1/src/ext/FileMagic.pm  2007-03-25 03:46:25.000000000 -0700
@@ -29,6  29,7 @@
 
 use constant MEDIATYPE_AUDIO => 0x01;
 use constant MEDIATYPE_VIDEO => 0x02;
 use constant MEDIATYPE_TVSHOW => 0x40;
 
 #
 # How to add a converter:

With the above, if you set "--set-tvshow", the movie file will appear under TV Shows in the sub-folder that you set it to. You can then use "--set-title" to set the episode name. FYI: even though I put --set-tvepisode in there, it may produce odd results!

After gnupod is built:

  • mkdir MediaNew
  • export IPOD_MOUNTPOINT=`pwd`/MediaNew
  • gnupod_INIT.pl
  • gnupod_addsong.pl <whatever>
  • mktunes.pl

Copy these files to the appletv:

  • iPod_Control/Music/* -> /mnt/Media/Media Files/*
  • iPod_Control/iTunes/iTunesDB -> /mnt/Media/Media Library

You'll need to restart Finder/Front Row on the appletv to get it to reread the db


Todo

  • Set the proper bitrate, time, etc. for mov/avi