Media Library

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

tarantelle pugliesi motorola v180 usb driver download www kazaa it dimage e 323 konica minolta progettazione macchina processori intel p4 www maranello it www edu ro i piu bei goal del mondo th 42pv500e mmc cards km0 audi a4 avant auto km 0 hp compaq server g4 focus 90 cv portami in cielo hp dlt vs80 corpo luteo giocho calcio compro vendo suoneria inno lazio legge 80 2003 roig montserrat lg l1730s go west atmosfear louvet de couvray jeanbaptiste eco drive citizen orologi divinita e personaggi mitologici sony vgna497xp ariston avf 109s lamiere lavorazione e produzione rimax mp3 move ya body ana sky nomi in cinese beating online casino voli low cost europa digital diary marina di maratea gocci di memoria tenuta le viste sophia bush foto spazio intel pentium 4 2 66 ghz governo federale italiano computer con windows media center bouble bounce mascara bronze ufficio macchine e attrezzature euroset 2015 gena nolin studentessa piu sexy hf dc1 sandali nike tatuaggi maori gratis blink 182 nudi kampa canon batteria hard disck 120 gb senza fine panca per palestra topless nel grande fratello codici per risiko eizo l568as hasta siempre comandante midi router adsl wireless 802 11g ati 9600 pro 256 mb rassa trans campania bellini bernardo dlgs 196 2003 logitech flat test drive overdrive alghe kelp connels svideo lettori dvd ci vuole un attimo aleandro baldi polo volkswagen ferro baby gang www sia hub per usb viet net com caribbean travel la fiera delle illusioni guta nicolae cura battiato agriturismo carrara winmpg aspirapolvere ad acqua simac hard disk case 2 5 ink film telecom leonardo sigle telegiornali inscatolare qtek s100 gsm house of the time batterie t28 parabola per digitale anna dei mille giorni due nella folla kylie minogue red blooded ati 9600 xt 256 mb joy t vannelli jvc gr d245 gang bang sicilia kinder friends prima patch ufficiale per doom 3 porto empedocle molise acquafredda solo sesso gratis tonie aguilera ortopedici altoparlanti mac tears for fears the universal masters dvd collection santos cartier magic gioco ufficio lignano sabbiadoro nik clark john maurice profumo gai mattiolo nikkor 24mm foto helene swedin gps 168 luomo di hong kong teeny weeny sting bikini graudatoria concorsi vfp4 ericsson cellulari un angelo non e video passat 2004 lacie hard drive 250 gb gtavice city energizer a76 www comune treviglio it i re magi www lilkim com otra ves difesa del suolo victor hugo hotel palace portorose salina eolie console per pc ricciardi significato dei tarocchi vetreria sant angelo srl tungstene gps fotocopiatrici digitali a colori foto lilla for men gestori telefonia mobile nike calcetto indoor ortona madonna re invention world tour 2004 mp3 hd 40gb vacanza russia marzo costruzioni musi pussy jamile la ultima nota sony t33n media center acer ilenia video programma paso adelante stoccolma shopping techno warriors dj fish gba cavo link liteon sohw1693s auto vendita digitale terrestre empire piscina kd egoiste platinum chanel 125ml coral engineering finanziamento giugliano campania moda accessorio montatore meccanico (regione emilia romagna piacenza provincia) lumix dmc foo fighter solo musica de eddie santigo salsa immobilare vigilanza san paolino sito internet caserta storie di capelli sdram 256mb 133mhz tekio il diavolo va in collegio romano prodi crack step7 5 2 bmw italia agriturismo specchia lecce media center desktop kettler delta 100 trucco guida resident evil 4 maxtor 200 gb sata israelsex tesina su fiat www tg 5 com katherine kelly lang nuda entre midland alan 199 tv philips lcd 32 32pf9986 campeggi della corsica missione segreta 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