[FFmpeg-devel] [PATCH v2] examples/transcoding: Fix time_base handling

2025-02-04 Thread Jack Lau via ffmpeg-devel
The `dec_ctx->time_base` was incorrectly default set by avcodec_open2(), while `enc_ctx->time_base` was derived from `dec_ctx->framerate`. This mismatch could cause incorrect video duration in the output. This patch corrects the issue by adjusting the `enc_ctx->time_base` calculation to accoun

Re: [FFmpeg-devel] [PATCH v2] avfilter/xpsnr: avoid division by zero

2025-02-04 Thread Gyan Doshi
On 2025-02-02 11:27 pm, Gyan Doshi wrote: The ref input may have its frame rate unset, which would then lead to SIGFPE. So fall back to the main link frame rate. If that too is unset, default to 0. Related to #11428 Plan to push tomorrow. Regards, Gyan --- libavfilter/vf_xpsnr.c | 5 +

Re: [FFmpeg-devel] [PATCH] Replace broken Web IRC link

2025-02-04 Thread Gyan Doshi
On 2025-02-05 01:17 am, Gyan Doshi wrote: On 2025-02-04 11:58 pm, Marth64 wrote: Thank you Timo for removing the flag. Now users should be able to join correctly. Patch LGTM. I don't have access to merge to web. Will push tomorrow morning, if no one else has. Pushed as e99836bf11abbe38c

Re: [FFmpeg-devel] [PATCH] examples/transcoding: Fix time_base handling

