Media Library

From AwkwardTV
Revision as of 04:01, 23 September 2007 by Uw1Nci (talk | contribs)
Jump to: navigation, search

sfilate di moda londinesi gps garmin geko 201 pentium p4 560 ewing william maurice kenwood 5100 teatri di bologna move yuor body fitzgerald robert david chat con ragazze di cracovia v525 modem drivers musica militare remix eros poeti onirici gta 3 pocket pc n30 hd per notebook cilindro oleodinamici r2400 epson fiat punto 19 d stile lucky star lsb hp compaq nx6110 celeron nokia 336 one by outlook excel karpathos l ultima neve di primavera wi fi scheda auricolari stereo philips old turkey buzzard sborrate nella fica stanze proibite coppie veneto odore di figa residence trentino finanzas cricket 2002 lc l arte della camicia troie over 50 tatuaggi sole e lune locanda al mercante venezia via roma bambagioni macromedia 8 luxor marsa alam programma per trasformare cd in mp3 ballerine di lap dance tv plasma samsung ps42d5s modelle amatoriali chavo del 8 web cam rj45 ver imagenes de sexo unlock code lg 8110 lacie hard drive 30 gb foto particolari dli8 pentax panasonic nv vp21 campo gioco rugby free video pornno gratis lesbiche gratis bigiotteria carina nokia 6210 batteria litio prova scritta esame agente immobiliare nokia hs 36w pinne da mare grundig 1100 driver v150 motorola energia electrica www gardaland vacanze in croazia verbatim cd 800mb nuova chevrolet auto nuove lavatrice sesto senso tentazioni metropolitane the rich red alert allarme rosso www decapitazioni it hotel a mentone liublu diseny maglieria dolce gabbana uomo la canzone rubata nuovi drivers per le schede grafiche matrox pvr8000 da persone emigrate klikka voli per istanbul zoppas pt 10 a sql server 2000 workgroup cybershot dsc v3 nudo maschile gratuito sanz aleandro cuckol link rallisport challenge testi nadiya materiale meccanico logitech stx just cant t wait until tonight asciugamani carta c sandviken fondiaria terni humax lcd 26 ricevitore gps royaltek packard bell disk biblioteca adelphi gulben ergen ucacaksin www wp plw arizona cose fare titfight gioco di carte canasta karolina kurkova nude banaba phone moduli it fighe senza peli sat key asus k8v se deluxe jacket compact heat pipe zalman alimentatore la banda del terrore age of empires iii pc videogiochi portatili mini lkj il buono il brutto e il cattivo lettori mp3wma palmari imate divise cameriere pigiama bambini zero assoluto mezz ora video costa sol ecs tati container baedeker world time orologi casio situzione neve oblio relais de paris song fuck you right back auto insurance rata le avventure di alice nel paese delle meraviglie telefoni auto prosciutto frank rayes esterno 250 western hard disk e floppy calligaris it cronologia del medioevo chwila lazarella jbl 200 6 md 4100 mitac mio168 cinema cortefranca xeon dissipatore giochi di charlie riscaldamento jeans iceberg uomo phedra emblema samsung fax sf345tp desktop wallpaper video transex free www ortodonzia it tappeto giochi neonati hd 62 tv anello matrimonio warszawa palestrato donne inquiete tenuta di collosorbo trigliceride dieta hex file titanium karma amore io domicilio uomo aria mesh calzature gtv a roma hard disk notebook 40gb o sol a lis e o beija flor vieni e seguimi teach my ass portishead ascolta roads schede video pci ati 7000 messaggio sms cellulare siti sesso lavoro westminster giochi pasquali viaccess tps condor agenzia immobiliare latina sen sie spe 322 ni prom night ii il ritorno petergabriel www cartoon networt com adidas superstar 2 piumoni neonati nuova onda box the freestylers video department of the air force air force ma kennedy et moi www bmxxxx condizionatori split lg disco polo 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