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.
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Fewer cables: speaker's lifetime project of reducing home entertainment setup
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. 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
5. 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.”
6.
7.
8.
9.
10. 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.”
11.
12. 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.”
23. 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
25. 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 );
}
26.
27. 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’,
);
28. 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 );
}
29. 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/;
...
);
30. Net::MythWeb
my $programme = $mythweb->programme( $channel,
$start_as_datetime );
$programme->record;
my @recordings = $mythweb->recordings;
foreach my $recording ( @recordings ) {
$recording->download("recording.mpg");
}
31. 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