2025-02-04 Thread Jack Lau
To be clear, i want to give an example, i use a 10s duration, 30fps video. The ifmt_ctx->streams[stream_index]->time_base is same as ofmt_ctx->streams[stream_index]->time_base after initializing. The stream->dec_ctx->time_base is default 0,60 but stream->enc_ctx->time_base is set to av_inv_q(dec_ct

Re: [FFmpeg-devel] [PATCH] examples/transcoding: Fix time_base handling

2025-02-04 Thread Jack Lau
> > AVCodecContext.time_base is not used for decoding. Thank you for your reply. I understand that time_base is not used during decoding, but the transcoding code calls av_packet_rescale_ts twice, once before decoding and once after encoding, as shown below: 540 if (filter_ctx[stream_

Re: [FFmpeg-devel] [PATCH] examples/transcoding: Fix time_base handling

2025-02-04 Thread Jack Lau
> > AVCodecContext.time_base is not used for decoding. Thank you for your reply. I understand that time_base is not used during decoding, but the transcoding code calls av_packet_rescale_ts twice, once before decoding and once after encoding, as shown below: 540 if (filter_ctx[stream_

[FFmpeg-devel] [PATCH] examples/transcoding: Fix time_base handling

2025-02-04 Thread Jack Lau
The `dec_ctx->time_base` was incorrectly default set to 0/60, while `enc_ctx->time_base` was derived from `dec_ctx->framerate`. This mismatch could cause incorrect video duration in the output. This patch aligns `enc_ctx->time_base` with `dec_ctx->time_base` to prevent rescaling issues and ens

Re: [FFmpeg-devel] [PATCH] examples/transcoding: Fix time_base handling

2025-02-04 Thread James Almer
From bfd5500a5448ad468d32994816e8a55c0d4a2428 Mon Sep 17 00:00:00 2001 From: Jack Lau Date: Tue, 4 Feb 2025 21:39:20 +0800 Subject: [PATCH] examples/transcoding: Fix time_base handling The `dec_ctx->time_base` was incorrectly default set to 0/60, while `enc_ctx->time_base` was derived from `dec

[FFmpeg-devel] [PATCH] examples/transcoding: Fix time_base handling

2025-02-04 Thread Jack Lau
fix-time-base-handling.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubs

[FFmpeg-devel] [PATCHv3] examples/transcoding: Fix time_base handling

2025-02-04 Thread Jack Lau
--- Begin Message --- From bfd5500a5448ad468d32994816e8a55c0d4a2428 Mon Sep 17 00:00:00 2001 From: Jack Lau Date: Tue, 4 Feb 2025 21:39:20 +0800 Subject: [PATCH] examples/transcoding: Fix time_base handling X-Unsent: 1 To: ffmpeg-devel@ffmpeg.org The `dec_ctx->time_base` was incorrectly default s

Re: [FFmpeg-devel] [PATCH v2 0/3] avcodec/hevc: Add alpha video decoding support

2025-02-04 Thread Timo Rothenpieler
On 03.02.2025 18:38, Zhao Zhili wrote: Hi Timo, You have added encoding support for hevc alpha video, may I invite you to help review the decoding support? I'm a bit busy with work at the moment, but I'll get to it. Don't have the most experience with that code, but I can at least give it a l

Re: [FFmpeg-devel] [PATCH 2/2] avformat/hls: .ts is always ok even if its a mov/mp4

2025-02-04 Thread Leo Izen
On 1/28/25 4:44 PM, Michael Niedermayer wrote: Hi On Tue, Jan 28, 2025 at 10:12:30PM +0200, Jan Ekström wrote: On Tue, Jan 28, 2025 at 4:24 PM Michael Niedermayer wrote: Maybe fixes: 11435 Do I understand correctly that the root issue that's being attempted to be fixed by the initial pa

Re: [FFmpeg-devel] [PATCH v2] lavc/videotoolboxenc: Add spatial_aq option

2025-02-04 Thread Martin Storsjö
On Mon, 16 Dec 2024, Dennis Sädtler via ffmpeg-devel wrote: From: Dennis Sädtler Added in macOS 15 "Sequoia". Signed-off-by: Dennis Sädtler --- Fixed line-endings, otherwise identical to v1. libavcodec/videotoolboxenc.c | 12 1 file changed, 12 insertions(+) diff --git a/libavc

[FFmpeg-devel] [PATCH 1/2] avcodec/decode: make ff_frame_new_side_data_from_buf behave like the function it's a wrapper for

2025-02-04 Thread James Almer
It's less confusing to have ff_frame_new_side_data_from_buf() be a drop in replacement for av_frame_side_data_add(), and the addition of the missing flags field will make it more versatile, as will be seen in the following commit. Signed-off-by: James Almer --- libavcodec/av1dec.c | 6 +++

[FFmpeg-devel] [PATCH 2/2] avcodec/hevc/hevcdec: simplify creating a new reference to HDR10 side data

2025-02-04 Thread James Almer
Signed-off-by: James Almer --- libavcodec/hevc/hevcdec.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index cf4062c75c..24d801c39f 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -30

[FFmpeg-devel] [PATCH 1/3] avfilter/delogo: add parameter to switch on circular delogo

2025-02-04 Thread Jörg Habenicht via ffmpeg-devel
Add a parameter (boolean) r to switch the area from rectangular (r=0) to circular(r=1) delogo. Signed-off-by: Jörg Habenicht --- libavfilter/vf_delogo.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index bfbf8e6f4c..

[FFmpeg-devel] [PATCH 3/3] avfilter/delogo: added the circular delogo algorithm

2025-02-04 Thread Jörg Habenicht via ffmpeg-devel
Use the corrected x,y,w,h values with boundaries and clipping to calculate the points inside the ellipse. Signed-off-by: Jörg Habenicht --- libavfilter/vf_delogo.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_delogo.c b/libavfil

[FFmpeg-devel] [PATCH 0/3] Patch to create a circular delogo area

2025-02-04 Thread Jörg Habenicht via ffmpeg-devel
Dear list, sorry for the previous posting. I noticed the lines got mangled. So here is a new try to get the patches right. Old text: I made a patch for the delogo filter. With this I can create a circular or elliptic zone to apply the delogo algorithm. The borders are defined with x,y,w,h parame

[FFmpeg-devel] [PATCH 2/3] avfilter/delogo: added circular delogo algorithm description

2025-02-04 Thread Jörg Habenicht via ffmpeg-devel
Added a description of the elliptic formed delogo algorithm. Placed it outside the doxygen function comment. Signed-off-by: Jörg Habenicht --- libavfilter/vf_delogo.c | 24 1 file changed, 24 insertions(+) diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c i

Re: [FFmpeg-devel] [PATCH] Replace broken Web IRC link

2025-02-04 Thread Gyan Doshi
On 2025-02-04 11:58 pm, Marth64 wrote: Thank you Timo for removing the flag. Now users should be able to join correctly. Patch LGTM. I don't have access to merge to web. Will push tomorrow morning, if no one else has. Regards, Gyan ___ ffmpeg-dev

Re: [FFmpeg-devel] [PATCH] Replace broken Web IRC link

2025-02-04 Thread Marth64
Thank you Timo for removing the flag. Now users should be able to join correctly. Patch LGTM. I don't have access to merge to web. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visi

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: add support for writing mastering metadata SEI messages

2025-02-04 Thread Timo Rothenpieler
On 04.02.2025 17:30, James Almer wrote: Including Mastering Display and Content Light Level. Requires SDK 13.0, and only supports HEVC and AV1. Signed-off-by: James Almer --- libavcodec/nvenc.c | 82 ++ libavcodec/nvenc.h | 2 ++ 2 files changed,

[FFmpeg-devel] [PATCH] avformat/dvdvideodec: fix seeking on multi-angle discs

2025-02-04 Thread Marth64
When seeking on multi-angle titles, libdvdnav does not lock on to the correct sectors initially as it seeks to find the right NAV packet. This manifests itself as two bugs: (1) When seeking on the first angle in a multi-angle segment, frames from another angle will appear (for example in intro or

[FFmpeg-devel] [PATCH] avcodec/nvenc: add support for writing mastering metadata SEI messages

2025-02-04 Thread James Almer
Including Mastering Display and Content Light Level. Requires SDK 13.0, and only supports HEVC and AV1. Signed-off-by: James Almer --- libavcodec/nvenc.c | 82 ++ libavcodec/nvenc.h | 2 ++ 2 files changed, 84 insertions(+) diff --git a/libavcodec/nv

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC

2025-02-04 Thread Timo Rothenpieler
On 04/02/2025 15:58, Zhao Zhili wrote: On Feb 4, 2025, at 22:00, Martin Storsjö wrote: On Tue, 4 Feb 2025, James Almer wrote: No, they don't need to match afaik. The headers are meant to be ABI backwards compatible (hence all the reserved fields). Right, then there's probably less concer

[FFmpeg-devel] [PATCH] examples/transcoding: Fix time_base handling

2025-02-04 Thread Jack Lau
The `dec_ctx->time_base` was incorrectly default set to 0/60, while `enc_ctx->time_base` was derived from `dec_ctx->framerate`. This mismatch could cause incorrect video duration in the output. This patch aligns `enc_ctx->time_base` with `dec_ctx->time_base` to prevent rescaling issues and ensu

[FFmpeg-devel] [PATCH] examples/transcoding: Fix time_base handling

2025-02-04 Thread Jack Lau
The `dec_ctx->time_base` was incorrectly default set to 0/60, while `enc_ctx->time_base` was derived from `dec_ctx->framerate`. This mismatch could cause incorrect video duration in the output. This patch aligns `enc_ctx->time_base` with `dec_ctx->time_base` to prevent rescaling issues and ensure

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC

2025-02-04 Thread Zhao Zhili
> On Feb 4, 2025, at 22:00, Martin Storsjö wrote: > > On Tue, 4 Feb 2025, James Almer wrote: > >> No, they don't need to match afaik. The headers are meant to be ABI >> backwards compatible (hence all the reserved fields). > > Right, then there's probably less concern about updating them. >

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC

2025-02-04 Thread Martin Storsjö
On Tue, 4 Feb 2025, James Almer wrote: No, they don't need to match afaik. The headers are meant to be ABI backwards compatible (hence all the reserved fields). Right, then there's probably less concern about updating them. I was just wondering if the headers were provided by your distro or n

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC

2025-02-04 Thread James Almer
On 2/4/2025 10:52 AM, Martin Storsjö wrote: On Tue, 4 Feb 2025, James Almer wrote: Thanks, this does indeed seem to fix compilation in my setup. Applied. Why don't don't just update the headers? Is it a system package provided by your distro? I guess I could, but as long as I don't have a

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC

2025-02-04 Thread Martin Storsjö
On Tue, 4 Feb 2025, James Almer wrote: Thanks, this does indeed seem to fix compilation in my setup. Applied. Why don't don't just update the headers? Is it a system package provided by your distro? I guess I could, but as long as I don't have a pressing need to, just staying with the cur

Re: [FFmpeg-devel] [PATCH] avformat/mov: Store trak > udta metadata on each stream

2025-02-04 Thread Martin Storsjö
Hi Rémi, On Wed, 15 Jan 2025, Rémi Bernon wrote: Some files keep extra metadata such as 'name' fields within udta, and it is useful for Wine to access them with the "export_all" option so they can then be exposed to Windows applications. Signed-off-by: Rémi Bernon --- libavformat/mov.c | 10 +

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC

2025-02-04 Thread James Almer
On 2/4/2025 10:38 AM, Martin Storsjö wrote: On Tue, 4 Feb 2025, James Almer wrote: Fixes compilation when using API headers older than 12.0 Signed-off-by: James Almer --- libavcodec/nvenc.c | 2 ++ libavcodec/nvenc.h | 5 + 2 files changed, 7 insertions(+) diff --git a/libavcodec/nvenc.c b

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC

2025-02-04 Thread Martin Storsjö
On Tue, 4 Feb 2025, James Almer wrote: Fixes compilation when using API headers older than 12.0 Signed-off-by: James Almer --- libavcodec/nvenc.c | 2 ++ libavcodec/nvenc.h | 5 + 2 files changed, 7 insertions(+) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index c359c2bc8a..eea3e8d

Re: [FFmpeg-devel] [FFmpeg-cvslog] avcodec/nvenc: Enable recovery point SEI for intra refresh mode

2025-02-04 Thread Martin Storsjö
On Tue, 4 Feb 2025, Timo Rothenpieler wrote: On 04/02/2025 13:25, Martin Storsjö wrote: On Mon, 3 Feb 2025, Zhao Zhili wrote: ffmpeg | branch: master | Zhao Zhili | Thu Jan 23 22:17:29 2025 +0800| [1438f6997db70945173f01aea1768e3b27ce2679] | committer: Zhao Zhili avcodec/nvenc: Enable rec

Re: [FFmpeg-devel] [FFmpeg-cvslog] avcodec/nvenc: Enable recovery point SEI for intra refresh mode

2025-02-04 Thread James Almer
On 2/4/2025 10:23 AM, Martin Storsjö wrote: On Tue, 4 Feb 2025, Timo Rothenpieler wrote: On 04/02/2025 13:25, Martin Storsjö wrote: On Mon, 3 Feb 2025, Zhao Zhili wrote: ffmpeg | branch: master | Zhao Zhili | Thu Jan 23 22:17:29 2025 +0800| [1438f6997db70945173f01aea1768e3b27ce2679] | comm

[FFmpeg-devel] [PATCH] avcodec/nvenc: add compile time check for outputRecoveryPointSEI for HEVC

2025-02-04 Thread James Almer
Fixes compilation when using API headers older than 12.0 Signed-off-by: James Almer --- libavcodec/nvenc.c | 2 ++ libavcodec/nvenc.h | 5 + 2 files changed, 7 insertions(+) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index c359c2bc8a..eea3e8d703 100644 --- a/libavcodec/nvenc.c +++

Re: [FFmpeg-devel] [FFmpeg-cvslog] avcodec/nvenc: Enable recovery point SEI for intra refresh mode

2025-02-04 Thread Timo Rothenpieler
On 04/02/2025 13:25, Martin Storsjö wrote: On Mon, 3 Feb 2025, Zhao Zhili wrote: ffmpeg | branch: master | Zhao Zhili | Thu Jan 23 22:17:29 2025 +0800| [1438f6997db70945173f01aea1768e3b27ce2679] | committer: Zhao Zhili avcodec/nvenc: Enable recovery point SEI for intra refresh mode Otherwi

[FFmpeg-devel] [PATCH v3 2/2] Add stream dump test with test for ogg/flac.

2025-02-04 Thread Romain Beauxis
This is the new FATE test. Test samples are available here: https://www.dropbox.com/scl/fo/fxt2edwkyj2mjc9qubku5/AICHxJyxMMAK8MIJqWLcvk4?rlkey=mlt12lsu741ejukz0p5qtn9rq&dl=0 Output prior to the changes is: Stream ID: 0, codec name: flac, metadata: encoder=Lavc61.19.100 flac:title=First Stream S

[FFmpeg-devel] [PATCH v3 0/2] Properly decode ogg metadata in ogg/flac chained bitstreams

2025-02-04 Thread Romain Beauxis
This is a series of 2 patches to allow proper decoding of ogg metadata in chained ogg/flac streams. ogg/flac streams are pretty important because there are perhaps the only combination of lossless audio codec and open-source container that allows for proper transmittion of lossless audio data accr

[FFmpeg-devel] [PATCH v3 1/2] Parse and process ogg/flac comments in chained bitstreams.

2025-02-04 Thread Romain Beauxis
libavformat/oggparseflac: Parse ogg/flac comments in new ogg packets, add them to ogg stream new_metadata. libavcodec/flacdec: Process AV_PKT_DATA_METADATA_UPDATE on new packets, add them as new metadata on the new decoded audio frame. --- libavcodec/flacdec.c | 20 +++- l

Re: [FFmpeg-devel] [FFmpeg-cvslog] avcodec/nvenc: Enable recovery point SEI for intra refresh mode

2025-02-04 Thread Martin Storsjö
On Mon, 3 Feb 2025, Zhao Zhili wrote: ffmpeg | branch: master | Zhao Zhili | Thu Jan 23 22:17:29 2025 +0800| [1438f6997db70945173f01aea1768e3b27ce2679] | committer: Zhao Zhili avcodec/nvenc: Enable recovery point SEI for intra refresh mode Otherwise all frames can be dropped after seek with

Re: [FFmpeg-devel] [PATCH v2 0/3] Properly decode ogg metadata in ogg/flac chained bitstreams

2025-02-04 Thread Romain Beauxis
Le mar. 4 févr. 2025 à 06:15, Romain Beauxis a écrit : > > This is a series of 3 patches to allow proper decoding of ogg metadata > in chained ogg/flac streams. > > ogg/flac streams are pretty important because there are perhaps the only > combination of lossless audio codec and open-source contai

Re: [FFmpeg-devel] [PATCH 2/2] avformat/hls: .ts is always ok even if its a mov/mp4

2025-02-04 Thread Kacper Michajlow
On Tue, 28 Jan 2025 at 22:44, Michael Niedermayer wrote: > > Hi > > On Tue, Jan 28, 2025 at 10:12:30PM +0200, Jan Ekström wrote: > > On Tue, Jan 28, 2025 at 4:24 PM Michael Niedermayer > > wrote: > > > > > > Maybe fixes: 11435 > > > > > > > Do I understand correctly that the root issue that's bei

[FFmpeg-devel] [PATCH v2 3/3] Add stream dump test with test for ogg/flac.

2025-02-04 Thread Romain Beauxis
This is the new FATE test. Test samples are available here: https://www.dropbox.com/scl/fo/fxt2edwkyj2mjc9qubku5/AICHxJyxMMAK8MIJqWLcvk4?rlkey=mlt12lsu741ejukz0p5qtn9rq&dl=0 Output prior to the changes is: Stream ID: 0, codec name: flac, metadata: encoder=Lavc61.19.100 flac:title=First Stream S

[FFmpeg-devel] [PATCH v2 2/3] libavcodec/flacdec: parse vorbis metadata from ogg packets, add them to the next decoded frame.

2025-02-04 Thread Romain Beauxis
This is the main patch. Parse ogg comments in ogg packets with comment, keep them in pending_metadata and copy them to the next decoded audio frame. --- libavcodec/flacdec.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.

[FFmpeg-devel] [PATCH v2 1/3] libavformat/oggdec: Allow first parameter in ff_vorbis_comment to be a generic AVClass struct

2025-02-04 Thread Romain Beauxis
Firt argument in these function is only used to pass to av_log. This makes it possible to re-use them with any type of AVClass struct. --- libavformat/oggdec.h | 5 - libavformat/oggparsevorbis.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libavformat/oggd

[FFmpeg-devel] [PATCH v2 0/3] Properly decode ogg metadata in ogg/flac chained bitstreams

2025-02-04 Thread Romain Beauxis
This is a series of 3 patches to allow proper decoding of ogg metadata in chained ogg/flac streams. ogg/flac streams are pretty important because there are perhaps the only combination of lossless audio codec and open-source container that allows for proper transmittion of lossless audio data accr

Re: [FFmpeg-devel] [PATCH v2 1/2] Parse ogg/flac header again after processing a new chained ogg bitstream.

2025-02-04 Thread Romain Beauxis
Le jeu. 30 janv. 2025 à 08:08, Romain Beauxis a écrit : > > > > > Le mer. 29 janv. 2025 à 17:40, Marvin Scholz a écrit : > > > > > > > > On 29 Jan 2025, at 15:40, Romain Beauxis wrote: > > > > > This patch makes sure that ogg/flac headers are parsed again when > > > encountering a new logic strea