Bug#611036: clive: YouTube formats are outdated, and config validation prevents using new names
Adrian Irving-Beer
wisq at wisq.net
Mon Jan 24 23:58:22 UTC 2011
Package: clive
Version: 2.2.13-5
Severity: normal
The YouTube module appears to have evolved to use new names for many of
the formats. From YouTube.pm:
# flv
flv_240p => '5',
flv_360p => '34',
flv_480p => '35',
# mp4
mp4_360p => '18',
mp4_720p => '22',
mp4_1080p => '37',
mp4_3072p => '38',
# webm
webm_480p => '43',
webm_720p => '45',
# 3gp
'3gp_144p'=> '17',
Yet rather than consult this table of formats, the Config.pm appears
to be using a local simple validation:
# Check format.
my @youtube = qw(fmt18 fmt34 fmt35 fmt22 fmt17 hq 3gp);
my @google = qw(mp4);
my @vimeo = qw(hd);
[... other providers ...]
my @formats
= ( qw(flv best), @youtube, @google, @vimeo, @spiegel, @golem );
#unless (@formats ~~ $config{format}) { # Perl 5.10.0+
unless ( grep( /^$config{format}$/, @formats ) ) {
It looks like we're using this simple validation scheme that a) lets you
use any format from any host (e.g. Vimeo "hd" with YouTube) and b) is
prone to falling out of date with the actual host files.
This has rather frustrating consequences, since (at least) the
YouTube provider seems to ignore unknown formats and just use the
default one.
The manpage and the Config.pm validation specify all these "fmt??"
formats that the YouTube module doesn't appear to support.
For example, these commands will _all_ get me the 2.6 meg FLV version
of this video:
clive 'http://www.youtube.com/watch?v=f0PbjqwJTZs'
clive --format=fmt22 'http://www.youtube.com/watch?v=f0PbjqwJTZs'
(should be MP4)
clive --format=fmt18 'http://www.youtube.com/watch?v=f0PbjqwJTZs'
(should be MP4)
clive --format=fmt35 'http://www.youtube.com/watch?v=f0PbjqwJTZs'
(should be different size)
These commands get me the 17.8 meg 720p MP4 version (format 22):
clive --format=best 'http://www.youtube.com/watch?v=f0PbjqwJTZs'
clive --format=hd 'http://www.youtube.com/watch?v=f0PbjqwJTZs'
(note that 'hd' is listed under Vimeo validations, not YouTube)
clive --format=mp4_720p 'http://www.youtube.com/watch?v=f0PbjqwJTZs'
(this format is specified in YouTube.pm, but only works if I
add mp4_720p to the Config.pm list)
I would think we should be consulting the provider modules to
determine the list of usable formats. At the very least, the
Config.pm validation badly needs updating, and the docs need updating
either way because the "fmt??" formats are all invalid now.
-- System Information:
Debian Release: squeeze/sid
APT prefers stable
APT policy: (990, 'stable'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages clive depends on:
ii libclass-singleton-perl 1.4-1 implementation of a "Singleton" cl
ii libconfig-tiny-perl 2.12-1 Read/Write .ini style files with a
ii libexpect-perl 1.20-1 Expect.pm - Perl Expect interface
ii libgetopt-argvfile-perl 1.11-1 Perl module for reading script opt
ii libhtml-parser-perl 3.56-1+lenny1 A collection of modules that parse
ii liburi-perl 1.54-2 module to manipulate and access UR
ii libwww-curl-perl 4.05-1 Perl bindings to libcurl
ii perl 5.10.1-16 Larry Wall's Practical Extraction
Versions of packages clive recommends:
pn clive-utils <none> (no description available)
ii libberkeleydb-perl 0.34-1+b1 use Berkeley DB 4 databases from P
ii libterm-readkey-perl 2.30-4 A perl module for simple terminal
Versions of packages clive suggests:
ii ffmpeg 5:0.6~svn20100726-0.1 audio/video encoder, streaming ser
-- debconf-show failed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20110124/28efb9d8/attachment.pgp>
More information about the pkg-perl-maintainers
mailing list