* [FFmpeg-devel] [PATCH 1/1] avformat/avio: add configuration options for IO_BUFFER_SIZE
@ 2025-03-11 11:44 joneyao6
2025-03-11 11:55 ` Nicolas George
0 siblings, 1 reply; 8+ messages in thread
From: joneyao6 @ 2025-03-11 11:44 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Jingwei Yao
From: Jingwei Yao <joneyao6@gmail.com>
Signed-off-by: Jingwei Yao <joneyao6@gmail.com>
---
configure | 6 ++++++
libavformat/aviobuf.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 04b83a8868..8ee33a4ba9 100755
--- a/configure
+++ b/configure
@@ -437,6 +437,7 @@ Advanced options (experts only):
disable buffer boundary checking in bitreaders
(faster, but may crash)
--sws-max-filter-size=N the max filter size swscale uses [$sws_max_filter_size_default]
+ --avio-buffer-size=N the max buffer size aviobuf uses [$avio_buffer_size_default]
Optimization options (experts only):
--disable-asm disable all assembly optimizations
@@ -2693,6 +2694,7 @@ CMDLINE_SET="
arch
as
assert_level
+ avio_buffer_size
build_suffix
cc
objcc
@@ -4181,6 +4183,9 @@ enable valgrind_backtrace
sws_max_filter_size_default=256
set_default sws_max_filter_size
+avio_buffer_size_default=32768
+set_default avio_buffer_size
+
# internal components are enabled by default
enable $EXTRALIBS_LIST
@@ -8259,6 +8264,7 @@ cat > $TMPH <<EOF
#define BUILDSUF "$build_suffix"
#define SLIBSUF "$SLIBSUF"
#define SWS_MAX_FILTER_SIZE $sws_max_filter_size
+#define AVIO_BUFFER_SIZE $avio_buffer_size
EOF
test -n "$assert_level" &&
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 6a74c1ce68..7760c34ec9 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -33,7 +33,7 @@
#include "internal.h"
#include <stdarg.h>
-#define IO_BUFFER_SIZE 32768
+#define IO_BUFFER_SIZE AVIO_BUFFER_SIZE
/**
* Do seeks within this distance ahead of the current buffer by skipping
--
2.25.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] 8+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/1] avformat/avio: add configuration options for IO_BUFFER_SIZE
2025-03-11 11:44 [FFmpeg-devel] [PATCH 1/1] avformat/avio: add configuration options for IO_BUFFER_SIZE joneyao6
@ 2025-03-11 11:55 ` Nicolas George
2025-03-13 9:40 ` 姚靖威
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas George @ 2025-03-11 11:55 UTC (permalink / raw)
To: FFmpeg development discussions and patches
joneyao6@gmail.com (HE12025-03-11):
> From: Jingwei Yao <joneyao6@gmail.com>
>
> Signed-off-by: Jingwei Yao <joneyao6@gmail.com>
> ---
> configure | 6 ++++++
> libavformat/aviobuf.c | 2 +-
> 2 files changed, 7 insertions(+), 1 deletion(-)
Thanks for the patch. It is missing the explanations about why.
Regards,
--
Nicolas George
_______________________________________________
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] 8+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/1] avformat/avio: add configuration options for IO_BUFFER_SIZE
2025-03-11 11:55 ` Nicolas George
@ 2025-03-13 9:40 ` 姚靖威
2025-03-13 10:25 ` Zhao Zhili
2025-03-13 12:56 ` Nicolas George
0 siblings, 2 replies; 8+ messages in thread
From: 姚靖威 @ 2025-03-13 9:40 UTC (permalink / raw)
To: FFmpeg development discussions and patches
The purpose of this patch is to modify the default buffer size of the avio
module during compilation.
On some resource-constrained devices to save memory, the current default
value (32K), it can also be set to a smaller value.
Nicolas George <george@nsup.org> 于2025年3月11日周二 19:55写道:
> joneyao6@gmail.com (HE12025-03-11):
> > From: Jingwei Yao <joneyao6@gmail.com>
> >
> > Signed-off-by: Jingwei Yao <joneyao6@gmail.com>
> > ---
> > configure | 6 ++++++
> > libavformat/aviobuf.c | 2 +-
> > 2 files changed, 7 insertions(+), 1 deletion(-)
>
> Thanks for the patch. It is missing the explanations about why.
>
> Regards,
>
> --
> Nicolas George
> _______________________________________________
> 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] 8+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/1] avformat/avio: add configuration options for IO_BUFFER_SIZE
2025-03-13 9:40 ` 姚靖威
@ 2025-03-13 10:25 ` Zhao Zhili
2025-03-13 11:30 ` 姚靖威
2025-03-13 12:56 ` Nicolas George
1 sibling, 1 reply; 8+ messages in thread
From: Zhao Zhili @ 2025-03-13 10:25 UTC (permalink / raw)
To: FFmpeg development discussions and patches
> On Mar 13, 2025, at 17:40, 姚靖威 <joneyao6@gmail.com> wrote:
>
> The purpose of this patch is to modify the default buffer size of the avio
> module during compilation.
> On some resource-constrained devices to save memory, the current default
> value (32K), it can also be set to a smaller value.
Which protocol? And what’s the value used to replace the default 32KB?
>
> Nicolas George <george@nsup.org> 于2025年3月11日周二 19:55写道:
>
>> joneyao6@gmail.com (HE12025-03-11):
>>> From: Jingwei Yao <joneyao6@gmail.com>
>>>
>>> Signed-off-by: Jingwei Yao <joneyao6@gmail.com>
>>> ---
>>> configure | 6 ++++++
>>> libavformat/aviobuf.c | 2 +-
>>> 2 files changed, 7 insertions(+), 1 deletion(-)
>>
>> Thanks for the patch. It is missing the explanations about why.
>>
>> Regards,
>>
>> --
>> Nicolas George
>> _______________________________________________
>> 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".
_______________________________________________
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] 8+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/1] avformat/avio: add configuration options for IO_BUFFER_SIZE
2025-03-13 10:25 ` Zhao Zhili
@ 2025-03-13 11:30 ` 姚靖威
2025-03-13 12:50 ` Zhao Zhili
0 siblings, 1 reply; 8+ messages in thread
From: 姚靖威 @ 2025-03-13 11:30 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 2117 bytes --]
protocols like local socket and local file. In our product, I set
avio-buffer-size
value to 1024 in order to reduce memory.The OS we use is based on nuttx, it
can be used in very small resource chips.
[image: image.png]
Zhao Zhili <quinkblack-at-foxmail.com@ffmpeg.org> 于2025年3月13日周四 18:26写道:
>
>
> > On Mar 13, 2025, at 17:40, 姚靖威 <joneyao6@gmail.com> wrote:
> >
> > The purpose of this patch is to modify the default buffer size of the
> avio
> > module during compilation.
> > On some resource-constrained devices to save memory, the current default
> > value (32K), it can also be set to a smaller value.
>
> Which protocol? And what’s the value used to replace the default 32KB?
>
> >
> > Nicolas George <george@nsup.org> 于2025年3月11日周二 19:55写道:
> >
> >> joneyao6@gmail.com (HE12025-03-11):
> >>> From: Jingwei Yao <joneyao6@gmail.com>
> >>>
> >>> Signed-off-by: Jingwei Yao <joneyao6@gmail.com>
> >>> ---
> >>> configure | 6 ++++++
> >>> libavformat/aviobuf.c | 2 +-
> >>> 2 files changed, 7 insertions(+), 1 deletion(-)
> >>
> >> Thanks for the patch. It is missing the explanations about why.
> >>
> >> Regards,
> >>
> >> --
> >> Nicolas George
> >> _______________________________________________
> >> 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".
>
> _______________________________________________
> 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".
>
[-- Attachment #1.2: image.png --]
[-- Type: image/png, Size: 10477 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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] 8+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/1] avformat/avio: add configuration options for IO_BUFFER_SIZE
2025-03-13 11:30 ` 姚靖威
@ 2025-03-13 12:50 ` Zhao Zhili
2025-03-13 16:24 ` 姚靖威
0 siblings, 1 reply; 8+ messages in thread
From: Zhao Zhili @ 2025-03-13 12:50 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Mar 13, 2025, at 19:30, 姚靖威 <joneyao6@gmail.com> wrote:
>
> protocols like local socket and local file. In our product, I set
> avio-buffer-size
> value to 1024 in order to reduce memory.The OS we use is based on nuttx, it
> can be used in very small resource chips.
How about runtime option like this?
https://ffmpeg.org/pipermail/ffmpeg-devel/2025-March/341107.html
Please don’t top-posting.
>
> [image: image.png]
>
>
> Zhao Zhili <quinkblack-at-foxmail.com@ffmpeg.org> 于2025年3月13日周四 18:26写道:
>
>>
>>
>>> On Mar 13, 2025, at 17:40, 姚靖威 <joneyao6@gmail.com> wrote:
>>>
>>> The purpose of this patch is to modify the default buffer size of the
>> avio
>>> module during compilation.
>>> On some resource-constrained devices to save memory, the current default
>>> value (32K), it can also be set to a smaller value.
>>
>> Which protocol? And what’s the value used to replace the default 32KB?
>>
>>>
>>> Nicolas George <george@nsup.org> 于2025年3月11日周二 19:55写道:
>>>
>>>> joneyao6@gmail.com (HE12025-03-11):
>>>>> From: Jingwei Yao <joneyao6@gmail.com>
>>>>>
>>>>> Signed-off-by: Jingwei Yao <joneyao6@gmail.com>
>>>>> ---
>>>>> configure | 6 ++++++
>>>>> libavformat/aviobuf.c | 2 +-
>>>>> 2 files changed, 7 insertions(+), 1 deletion(-)
>>>>
>>>> Thanks for the patch. It is missing the explanations about why.
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Nicolas George
>>>> _______________________________________________
>>>> 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".
>>
>> _______________________________________________
>> 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".
>>
>
> <image.png>_______________________________________________
> 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] 8+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/1] avformat/avio: add configuration options for IO_BUFFER_SIZE
2025-03-13 9:40 ` 姚靖威
2025-03-13 10:25 ` Zhao Zhili
@ 2025-03-13 12:56 ` Nicolas George
1 sibling, 0 replies; 8+ messages in thread
From: Nicolas George @ 2025-03-13 12:56 UTC (permalink / raw)
To: FFmpeg development discussions and patches
姚靖威 (HE12025-03-13):
> The purpose of this patch is to modify the default buffer size of the avio
> module during compilation.
No, that is not the purpose, that is only what it does.
> On some resource-constrained devices to save memory, the current default
> value (32K), it can also be set to a smaller value.
THAT is the purpose. And it needs to go into the commit message.
> Nicolas George <george@nsup.org> 于2025年3月11日周二 19:55写道:
Top-posting is forbidden on this list; if you do not know what it means
look it up.
Regards,
--
Nicolas George
_______________________________________________
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] 8+ messages in thread
end of thread, other threads:[~2025-03-13 16:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-11 11:44 [FFmpeg-devel] [PATCH 1/1] avformat/avio: add configuration options for IO_BUFFER_SIZE joneyao6
2025-03-11 11:55 ` Nicolas George
2025-03-13 9:40 ` 姚靖威
2025-03-13 10:25 ` Zhao Zhili
2025-03-13 11:30 ` 姚靖威
2025-03-13 12:50 ` Zhao Zhili
2025-03-13 16:24 ` 姚靖威
2025-03-13 12:56 ` Nicolas George
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git