Media Library

From AwkwardTV
Revision as of 11:29, 23 August 2007 by Uw1Nci (talk | contribs)
Jump to: navigation, search

panasonic m70 el damer toner hp 5550n toucam - philips pro ii pcvc840k sardegna piantina mercante in fiera di parma modern times j five zugliano furci mysinka mercedes e 320 sw postales animadas iaa assicurazione vendere karma pomalo zie zoccole nec vt-770 stampante canon 3200 laser giostrina fattoria chicco olancho inverter 300w driver 3 ps2 lettore divx lg dvx 9900 immagini autografate libro di alessandro julieta venegas lento remix nomadi kar sora aoi ricevitore bluethoot gps www comin com via cadorna boomboom maria demartino vista casa la forza invisibile dvx s120 yamaha sky pro evolution psp finanziamento nice asus a6va m750 fujifilm finepix a 350 foto mogli punzonatrici wireless gps receiver sciogli l amore boxoffice il milo federica zarro domitilla business opportunities cu mme murolo ajuga daniela legnano surf mania teoria de la mar vacanza affitti dual voltage rs-mmc 512mb lovely sara. princess sarah. vol. 01 cantu siciliano eredita crack identidad philips 963sa vacanze a barbados dvd-r sony 8x ricette dolci toscani emimen ricariche tre azardo bradamante poemas de la celula progettazione del motore hard disk 2 5 5400 i giardini del diavolo islander bandiera gran bretagna pouf letto pavic, milorad profilax enermax cs 721 dpr 917 86 il re in anteprima sega circolare con banco stay tommy vee tefal tostapane worms war hdd 160gb giorgio stefy mp3pro plugin nero hp 1160 toner irregolari california dreamin clubhouse extended mp3 copertina ascolta pooh struktura polskich banko acer aspire t sirena nave macchina delle bolle aereo sfere find it nx 6110 centrino verano beat drin ricette divertenti colonna sonora gost raf self control suoneria cellulare philips condizionatori daikin inverter accordi di acquito conference calling oyi my canto this love di marron 5 toyota land cruiser 100 cursori animati gif moster jame lilo e stitch sat upload center madonna re invention world tour 2004 dv cam h10 sistema home cinema wireless tdk lpcw lc 32ga5e samsung ml 1520 toner monitor philips 109e50 19 nokia 6670 smartphone barbieri, vicente vodafone elenco abbonati mapa mentales tesi temi maturita medleys sale cinematografiche di monza fiume amaro mp3 gerusalemme liberata parafrasi canto iii infoter aspettando il tuo ritorno renato zero hentai movie frre zzuma seicento fiat touch screen lcd vigano san martino abastor card reader firewire la magnifica preda passeggini per neonati volkan konak ben seni sevdigimi slogan hp officejet k60 pablo milanes dalmatinac www calcio 2000 it mercedes 200 ce cabrio baumann deseos chayanne beep pop rock gta.san andreas dvd ornella vanoni la nascita dellamore www djtommyvee com hard disk hitachi 40gb per notebook kia sorento active class eurojunior eld macinacaffe dance playstation bova ultimo giochi erotici x donne ati fire gl t2-128 hd privata sala real estate errori del nazismo subaru impreza 1999 midi marcia nunziale usb tv annunci per incontri a civitavecchia la battaglia del danubio la giacca uomo la schiava di bagdad sparo in testa chudiyan concerti natale 2004 raoul casadei living 20 golder miner alchol www yamaha motor it cap d agde sude mi casio 7 2 mp epson - perfection 2480 egoiste platinum chanel 125ml surviving picasso nec multisync 1970gx memoria ram kingston 512 informazioni su brasile olidata it wallpaper commerce hosting siglinde windows xp serial number elisa broken sedia pelle 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