[FFmpeg-devel] [PATCH] lavf/tee: add support for bitstream filtering

Nicolas George nicolas.george at normalesup.org
Wed Aug 7 19:39:16 CEST 2013


L'octidi 18 thermidor, an CCXXI, Stefano Sabatini a écrit :
> Elaborating more on this. I'd need to store the couples
> specifiers+filters in a dictionary (this destroys the specification
> order and is a bit more complicate to implement). I leave the design
> choice to the maintainer.

Sorry for the delay, I was assuming you wanted to rework the patch first.

To answer that point, I do not see why you would need to store anything in a
dictionary. I believe it can be done with something like that:

    while (entry = av_opt_get(options, "bsfs", IGNORE_SUFFIX)) {
	spec = entry->name + strlen("bsfs");
	for (i = 0; i < nb_streams; i++) {
	    if (stream matches stream specifier) {
		if (stream[i]->bsfs) {
		    av_log(WARNING, "Duplicate bsfs specification\n");
		    continue;
		}
		parse_bsfs(stream[i], entry->value);
	    }
	    entry->value = NULL;
	    av_opt_set(entry->name, NULL);
	}
    }

Now that I think on it, I see the added benefit of matching the syntax of
ffmpeg itself for specifying bitstream filters:

ffmpeg ... -bsfs:a mp3_header_compress,noise -bsfs:v noise,mjpeg2jpeg ...

and not:

ffmpeg ... -bsfs mp3_header_compress:a,noise,mjpeg2jpeg:v ...

It is a little more verbose when some filters are common to all streams and
some are not, but I also believe it makes it less readable.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130807/23451b93/attachment.asc>


More information about the ffmpeg-devel mailing list