Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Fewer cables

2.286 Aufrufe

Veröffentlicht am

Find out about hardware, software, protocols, digital video broadcasting, video formats, computer architectures, Perl modules and more as the speaker undertakes the project of a lifetime in his living room: fewer cables.

Veröffentlicht in: Technologie, Business
  • Login to see the comments

Fewer cables

  1. 1. Fewer cables Find out about hardware, so ware, protocols, digital video broadcasting, video formats, computer architectures, Perl modules and more as the speaker undertakes the project of a lifetime in his living room: fewer cables. Léon Brocard YAPC::Europe
  2. 2. Me Léon Brocard French, live in London Like food Like the colour orange Founded Amsterdam.pm, Bath.pm, Croydon.pm Leader of London.pm Started YAPC::Europe Perl hacker
  3. 3. distributions on the CPAN Acme-Buffy, Acme-Colour, App-Cache, Archive-Peek, Catalyst-Plugin-CookiedSession, Catalyst-Plugin-SimpleAuth, Compress-LZF_PP, Compress-LZMA-External, CPAN-IndexPod, CPAN-Metadata-RDF, CPAN-Mini-Webserver, CPAN-Unpack, Crypt-Skip32-Base32Crockford, Crypt-Skip32-Base64URLSafe, Dackup, Data-Page, Data-UUID-Base64URLSafe, DateTime-Stringify, Devel-ebug, Devel-ebug-HTTP, Devel-Profit, Email-Send-Gandi, Email-Send-Gmail, File-Copy-Reliable, Fir, Games-GuessWord, Git-PurePerl, GraphViz, Haul, HTML-Fraction, HTML-TagCloud, HTTP-Server-Simple-Kwiki, Image-Imlib2, Image-Imlib2-Thumbnail, Image-Imlib2-Thumbnail-S3, Image-WorldMap, Java-JVM-Classfile, JSON-XS-VersionOneAndTwo, Kasago, Language-Functional, LWP-ConnCache-MaxKeepAliveRequests, Mac-EyeTV, MealMaster, Messaging-Courier, Module-CPANTS-Generator, Module-Packaged, MP3-ID3Lib, Net-Amazon-S3, Net-Amazon-SimpleQueue, Net-Cassandra, Net-DPAP-Client, Net-FTP-Throttle, Net-LastFM, Net-Mosso-CloudFiles, Net-MythTV, Net-MythWeb, Net-OpenDHT, Net-Stomp, Net-VNC, Number-DataRate, OpenFrame-Segment-Apache, OpenFrame-Segment-Apache2, Parse-BACKPAN-Packages, Parse-CPAN-Authors, Parse-CPAN-Packages, Parse-CPAN-Ratings, Perl-Metric-Basic, PPIx-IndexOffsets, PPIx-LineToSub, Search-Mousse, String-Koremutake, Template-Plugin-Page, Template-Stash-Strict, Term-ProgressBar-Quiet, Test-Expect, Tie-GHash, Tree-Ternary_XS, TV-Anytime, WWW-Gazetteer, WWW-Gazetteer-FallingRain, WWW-Gazetteer-Getty, WWW-Mechanize-Timed, WWW-Search-Google
  4. 4. e TV as computer “ e growth of personal computers is happening so rapidly that the future open-architecture television is the PC, period. e set-top box will be a credit-card-size insert that turns your PC into an electronic gateway for cable, telephone, or satellite. In other words, there is no TV-set industry in the future. It is nothing more or less than a computer industry: displays lled with tons of memory and processing power.”
  5. 5. e bit radiation business “ e key to the future of television is to stop thinking about television as television. TV bene ts most from thinking of it in terms of bits. Motion pictures, too, are just a special case of data broadcast. Bits are bits.”
  6. 6. Anything, anytime, anywhere television “If your TV could record every program transmitted, you would already have ve times the selectivity o ered in the superhighway’s broad-brush style of thinking. Say, instead of keeping them all, you have your TV agent grab the one or two in which you might have interest, for your future viewing at any time.”
  7. 7. Dackup my $source = Dackup::Target::Filesystem->new( prefix => ’/home/acme/important/’ ); my $dest = Dackup::Target::Filesystem->new( prefix => ’/home/acme/backup/’ ); my $dackup = Dackup->new( source => $source, destination => $dest, delete => 0, dry_run => 0, verbose => 1, throttle => ’1Mbps’, ); $dackup->backup;
  8. 8. Dackup targets Dackup::Target::Filesystem Dackup::Target::SSH Dackup::Target::S3 Dackup::Target::CloudFiles
  9. 9. RTFM ere are two main logical elements in a MythTV system: L e backend contains the TV capture cards, and stores the recorded video. A typical system will contain at least one backend L e frontend is connected to your TV screen and lets you watch LiveTV and recorded shows. It gets its data from the backend
  10. 10. Protocol C: 21 ANN Playback tigger 0 S: 2 OK C: 48 QUERY_FILETRANSFER 32[]:[] REQUEST_BLOCK[]:[]2048 S: 4 2048 C: 63 QUERY_FILETRANSFER 32[]:[] SEEK[]:[]0[]:[]0[]:[]0[]:[] 0[]:[]2048 S: 7 0[]:[]0
  11. 11. Net::MythTV my $mythtv = Net::MythTV->new(); my @recordings = $mythtv->recordings; foreach my $recording (@recordings) { my $filename = $recording->title . ’ ’ . $recording->start; $filename =~ s{[^a-zA-Z0-9]}{_}g; $filename .= ’.mpg’; $mythtv->download_recording( $recording, $filename ); }
  12. 12. Scraping is not an API my $ua = WWW::Mechanize->new; $ua->default_header( ’Accept-Language’ => ’en’ ); $ua->get(’/mythweb/tv/detail/’ . "$channel_id/$programme_id"); $ua->submit_form( form_name => ’program_detail’, fields => { record => 1 }, button => ’save’, );
  13. 13. Date formats # Sun, Jun 14, 10:00 PM to 11:00 PM (75 mins) my $strptime = DateTime::Format::Strptime->new( pattern => ’%Y %a, %b %d, %I:%M %p’, locale => ’en_GB’, on_error => ’croak’, ); # programme runs over midnight if ( $stop < $start ) { $stop->add( days => 1 ); }
  14. 14. Modern scraping my $tree = HTML::TreeBuilder::XPath->new; my $html = $response->decoded_content; $tree->parse_content( $html ); my $nodeset = $tree->findnodes(’//tr[@class="recorded"]’); foreach my $row ( $nodeset->get_nodelist ) { next if $row->as_HTML =~ /Still Recording/; ... );
  15. 15. Net::MythWeb my $programme = $mythweb->programme( $channel, $start_as_datetime ); $programme->record; my @recordings = $mythweb->recordings; foreach my $recording ( @recordings ) { $recording->download("recording.mpg"); }
  16. 16. Success “ e project has been a great success, delivered on schedule, within budget and with only a little threatening to give up and start again from scratch” — Andrea