[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

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

2025-02-05 Thread Jack Lau via ffmpeg-devel
From: Jack Lau 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` calcul

[FFmpeg-devel] [PATCH] avformat/hls: fix typo There is an extra space in the original comment

2025-02-09 Thread Jack Lau via ffmpeg-devel
--- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 3bdc1bc848..c2130bb883 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1993,7 +1993,7 @@ static int hls_read_header(AVFormatContext *s) return r

[FFmpeg-devel] [PATCH] avformat/mpegenc: increase the default size of the VBV buffer

2025-02-08 Thread Jack Lau via ffmpeg-devel
Increase the default buffer size to match more modern encoding scenarios. --- libavformat/mpegenc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 6b6763c30f..2b3b98b894 100644 --- a/libavformat/mpegenc.c +++ b/libavform

[FFmpeg-devel] [PATCH] avformat/hlsenc: fix CODECS Attribute hard code in hevc EXT-X-STREAM-INF

2025-03-02 Thread Jack Lau via ffmpeg-devel
fix ticket: 10786 parse the SPS from extradata and get profile_compatibility, tier, constraints which was been hard code before. HEVC CODECS Attribute reference to: ISO/IEC14496-15 Signed-off-by: Jack Lau --- libavformat/hlsenc.c | 41 ++--- 1 file changed, 3

[FFmpeg-devel] [PATCH] avformat/hlsenc: fix CODECS Attribute hard code in hevc EXT-X-STREAM-INF

2025-03-02 Thread Jack Lau via ffmpeg-devel
fix ticket: 10786 parse the SPS from extradata and get profile_compatibility, tier, constraints which was been hard code before. HEVC CODECS Attribute reference to: ISO/IEC14496-15 Signed-off-by: Jack Lau --- libavformat/hlsenc.c | 38 +++--- 1 file changed, 35 i

[FFmpeg-devel] [PATCH] avformat/hlsenc: fix CODECS Attribute hard code in hevc EXT-X-STREAM-INF

2025-03-01 Thread Jack Lau via ffmpeg-devel
fix ticket: 10786 parse the SPS from extradata and get profile_compatibility, tier, constraints which was been hard code before. HEVC CODECS Attribute reference to: ISO/IEC14496-15 Signed-off-by: Jack Lau --- libavformat/hlsenc.c | 37 ++--- 1 file changed, 34 in

[FFmpeg-devel] [PATCH] avformat/hlsenc: fix CODECS Attribute hard code in hevc EXT-X-STREAM-INF

2025-03-02 Thread Jack Lau via ffmpeg-devel
fix ticket: 10786 parse the SPS from extradata and get profile_compatibility, tier, constraints which was been hard code before. HEVC CODECS Attribute reference to: ISO/IEC14496-15 Signed-off-by: Jack Lau --- libavformat/hlsenc.c | 38 +++--- 1 file changed, 35 i

[FFmpeg-devel] [PATCH] avformat/dashenc: add hevc codec attributes parse

2025-03-12 Thread Jack Lau via ffmpeg-devel
fix ticket: 11316 add set_hevc_codec_str function refer to hlsenc.c but do some necessary changes Signed-off-by: Jack Lau --- libavformat/dashenc.c | 81 +++ 1 file changed, 81 insertions(+) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index

[FFmpeg-devel] [PATCH] avformat/hlsenc: calculate bitrate for segments with duration < 0.5

2025-03-23 Thread Jack Lau via ffmpeg-devel
The previous code sets the bitrate to be calculated only when duration>0.5, which is obviously not general enough. In some scenarios, we may need to set hls_time<0.5, then the generated segments are all <0.5. At this time, because the bitrate is not calculated, max_bitrate is empty, and ff_hls_