Re: [FFmpeg-devel] [PATCH v2] fftools/ffmpeg: accelerate seeking while reading input at native frame rate

2021-07-06 Thread Linjie Fu
On Sun, Jul 4, 2021 at 10:50 PM Linjie Fu wrote: > > From: Linjie Fu > > Skip the logic of frame rate emulation until the input reaches the > specified start time. > > Test CMD: >$ffmpeg -re -ss 30 -i input.mp4 -pix_fmt yuv420p -f sdl2 - > > Before the patch: > first time to got frame, it tak

Re: [FFmpeg-devel] [PATCH] avpacket: ABI bump additions

2021-07-06 Thread Lynne
6 Jul 2021, 21:57 by c...@passwd.hu: > > > On Tue, 6 Jul 2021, Lynne wrote: > >> 3 Jun 2021, 06:58 by d...@lynne.ee: >> >>> Apr 26, 2021, 03:27 by andreas.rheinha...@outlook.com: >>> Lynne: > From 097aed2ac33dda0bb2052d8b0402711ce95079ba Mon Sep 17 00:00:00 2001 > From: Lynne >>

Re: [FFmpeg-devel] [PATCH] avpacket: ABI bump additions

2021-07-06 Thread Marton Balint
On Tue, 6 Jul 2021, Lynne wrote: 3 Jun 2021, 06:58 by d...@lynne.ee: Apr 26, 2021, 03:27 by andreas.rheinha...@outlook.com: Lynne: From 097aed2ac33dda0bb2052d8b0402711ce95079ba Mon Sep 17 00:00:00 2001 From: Lynne Date: Sat, 23 Jan 2021 19:56:18 +0100 Subject: [PATCH] avpacket: ABI bum

Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: Fix handling of huge default durations

2021-07-06 Thread Michael Niedermayer
On Mon, Jul 05, 2021 at 08:32:30PM +0200, Michael Niedermayer wrote: > Fixes: negation of -9223372036854775808 cannot be represented in type > 'int64_t' (aka 'long'); cast to an unsigned type to negate this value to > itself > Fixes: > 33997/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MA

Re: [FFmpeg-devel] [PATCH v2 3/9] avcodec/av1dec: support setup shear process

2021-07-06 Thread Henrik Gramner
On Mon, Jul 5, 2021 at 4:32 AM Fei Wang wrote: > +int64_t v, w; > +int32_t *param = &s->cur_frame.gm_params[idx][0]; ... > +v = param[4] * (1 << AV1_WARPEDMODEL_PREC_BITS); > +w = param[3] * param[4]; Possible integer overflow? Might need some int64_t casting before the mu

Re: [FFmpeg-devel] [PATCH] avformat/oggparsevorbis: Update end_trimming for the last packet

2021-07-06 Thread Guangyu Sun
On Tue, Jul 6, 2021 at 1:15 AM Lynne wrote: > > 6 Jul 2021, 08:02 by sunguangy...@gmail.com: > > > On Mon, Jun 21, 2021 at 9:06 AM Guangyu Sun wrote: > > > >> > >> From: Guangyu Sun > >> > >> Without end_trimming, the last packet will contain unexpected samples used > >> for padding. > >> > >> T

