[FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg_opt: add a stream_group_script option

James Almer jamrial at gmail.com
Mon Jan 8 03:44:32 EET 2024


On 1/7/2024 10:43 PM, Steven Liu wrote:
> James Almer <jamrial at gmail.com> 于2024年1月8日周一 05:31写道:
> Hi James,
>>
>> Similar to filter_complex_script. Should make setting stream groups
>> easier.
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>>   fftools/ffmpeg_mux_init.c | 2 +-
>>   fftools/ffmpeg_opt.c      | 3 +++
>>   2 files changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
>> index 80109df0ae..1b42ac9a1d 100644
>> --- a/fftools/ffmpeg_mux_init.c
>> +++ b/fftools/ffmpeg_mux_init.c
>> @@ -2301,7 +2301,7 @@ static int of_add_groups(Muxer *mux, const OptionsContext *o)
>>           char *str, *ptr = NULL;
>>           int ret = 0;
>>
>> -        str = av_strdup(o->stream_groups.opt[i].u.str);
>> +        str = av_strireplace(o->stream_groups.opt[i].u.str, "\n", "");
>>           if (!str)
>>               return ret;
>>
>> diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
>> index 7ae1b55cf0..7347fcbd31 100644
>> --- a/fftools/ffmpeg_opt.c
>> +++ b/fftools/ffmpeg_opt.c
>> @@ -1508,6 +1508,9 @@ const OptionDef options[] = {
>>       { "stream_group",           OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT,
>>           { .off = OFFSET(stream_groups) },
>>           "add stream group with specified streams and group type-specific arguments", "id=number:st=number..." },
>> +    { "stream_group_script",           OPT_TYPE_FILE, OPT_SPEC | OPT_OUTPUT,
> added documentation about this option yet?

Will add before pushing.

>> +        { .off = OFFSET(stream_groups) },
>> +        "read stream group with specified streams and group type-specific arguments from a file", "filename" },
>>       { "dframes",                OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_PERFILE | OPT_EXPERT | OPT_OUTPUT | OPT_HAS_CANON,
>>           { .func_arg = opt_data_frames },
>>           "set the number of data frames to output", "number",
>> --
>> 2.43.0
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 
> Thanks
> Steven
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list