[FFmpeg-devel] [PATCH] ffmpeg: implement input file stream disabling

Michael Niedermayer michael at niedermayer.cc
Thu Dec 13 01:50:18 EET 2018


On Thu, Dec 13, 2018 at 01:20:22AM +0530, Gyan wrote:
> 
> On 13-12-2018 12:50 AM, Michael Niedermayer wrote:
> >On Wed, Dec 12, 2018 at 10:25:46AM +0530, Gyan wrote:
> >>On 12-12-2018 03:40 AM, Michael Niedermayer wrote:
> >>>On Mon, Dec 10, 2018 at 08:57:44PM +0530, Gyan wrote:
> >>>>At Michael's suggestion, this patch lets -vn/-an/-sn/-dn work for input
> >>>>files. Individual streams can still be let through e.g.
> >>>>
> >>>>     ffmpeg -an -discard:a:1 none -i file ...
> >>>>
> >>>>will let (only) the 2nd audio stream be seen during stream selection and
> >>>>filtergraph construction.
> >>>>
> >>>>Thanks,
> >>>>Gyan
> >>>>  ffmpeg_filter.c |    7 +++++++
> >>>>  ffmpeg_opt.c    |   17 +++++++++++++++++
> >>>>  2 files changed, 24 insertions(+)
> >>>>212c7bcecbd62329f3f18893c71f464ebeee3b67  0001-ffmpeg-implement-input-file-stream-disabling.patch
> >>>> From 9823a71f2055f2c4c4484536291bbd2afee36a81 Mon Sep 17 00:00:00 2001
> >>>>From: Gyan Doshi <ffmpeg at gyani.pro>
> >>>>Date: Mon, 10 Dec 2018 20:38:20 +0530
> >>>>Subject: [PATCH] ffmpeg: implement input file stream disabling
> >>>>
> >>>>-vn/-an/-sn/-dn can be set to stop processing of streams
> >>>>of said type from an input file.
> >>>isnt this 2 seperate changes ?
> >>>one is adding -vn/-an/-sn/-dn input support and the other is fixing some input
> >>>discard issues related to existing -discard functionality
> >>
> >>Only one change. I provided an example command syntax to show how to
> >>selectively enable streams while leaving others of the same type disabled.
> >You misunderstand me i think
> >patches should be split in self contained changes.
> >part of this patch adds support for -vn/-an/-sn/-dn
> >and other parts are fixing bugs
> >
> >the patch for example adds a error check for disabled filter inputs
> >using this example:
> >ffmpeg -discard all  -i tests/data/asynth-44100-1.wav -i tests/data/asynth-44100-1.wav -filter_complex '[0:a][1:a]amerge=inputs=2[aout]' -map '[aout]'  -f framecrc -
> >
> >This newly added code triggers and prints
> >"Stream specifier ':a' in filtergraph description [0:a][1:a]amerge=inputs=2[aout] matches a disabled input stream."
> >
> >before the patch the code did not error out.
> 
> Actually, I meant to catch and error out for scenarios like,
> 
>     ffmpeg -vn -i input -lavfi [0:v]filter output
> 
> Since there's only one variable to set discard state, it happens to error
> out your command as well. I didn't consider it a bug fix but as due
> diligence for this new 'feature'.
> 
> I can split this in two, if you like.
> 
> Anything else?

more spliting is better, yes
you know your changes better than i do, any self contained bugfix could be
split out. Or maybe all related bugfixes together if you dont want too many
one line patches

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you drop bombs on a foreign country and kill a hundred thousand
innocent people, expect your government to call the consequence
"unprovoked inhuman terrorist attacks" and use it to justify dropping
more bombs and killing more people. The technology changed, the idea is old.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20181213/1d9cea38/attachment.sig>


More information about the ffmpeg-devel mailing list