Re: [FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: move maximum variables into function

2021-07-06 Thread Michael Niedermayer
On Tue, Jul 06, 2021 at 06:08:01PM +0200, Michael Niedermayer wrote: > This fixes an issue when multiple cases are fuzzed in a single run and > the limits are adjusted by more than the iteration limit. In that case > the adjusted limit leaked back into the global limit causing the > fuzzer to becom

[FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: move maximum variables into function

2021-07-06 Thread Michael Niedermayer
This fixes an issue when multiple cases are fuzzed in a single run and the limits are adjusted by more than the iteration limit. In that case the adjusted limit leaked back into the global limit causing the fuzzer to become ineffective after several iterations, MSS2 was affected by this for example

[FFmpeg-devel] Consulting Enquiry

2021-07-06 Thread Michael Scott
Hello I am emailing this mailing as per the instructions on https://ffmpeg.org/consulting.html. I am looking for a rough quote to provide the following functionality and advice in the context of short (10-120 second) videos. 1. The ability to overlay audio waveforms at a given position with b

[FFmpeg-devel] [PATCH v3 00/34] avdevice (mostly dshow) enhancements

2021-07-06 Thread Diederick Niehorster
This patch series implements a series of features, mostly enhancing the dshow avdevice, but also adding new functionality to avformat. This whole patchset enabled users of the FFmpeg API to fully query and control a dshow device, making FFmpeg a nice backend for any program that needs access to, e.

[FFmpeg-devel] [PATCH v3 34/34] avdevice/dshow: capabilities query also works on opened device

2021-07-06 Thread Diederick Niehorster
While the capabilities API is in principle meant to be used with an allocated format context belonging to an unopened device, small changes make it work for an opened dshow device as well. So hereby done. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 110 +

[FFmpeg-devel] [PATCH v3 33/34] avdevice/dshow: prevent NULL access

2021-07-06 Thread Diederick Niehorster
list_options true would crash when both a video and an audio device were specified as input. Crash would occur on line 1588 (in this new rev) because ctx->device_unique_name[otherDevType] would be NULL Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 3 ++- 1 file changed, 2 inserti

[FFmpeg-devel] [PATCH v3 32/34] Makefile/examples: cosmetics

2021-07-06 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- doc/examples/Makefile | 48 +-- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/doc/examples/Makefile b/doc/examples/Makefile index de707bb3ca..7988ed4226 100644 --- a/doc/examples/Makefile +++ b/doc/e

[FFmpeg-devel] [PATCH v3 31/34] doc/examples: adding device_get_capabilities example

2021-07-06 Thread Diederick Niehorster
This example also shows use of get_device_list API. Also improve capability API doc in avdevice.h: now point to this example instead of rough example code given in the header. Signed-off-by: Diederick Niehorster --- configure | 2 + doc/examples/.gitignore

[FFmpeg-devel] [PATCH v3 30/34] avformat: add avformat_alloc_input_context()

2021-07-06 Thread Diederick Niehorster
avformat_alloc_input_context function analogous to avformat_alloc_output_context2, except that it does not take a filename argument as guessing the format by just the filename does not make sense. avformat_alloc_input_context can be used e.g. with the avdevice capabilities API, which needs an alloc

[FFmpeg-devel] [PATCH v3 29/34] avdevice/dshow: cosmetics

2021-07-06 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 590a007073..f900e89988 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -963,6

[FFmpeg-devel] [PATCH v3 28/34] avdevice/dshow: implement capabilities API

2021-07-06 Thread Diederick Niehorster
This implements avdevice_capabilities_create and avdevice_capabilities_free for the dshow device. This enables configuration discovery of DirectShow devices through the API, which is important for my use case. It enables making proper GUIs presenting users with options, instead of asking them to d

[FFmpeg-devel] [PATCH v3 01/34] avdevice/dshow: implement option to use device video timestamps

2021-07-06 Thread Diederick Niehorster
The dshow avdevice ignores timestamps for video frames provided by the DirectShow device, instead using wallclock time, apparently because the implementer of this code had a device that provided unreliable timestamps. Me (and others) would like to use the device's timestamps. The new use_video_devi

[FFmpeg-devel] [PATCH v3 27/34] avdevice/dshow: when closing, set context fields back to zero

2021-07-06 Thread Diederick Niehorster
After the avdevice capabilities API is implemented, the format context may be reused after querying device capabilities in a later avformat_open_input call. To enable this reuse, after releasing resources, make sure to also set the corresponding pointers back to NULL. This correctly indicates their

[FFmpeg-devel] [PATCH v3 26/34] avdevice/dshow: move audio format helpers

2021-07-06 Thread Diederick Niehorster
Needs to be moved up in file for upcoming implementation of avdevice_capabilities_create. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/d

[FFmpeg-devel] [PATCH v3 25/34] avdevice: improve capabilities' option API

2021-07-06 Thread Diederick Niehorster
This adds avdevice_capabilities_get_class() to allow examining the capabilities that can be queried/set through the capabilities API, and avdevice_capabilities_bprint_num() which allows printing the value returned when querying a capability. These values (min_value and max_value of an AVOptionRange

[FFmpeg-devel] [PATCH v3 24/34] avdevice: change device capabilities option type

2021-07-06 Thread Diederick Niehorster
Changes fps option from AVRational to double. This since any device capability query results are returned in AVOptionRanges, which hold the value as doubles, which can't contain AVRationals. Also updated documentation of other capabilities, some had the wrong option type listed. micro version bum

[FFmpeg-devel] [PATCH v3 23/34] avdevice: Add internal helpers for querying device capabilities

2021-07-06 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- libavdevice/internal.h | 31 +++ libavdevice/utils.c| 48 ++ libavdevice/version.h | 2 +- 3 files changed, 80 insertions(+), 1 deletion(-) diff --git a/libavdevice/internal.h b/libavdev

[FFmpeg-devel] [PATCH v3 22/34] avutil/opt: document AVOptionRange min_value > max_value

2021-07-06 Thread Diederick Niehorster
AVOptionRange needs a way to encode that an option is not set. Here i provide a documentation solution. When a range is invalid (value_min > value_max), it should be considered unset/value not available. When querying a range of formats of an avdevice, sometimes for a given format the queried opti

[FFmpeg-devel] [PATCH v3 21/34] avdevice: capabilities API details no longer public

2021-07-06 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 2 +- libavdevice/avdevice.h | 28 +--- libavdevice/internal.h | 33 + libavdevice/version.h | 2 +- 4 files changed, 36 insertions(+), 29 deletions(-) diff --git a/libavde

[FFmpeg-devel] [PATCH v3 20/34] avdevice/avdevice: clean up avdevice_capabilities_create

2021-07-06 Thread Diederick Niehorster
Draw implementation in line with that of avdevice_list_devices Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 695b9143af..e66906e91b 100644 --- a/libav

[FFmpeg-devel] [PATCH v3 19/34] avdevice/avdevice: Revert "Deprecate AVDevice Capabilities API"

2021-07-06 Thread Diederick Niehorster
This reverts commit 4f49ca7bbc75a9db4cdf93f27f95a668c751f160. The next few patches clean up the API and implement this capability for avdevice/dshow. Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 71 ++ libavdevice/avdevice.h | 5 --- l

[FFmpeg-devel] [PATCH v3 18/34] avdevice/dshow: select format with extended color info

2021-07-06 Thread Diederick Niehorster
Some DirectShow devices (Logitech C920 webcam) expose each DirectShow format they support twice, once without and once with extended color information. During format selection, both match, this patch ensures that the format with extended color information is selected if it is available, else it fal

[FFmpeg-devel] [PATCH v3 17/34] avdevice/dshow: discover source color range/space/etc

2021-07-06 Thread Diederick Niehorster
Enabled discovering a DirectShow device's color range, space, primaries, transfer characteristics and chroma location, if the device exposes that information. Sets them in the stream's codecpars. Co-authored-by: Valerii Zapodovnikov Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c |

[FFmpeg-devel] [PATCH v3 16/34] avdevice/dshow: add config dialog command for crossbar and tv tuner

2021-07-06 Thread Diederick Niehorster
The "show config dialog" command message can now also trigger dialog boxes for the crossbar connecting pins filter the analog tuner audio / analog tuner filters. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 51 ++-- libavdevice/dshow_capture.h | 10

[FFmpeg-devel] [PATCH v3 15/34] avdevice/dshow: tv_tuner_audio_dialog cleanup missing

2021-07-06 Thread Diederick Niehorster
Cleanup was missing for when the show_analog_tv_tuner_audio_dialog is true. Signed-off-by: Diederick Niehorster --- libavdevice/dshow_crossbar.c | 4 1 file changed, 4 insertions(+) diff --git a/libavdevice/dshow_crossbar.c b/libavdevice/dshow_crossbar.c index 2438683cde..961defe690 100644

[FFmpeg-devel] [PATCH v3 14/34] avdevice/dshow: accept show config dialog control message

2021-07-06 Thread Diederick Niehorster
DirectShow source will pop up its configuration dialog when AV_APP_TO_DEV_CONFIG is received. Implementation for several other possible configuration dialogs is more involved and will be provided in the next commit. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 29 +++

[FFmpeg-devel] [PATCH v3 13/34] avdevice: adding control message requesting to show config dialog

2021-07-06 Thread Diederick Niehorster
This control message can be used to programmatically ask a device to show one of its configuration dialogs. Adding documentation of this message's int argument. Bumping avdevice version. Signed-off-by: Diederick Niehorster --- doc/indevs.texi| 34 ++ lib

[FFmpeg-devel] [PATCH v3 12/34] avdevice/dshow: implement control_message interface

2021-07-06 Thread Diederick Niehorster
This allows programmatic users of avdevice to start and stop the DirectShow Capture graph (i.e. receive frames or not). This is important because now the buffer fills up and starts dropping samples when enqueued packets are not read out immediately after the demuxer is opened. Signed-off-by: Diede

[FFmpeg-devel] [PATCH v3 11/34] avformat: add control_message function to AVInputFormat

2021-07-06 Thread Diederick Niehorster
Control messages are useful for programmatic control of not only outdevs but also indevs. Bumping avformat version. Signed-off-by: Diederick Niehorster --- libavdevice/avdevice.c | 8 +--- libavformat/avformat.h | 6 ++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib

[FFmpeg-devel] [PATCH v3 10/34] fftools: provide media type info for devices

2021-07-06 Thread Diederick Niehorster
fftools now print info about what media type(s), if any, are provided by sink and source avdevices. Signed-off-by: Diederick Niehorster --- fftools/cmdutils.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmd

[FFmpeg-devel] [PATCH v3 09/34] avdevice/dshow: add media type info to get_device_list

2021-07-06 Thread Diederick Niehorster
The list returned by get_device_list now contains info about what media type(s), if any, can be provided by each device. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 8e693875

[FFmpeg-devel] [PATCH v3 08/34] avdevice: add info about media types(s) to AVDeviceInfo

2021-07-06 Thread Diederick Niehorster
An avdevice, regardless of whether its category says its an audio or video device, may provide access to devices providing different media types, or even single devices providing multiple media types. Also, some devices may provide no media types. dshow is an example encompassing all of these cases

[FFmpeg-devel] [PATCH v3 07/34] avdevice/dshow: list_devices: show media type(s) per device

2021-07-06 Thread Diederick Niehorster
the list_devices option of dshow didn't indicate whether a specific device provides audio or video output. This patch iterates through all media formats of all pins exposed by the device to see what types it provides for capture, and prints this to the console for each device. Importantly, this now

[FFmpeg-devel] [PATCH v3 06/34] avdevice/dshow: implement get_device_list

2021-07-06 Thread Diederick Niehorster
Needed to enable programmatic discovery of DirectShow devices Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 80 + 1 file changed, 73 insertions(+), 7 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 389daa6380.

[FFmpeg-devel] [PATCH v3 05/34] avdevice/dshow: set no-seek flags

2021-07-06 Thread Diederick Niehorster
avdevice/dshow is a realtime device and as such does not support seeking. Therefore, its demuxer format should define the AVFMT_NOBINSEARCH, AVFMT_NOGENSEARCH and AVFMT_NO_BYTE_SEEK flags. With these flags set, attempting to seek (with, e.g., avformat_seek_file()) correctly yields -1 (operation not

[FFmpeg-devel] [PATCH v3 04/34] avdevice/dshow: handle unknown sample time

2021-07-06 Thread Diederick Niehorster
GetTime may return an error indication that the sample has not timestamps, or may return a NULL start time. In those cases, fall back to graph time. Better debug message in case sample dropped: could now be audio or video frame Signed-off-by: Diederick Niehorster --- libavdevice/dshow_pin.c | 19

[FFmpeg-devel] [PATCH v3 03/34] avdevice/dshow: query graph and sample time only once

2021-07-06 Thread Diederick Niehorster
No need to query twice, use value we've already unconditionally got. Improve variable names Signed-off-by: Diederick Niehorster --- libavdevice/dshow_pin.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/libavdevice/dshow_pin.c b/libavdevice/dsh

[FFmpeg-devel] [PATCH v3 02/34] avdevice/dshow: add use_video_device_timestamps to docs

2021-07-06 Thread Diederick Niehorster
Signed-off-by: Diederick Niehorster --- doc/indevs.texi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/indevs.texi b/doc/indevs.texi index b377924c2f..685b1357a6 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -611,6 +611,12 @@ Save the currently used video capture filter dev

Re: [FFmpeg-devel] [PATCH] avformat/oggparsevorbis: Update end_trimming for the last packet

2021-07-06 Thread Lynne
6 Jul 2021, 08:02 by sunguangy...@gmail.com: > On Mon, Jun 21, 2021 at 9:06 AM Guangyu Sun wrote: > >> >> From: Guangyu Sun >> >> Without end_trimming, the last packet will contain unexpected samples used >> for padding. >> >> This commit partially fixes #6367 when the audio length is long enoug