[gst-devel] youtube on gstreamer

Julien Moutte julien at moutte.net
Mon May 11 11:15:17 CEST 2009


Youtube provides web apis to integrate their player in your site/product.

You can parse the player integration code to figure out the link to the
concrete video file (FLV or MP4). That's called content scrapping.
Youtube does not authorize you to do that (feel free to take the risk
though, you would have to make serious money before they run after you).

GStreamer is able to play FLV files with codecs from the -bad and ffmpeg
modules. They are not claimed to be legal in many countries. Indeed you
would have to pay patent licenses for VP6 and H264 and MP3 and Sorenson
Spark to have legal decoders.

So playing Youtube content on a commercial device is risky because :

1) Content scrapping might be illegal from Youtube POV and they might
change their code to just break your application when they want.

2) Codecs to reproduce Flash content are hard to get (will get easier
with Adobe releasing their specs soon with the AIR platform but with
some constraints).

Fluendo might be able to help you for 2) if you have big volumes, for
item 1) it's your choice to make...

Technically at least this should work like a charm and you should even
be able to do seeking on the remote file through HTTP/1.1

Best regards,

Julien Moutte,
FLUENDO S.A.

ebin jose wrote:
> Hi Sean,
> 
> Thanks for a quick reply.
> I am not sure if I made myself clear.
> 
> Our mediaplayer doesn't have a web browser.
> So the proposed application (like a standalone application), should
> actually access "youtube.com <http://youtube.com>" website and get the
> media urls (I am still not sure how to get it) and gstreamer should then
> play it back. This is the whole idea.
> 
> In such a case, I will be playing back SWF or FLV ? sorry I am confused.
> 
> I haven't really read the youtube TOS. Do you think this idea is against
> the TOS ?
> 
> Thanks,
> Ebin.
> 
> 
> On Mon, May 11, 2009 at 12:39 PM, Sean McNamara <smcnam at gmail.com
> <mailto:smcnam at gmail.com>> wrote:
> 
>     On Mon, May 11, 2009 at 2:35 AM, ebin jose <ebinjosetel at gmail.com
>     <mailto:ebinjosetel at gmail.com>> wrote:
>     > Hi All,
>     >
>     > Has anybody worked on playing back youtube videos on gstreamer ?
> 
>     Playing Youtube SWF files from your own website, etc. is probably fine
>     (many sites embed Youtube SWFs), and really the only high road. If you
>     can get Gstreamer to do that, have at it, but I'm not sure which
>     codecs you'd need to have installed to do that, if indeed it's
>     possible at all. Your next best bet to play the SWFs would be Gnash
>     (which uses Gstreamer internally a lot).
> 
>     However, there have been reports[1] that Youtube goes after (and tries
>     to shut down) people who directly download and stream their FLV or MP4
>     files. It's fairly easy to introspect the results of an HTTP GET
>     youtube.com/watch?id=foo <http://youtube.com/watch?id=foo> and build
>     a URL that will get you an FLV
>     (which plays in gstreamer with the correct codecs), but that may
>     violate Youtube's terms of service.
> 
>     "Can do" versus "Should do" -- it's your call, the same with the
>     ugly plugins.
> 
>     [1]:
>     http://www.techcrunch.com/2009/02/13/youtube-kills-our-video-download-tool/
> 
>     >
>     > I am new to youtube apis also.
>     >
>     > We have a portable media player (arm based) with wifi connectivity. We
>     > are planning to add an application which can playback youtube
>     > contents.
>     >
>     > Background:
>     > - Our player is running linux on an ARM based platform.
>     > - mediaplayer uses gstreamer as playback engine.
>     > - the complete code (apart from gstreamer) is in C.
>     >
>     > I have the following questions:
>     > 1) I am planning to use youtube DATA APIs (java ones) to retrieve the
>     > urls from different categories of videos in youtube;
> 
>     I briefly investigated the data APIs myself, and I couldn't see how to
>     get URLs to actual video datastreams (the FLV or MP4 files). If it
>     isn't in Youtube's declared API, then it probably isn't something they
>     want you to do.
> 
>     >
>     > I belive once I have the media url, I can just give it to
>     gstreamer and it
>     > will play it back.
> 
>     As stated above, if you're getting an .FLV or .MP4 file, it will
>     "work" in Gstreamer given the proper codecs (which are known to work
>     with the correct combination of gst-plugins-good|bad|ugly) but you
>     need to watch out for a potential TOS violation. If you're getting an
>     SWF file, then I would presume that Youtube is happy, as that's
>     basically encapsulation of their ad content and so forth, which is
>     exactly what they want.
> 
>     > I believe this is a right way of doing it. Please comment if this
>     > belief is wrong ?
>     >
>     >
>     > Thanks in advance.
>     > Ebin.
>     >
>     >
>     >
>     ------------------------------------------------------------------------------
>     > The NEW KODAK i700 Series Scanners deliver under ANY
>     circumstances! Your
>     > production scanning environment may not be a perfect world - but
>     thanks to
>     > Kodak, there's a perfect scanner to get the job done! With the NEW
>     KODAK
>     > i700
>     > Series Scanner you'll get full speed at 300 dpi even with all image
>     > processing features enabled. http://p.sf.net/sfu/kodak-com
>     > _______________________________________________
>     > gstreamer-devel mailing list
>     > gstreamer-devel at lists.sourceforge.net
>     <mailto:gstreamer-devel at lists.sourceforge.net>
>     > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>     >
>     >
> 
>     ------------------------------------------------------------------------------
>     The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>     production scanning environment may not be a perfect world - but
>     thanks to
>     Kodak, there's a perfect scanner to get the job done! With the NEW
>     KODAK i700
>     Series Scanner you'll get full speed at 300 dpi even with all image
>     processing features enabled. http://p.sf.net/sfu/kodak-com
>     _______________________________________________
>     gstreamer-devel mailing list
>     gstreamer-devel at lists.sourceforge.net
>     <mailto:gstreamer-devel at lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list