Bug#535957: clive: --format switch doesn't work anymore

Toni Gundogdu legatvs at gmail.com
Tue Jul 14 19:11:38 UTC 2009


Gerfried Fuchs:

> I don't know what mailer you use - but can you please
> tell it to not break threads?

Can you hear me now? ;)

> And like noticed yesterday, why did I receive a mono flv
> even with -f best when -f fmt18 gave me a mp4 with stereo sound?

If -f best gives you the "regular" flv and -f fmt18 gives
you mp4 *for the same video* then that's a bug and needs
to be looked into. I haven't received any reports regarding
-f best so I've assumed it works. I rely primarely on bug
reports.

> inconvenient for the users to have dig up what formats there
> might be now and there. That's why they use a tool like this
> and not extract the download URL themself from the html source,
> mind you.

No one is expecting the users to go over the html. I'm not even
sure why you would think that was necessary.

Bear with me.

Manual page:
  fmt22 .. mp4    (1280x720) (HD)
  fmt35 .. flv     (640x380) (HQ)
  fmt18 .. mp4     (480x360)
  flv   .. fmt34   (320x180)
  fmt17 .. 3gp     (176x144)

The reason I chose to parse the fmt_map string in the html
instead of iterating over the IDs and connecting to the
server to try if it returns an error should be apparent.

e.g.:
...
if ( $config->{format} eq "best" ) {
    $fmt = $1
        if $$content =~ /"fmt_map": "(.*?)\//;
} ...
# $fmt should contain any of the above IDs (e.g. fmt22)

As far as I can tell, the fmt_map string varies for at
least some videos. Possibly older. I'm only guessing.

What seems certain (until now if you found a bug) is that
the first one in it indicates the best format.

The rest of the fmt_map remains mystery to me, although
it seems to indicate at least some of the available formats.

>  So why doesn't mp4 strive for the best mp4 format available?

You mean why "-f mp4"  didn't do that previously?

I, for one, don't care to download the HD (fmt22) which is
typically much larger file to download due to the higher
resolution than the "regular" fmt18. They may use the same
audio quality, though.

>  So you are saying that one needs to remember even which fmt
> number is used for which service?

mp4 -> fmt18 hardly means steep learning curve. The fmtxx
IDs are for youtube only. If you look at the manual page,
you'll see that there aren't that many IDs. Youtube and
Dailymotion are the only ones with several IDs.

> users - I am worried about all the regressions the completely
> reworked config and commandline handling brings with it when
> they upgrade at one point from lenny to squeeze. To some degree
> this reminds me of the xmms -> xmms2 changes, and I guess you
> know how much of a userbase and goodwill it did cost them.

I can't say that I know of the xmms changes but I get what you
are saying. I really have no intention (or interest) to revamp
clive anymore, and while that may not help with these changes
you have written about, but it may be something worth keeping
in mind which ever way you guys decide to go.





More information about the pkg-perl-maintainers mailing list