* Re: [FFmpeg-devel] [PATCH] ffmpeg_opt: inform user about -b:a and -b:v instead of legacy form
2023-12-09 19:24 ` James Almer
@ 2023-12-09 19:32 ` Marth64
2023-12-10 1:46 ` [FFmpeg-devel] [PATCH] ffmpeg_opt: clarify that -ab is deprecated Marth64
2023-12-11 18:44 ` [FFmpeg-devel] [PATCH v2] " Marth64
2 siblings, 0 replies; 5+ messages in thread
From: Marth64 @ 2023-12-09 19:32 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Roger, will update. Thanks!
On Sat, Dec 9, 2023 at 1:25 PM James Almer <jamrial@gmail.com> wrote:
> On 12/9/2023 4:10 PM, Marth64 wrote:
> > ---
> > fftools/ffmpeg_opt.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
> > index 304471dd03..5e50e5efa2 100644
> > --- a/fftools/ffmpeg_opt.c
> > +++ b/fftools/ffmpeg_opt.c
> > @@ -1721,8 +1721,8 @@ const OptionDef options[] = {
> > { "force_key_frames", OPT_VIDEO | OPT_STRING | HAS_ARG |
> OPT_EXPERT |
> > OPT_SPEC | OPT_OUTPUT,
> { .off = OFFSET(forced_key_frames) },
> > "force key frames at specified timestamps", "timestamps" },
> > - { "b", OPT_VIDEO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT,
> { .func_arg = opt_bitrate },
> > - "video bitrate (please use -b:v)", "bitrate" },
> > + { "b:v", OPT_VIDEO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT,
> { .func_arg = opt_bitrate },
> > + "video bitrate", "bitrate" },
>
> "b" is for bitrate regardless of media type. The specifier that comes
> after it decides the type. You're probably breaking that by making "b"
> no longer be a valid option.
>
> IMO, change the description to "Stream bitrate".
>
> > { "hwaccel", OPT_VIDEO | OPT_STRING | HAS_ARG |
> OPT_EXPERT |
> > OPT_SPEC | OPT_INPUT,
> { .off = OFFSET(hwaccels) },
> > "use HW accelerated decoding", "hwaccel name" },
> > @@ -1762,8 +1762,8 @@ const OptionDef options[] = {
> > { "acodec", OPT_AUDIO | HAS_ARG | OPT_PERFILE |
> > OPT_INPUT | OPT_OUTPUT,
> { .func_arg = opt_audio_codec },
> > "force audio codec ('copy' to copy stream)", "codec" },
> > - { "ab", OPT_AUDIO | HAS_ARG | OPT_PERFILE |
> OPT_OUTPUT, { .func_arg = opt_bitrate },
> > - "audio bitrate (please use -b:a)", "bitrate" },
> > + { "b:a", OPT_AUDIO | HAS_ARG | OPT_PERFILE |
> OPT_OUTPUT, { .func_arg = opt_bitrate },
> > + "audio bitrate", "bitrate" },
>
> And this just removes "ab" altogether, which is a break with no previous
> warning. b:a already works thanks to "b" above.
>
> Just flag this option as deprecated.
>
> > { "atag", OPT_AUDIO | HAS_ARG | OPT_EXPERT |
> OPT_PERFILE |
> > OPT_OUTPUT,
> { .func_arg = opt_old2new },
> > "force audio tag/fourcc", "fourcc/tag" },
> _______________________________________________
> 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".
>
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [FFmpeg-devel] [PATCH] ffmpeg_opt: clarify that -ab is deprecated
2023-12-09 19:24 ` James Almer
2023-12-09 19:32 ` Marth64
@ 2023-12-10 1:46 ` Marth64
2023-12-11 18:44 ` [FFmpeg-devel] [PATCH v2] " Marth64
2 siblings, 0 replies; 5+ messages in thread
From: Marth64 @ 2023-12-10 1:46 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Marth64
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 304471dd03..837bef8161 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1722,7 +1722,7 @@ const OptionDef options[] = {
OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(forced_key_frames) },
"force key frames at specified timestamps", "timestamps" },
{ "b", OPT_VIDEO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_bitrate },
- "video bitrate (please use -b:v)", "bitrate" },
+ "stream bitrate (for video, please use -b:v)", "bitrate" },
{ "hwaccel", OPT_VIDEO | OPT_STRING | HAS_ARG | OPT_EXPERT |
OPT_SPEC | OPT_INPUT, { .off = OFFSET(hwaccels) },
"use HW accelerated decoding", "hwaccel name" },
@@ -1763,7 +1763,7 @@ const OptionDef options[] = {
OPT_INPUT | OPT_OUTPUT, { .func_arg = opt_audio_codec },
"force audio codec ('copy' to copy stream)", "codec" },
{ "ab", OPT_AUDIO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_bitrate },
- "audio bitrate (please use -b:a)", "bitrate" },
+ "audio bitrate (deprecated, please use -b:a)", "bitrate" },
{ "atag", OPT_AUDIO | HAS_ARG | OPT_EXPERT | OPT_PERFILE |
OPT_OUTPUT, { .func_arg = opt_old2new },
"force audio tag/fourcc", "fourcc/tag" },
--
2.34.1
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [FFmpeg-devel] [PATCH v2] ffmpeg_opt: clarify that -ab is deprecated
2023-12-09 19:24 ` James Almer
2023-12-09 19:32 ` Marth64
2023-12-10 1:46 ` [FFmpeg-devel] [PATCH] ffmpeg_opt: clarify that -ab is deprecated Marth64
@ 2023-12-11 18:44 ` Marth64
2 siblings, 0 replies; 5+ messages in thread
From: Marth64 @ 2023-12-11 18:44 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Marth64
Added v2 flag and signoff to follow process. Adjusted based on feedback.
Signed-off-by: Marth64 <marth64@proxyid.net>
---
fftools/ffmpeg_opt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 304471dd03..837bef8161 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1722,7 +1722,7 @@ const OptionDef options[] = {
OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(forced_key_frames) },
"force key frames at specified timestamps", "timestamps" },
{ "b", OPT_VIDEO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_bitrate },
- "video bitrate (please use -b:v)", "bitrate" },
+ "stream bitrate (for video, please use -b:v)", "bitrate" },
{ "hwaccel", OPT_VIDEO | OPT_STRING | HAS_ARG | OPT_EXPERT |
OPT_SPEC | OPT_INPUT, { .off = OFFSET(hwaccels) },
"use HW accelerated decoding", "hwaccel name" },
@@ -1763,7 +1763,7 @@ const OptionDef options[] = {
OPT_INPUT | OPT_OUTPUT, { .func_arg = opt_audio_codec },
"force audio codec ('copy' to copy stream)", "codec" },
{ "ab", OPT_AUDIO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_bitrate },
- "audio bitrate (please use -b:a)", "bitrate" },
+ "audio bitrate (deprecated, please use -b:a)", "bitrate" },
{ "atag", OPT_AUDIO | HAS_ARG | OPT_EXPERT | OPT_PERFILE |
OPT_OUTPUT, { .func_arg = opt_old2new },
"force audio tag/fourcc", "fourcc/tag" },
--
2.34.1
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread