[FFmpeg-devel] [PATCH 2/2] lavf: youtube support

Clément Bœsch u at pkh.me
Sat Aug 24 01:22:20 CEST 2013


On Fri, Aug 23, 2013 at 11:45:57PM +0200, Lukasz Marek wrote:
> Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>
> ---
>  Changelog                |    1 +
>  MAINTAINERS              |    1 +
>  configure                |    1 +
>  doc/protocols.texi       |   45 +++++
>  libavformat/Makefile     |    1 +
>  libavformat/allformats.c |    1 +
>  libavformat/youtube.c    |  463 ++++++++++++++++++++++++++++++++++++++++++++++
>  7 files changed, 513 insertions(+), 0 deletions(-)
>  create mode 100644 libavformat/youtube.c
> 
> diff --git a/Changelog b/Changelog
> index 4a6c60c..22de825 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -15,6 +15,7 @@ version <next>
>    data read from an input file
>  - incomplete Voxware MetaSound decoder
>  - read EXIF metadata from JPEG
> +- YouTube support
>  

You should discuss such changes before making them... We already have libquvi
support (and we can add more dedicated project wrappers for this if needed),
which looks more appropriate.

Also, parsing HTML with manual C-string code should be avoided when possible:
this is definitely not a critical feature, so we can rely on external
libraries, using scripting and solid HTML parsing libraries. (And yes, I know
we are doing that for subtitles, because I consider this to be a critical
feature, at least something that should be part of the core).

More importantly, it will require regular changes to keep up with the changing
website. So basically, it will be regularly broken; and so every "old" FFmpeg
release will be unusable unless we cherry pick every single change to deal with
Youtube, until you get bored of fixing that code...

Now what I fear the most is that introducing such format means opening the door
to a lot of "scripting-to-C" translation of a lot of other websites:

    ☭ ls libquvi-scripts/share/lua/website
    1tvru.lua         francetelevisions.lua  pluzz.lua          tube8.lua
    bbc.lua           globo.lua              pornhub.lua        tvrain.lua
    beeg.lua          golem.lua              README             videobash.lua
    blip.lua          imdb.lua               redtube.lua        wdrmaus.lua
    bloomberg.lua     jizzhut.lua            spankwire.lua      wimp.lua
    canalplus.lua     justintv.lua           tagtele.lua        xhamster.lua
    collegehumor.lua  keezmovies.lua         tapuz.lua          xnxx.lua
    deviantclip.lua   lego.lua               tcmag.lua          xvideos.lua
    empflix.lua       metacafe.lua           tmunderground.lua  yfrog.lua
    fastjizz.lua      mgnetwork.lua          tnaflix.lua        youjizz.lua
    foxnews.lua       myspass.lua            totallynsfw.lua

...and duplicate all the issues I was stating above.

So I'm sorry, but I don't think this patch is a good idea unfortunately... So
again, please discuss such thing in a RFC thread to avoid such situation.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130824/680dfeb5/attachment.asc>


More information about the ffmpeg-devel mailing list