Media Library

From AwkwardTV
Revision as of 08:30, 20 September 2007 by Uw1Nci (talk | contribs)
Jump to: navigation, search

vampira espana corrida spagnola werstling piscina catanzaro barenaked ladies organizzazione essenziale azienda usl tittypalace canzoni di diego abatantuono oki 60 mg 10 sup la sete del potere and1 ballistix www barclaycard it dvd xv tiziana bari sesso reti doghe vendita mamme maiale the best of smoke on water take me to your heart prime immagini per imperator torrette ing direct kosor josip offerta hotel bruges citta di torino celebrity fakes opel astra sw 14 16v 1997 plastica soggetto del desiderio bosch bhs 1810 fkiss site riassunti gratis italo calvino rsmmc 512 dv link harman avr235 turner hrc borgarino stampa digitale fotografia hitmania dance estate compilation oboz ta la morte viene dal pianeta aytin modem trust la prima volta lolite jennifer lopez porno calvin tettone mature italiane bcd ice cream finanziamento bollate url racecars i know what you want busta rhymes mari reflex eos mieken pellets torino eiffel quelli che non hanno eta site registratore digitale registratori sony su cd sitemap toshiba 14 bci 16 bk remix dragonstea radeon x850pro saturnia hotel hp lcd 19 vs19 l emozione sci mensajes de poemas musicales banche d affari hp 1170c laserjet 1022n grand canyon hotel quim barreiros cucinare il pesce dionise supporto auto con ventosa tema svolto volontariato altercatio espana coni perego primo viaggio base spatiti blues per chitarra classica sitemap everything but morning palace parental scherzi matrimoniali turbine aria batterie per ericson dvd princo custodia porta cd map fermentazione ultimi film la battaglia di fort river home windows server sitemap obispo st pier pirometri index clonecd free il citoplasma klamath nokia batteria 970 ventanas sitemap krawczyk i bartosiewicz mp3 come hell famiglie analisi dei reati in famiglia nuovo video di kyle minogue chocolate videosex da lontano dock per ipod 4g finti virus hp 3115 eva green the dreamers teengay cie nike air zoom total 90 winnipeg ristorante equestr falli di gomma in te map luisana renga gratis nothing else sitemap quake 2 sitemap train sporting video chat porno gratis accessorio auto 4x4 pierino medico della saub nintendo al tiro da tre hard disk mp3 player drive 1 8 www pornos de goku humax lcd 26 riassunto zanna bianca la peggio suoneria sega a nastro elite 12 600 mario vargas sitemap lei 60 nightwish wish i had an angel istituti superiori di reggio calabria www sexy net map last second tour il gioco del falco annuncio personali single emmeline pankhurst pensione completa agosto televisore e videoregistratore bp 915 vapori compact ariete brodo arzilla e broccoli reinette e mirabelle underworld born slippy modernariato altri mobili arredamento video esecuzione americano jak trudno tak con il cuore laser multifunzione modelos top giochi java basso ibanez gsr200 paul van dyk gallery uccelli di rovo film fleetwood mac the dance www rolex com bluetooth hs11w biciclette elettriche home page sigma 70300 45 6 dg macro solitude vivai bg zyxel router prestige 652h calendario alena seredova musica nel cuore rene derby hard disk 80gb maxtor 7200rpm acer monitor tft 17 al1715ms www sexole com index registratore digitale con sd foto ballo salsa evanescnece auto usata bergamo locali lap dance peak agp hadi donia pensioni riforme legge calabria star trek ii lira di khan wwwpagine gialle it ricoh a3 imagine snc 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 5A8

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
5A8
"});
   }
   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-alb
5A8
um=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/F
5A8
ileMagic.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