Message ID | 20240107213100.16205-3-jamrial@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/4] avformat/iamfenc: don't write empty packets | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
James Almer <jamrial@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@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? > + { .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@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". Thanks Steven
On 1/7/2024 10:43 PM, Steven Liu wrote: > James Almer <jamrial@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@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@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> To unsubscribe, visit link above, or email >> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > > Thanks > Steven > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
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, + { .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",
Similar to filter_complex_script. Should make setting stream groups easier. Signed-off-by: James Almer <jamrial@gmail.com> --- fftools/ffmpeg_mux_init.c | 2 +- fftools/ffmpeg_opt.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)