[FFmpeg-devel] [PATCH 3/3] avformat: add youtube-dl based demuxer

Gilles Chanteperdrix gilles.chanteperdrix at xenomai.org
Wed Apr 8 20:14:07 CEST 2015


On Wed, Apr 08, 2015 at 02:08:21PM -0400, compn wrote:
> On Wed, 8 Apr 2015 19:51:12 +0200
> Gilles Chanteperdrix <gilles.chanteperdrix at xenomai.org> wrote:
> 
> > On Wed, Apr 08, 2015 at 07:44:13PM +0200, wm4 wrote:
> > > On Wed, 8 Apr 2015 19:39:00 +0200
> > > Gilles Chanteperdrix <gilles.chanteperdrix at xenomai.org> wrote:
> > > 
> > > > On Wed, Apr 08, 2015 at 07:24:27PM +0200, wm4 wrote:
> > > > > > +    snprintf(buffer, sizeof(buffer), "youtube-dl -f %s -g
> > > > > > '%s'", 
> > > > > > +	    yc->format, s->filename);
> > > > 
> > > > Ok, missing single quotes here around the format.
> > > > 
> > > 
> > > Doesn't help. You can't fix it. You need to use something other than
> > > system() if you want it to be secure.
> > 
> > You can fix it, you can escape the quotes in the string or refuse a
> > string that contains single quotes, but as I said, this starts being
> > cumbersome.
> > 
> 
> why not machine translate the python to c and import that into
> ffmpeg? :P
> 
> https://github.com/pradyun/Py2C

Because then you will have to maintain that C, update it as soon as
a youtube-dl python file is updated because a site changed.

-- 
					    Gilles.


More information about the ffmpeg-devel mailing list