[FFmpeg-cvslog] avfilter/trim: flag trim filter as metadata only
ffmpeg | branch: master | Gyan Doshi | Tue Jun 4 23:55:24 2024 +0530| [d55f5cba7b1fd362beb3b0322c5674016a85e859] | committer: Gyan Doshi avfilter/trim: flag trim filter as metadata only Similar to select filter for video - it can only pass through or drop frames > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d55f5cba7b1fd362beb3b0322c5674016a85e859 --- libavfilter/trim.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/trim.c b/libavfilter/trim.c index 4c1a2b4f48..4afc4c74bb 100644 --- a/libavfilter/trim.c +++ b/libavfilter/trim.c @@ -364,6 +364,7 @@ const AVFilter ff_vf_trim = { .activate= activate, .priv_size = sizeof(TrimContext), .priv_class = _class, +.flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(trim_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] configure: correct libopenjpeg description
ffmpeg | branch: master | Gyan Doshi | Fri May 31 21:17:43 2024 +0530| [2f184aa89be8b92846cbbec3407a88ec7862358b] | committer: Gyan Doshi configure: correct libopenjpeg description Decoding is no longer possible as the decoder wrapper was removed in 60ccb3fe78 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f184aa89be8b92846cbbec3407a88ec7862358b --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 96b181fd21..6c5b8aab9a 100755 --- a/configure +++ b/configure @@ -253,7 +253,7 @@ External library support: --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no] --enable-libopencv enable video filtering via libopencv [no] --enable-libopenh264 enable H.264 encoding via OpenH264 [no] - --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no] + --enable-libopenjpeg enable JPEG 2000 encoding via OpenJPEG [no] --enable-libopenmpt enable decoding tracked files via libopenmpt [no] --enable-libopenvino enable OpenVINO as a DNN module backend for DNN based filters like dnn_processing [no] ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/ivfenc: remove unused var
ffmpeg | branch: master | Gyan Doshi | Wed Apr 17 17:16:44 2024 +0530| [38c322681e9715b288172eaed1e90205aa46e969] | committer: Gyan Doshi avformat/ivfenc: remove unused var sum_delta_pts is unused since 3b358f151d > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=38c322681e9715b288172eaed1e90205aa46e969 --- libavformat/ivfenc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/ivfenc.c b/libavformat/ivfenc.c index 09782eecd6..9feaea3516 100644 --- a/libavformat/ivfenc.c +++ b/libavformat/ivfenc.c @@ -24,7 +24,7 @@ typedef struct IVFEncContext { unsigned frame_cnt; -uint64_t last_pts, sum_delta_pts, last_pkt_duration; +uint64_t last_pts, last_pkt_duration; } IVFEncContext; static int ivf_init(AVFormatContext *s) @@ -80,8 +80,6 @@ static int ivf_write_packet(AVFormatContext *s, AVPacket *pkt) avio_wl32(pb, pkt->size); avio_wl64(pb, pkt->pts); avio_write(pb, pkt->data, pkt->size); -if (ctx->frame_cnt) -ctx->sum_delta_pts += pkt->pts - ctx->last_pts; ctx->last_pkt_duration = pkt->duration; ctx->frame_cnt++; ctx->last_pts = pkt->pts; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] fate/lavf-container: correct operator; unbreak build
ffmpeg | branch: master | Gyan Doshi | Mon Mar 18 15:57:27 2024 +0530| [a32f75d6e2db530e4516e24d4a9704685832745a] | committer: Gyan Doshi fate/lavf-container: correct operator; unbreak build > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a32f75d6e2db530e4516e24d4a9704685832745a --- tests/fate/lavf-container.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate/lavf-container.mak b/tests/fate/lavf-container.mak index b18ed2362b..7a925117c3 100644 --- a/tests/fate/lavf-container.mak +++ b/tests/fate/lavf-container.mak @@ -80,7 +80,7 @@ FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MOV_DEMUXER LATM_MUXER) + FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MP3_DEMUXERMP3_MUXER) += mp3 FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MOV_DEMUXER MOV_MUXER ARESAMPLE_FILTER) += qtrle_mace6.mov FATE_LAVF_CONTAINER_FATE-$(call ALLYES, AVI_DEMUXER AVI_MUXER ARESAMPLE_FILTER) += cram.avi -FATE_LAVF_CONTAINER_FATE-$(call ALLYES, AVI_DEMUXERFLV_MUXER) + = hevc.flv +FATE_LAVF_CONTAINER_FATE-$(call ALLYES, AVI_DEMUXERFLV_MUXER) += hevc.flv FATE_LAVF_CONTAINER_FATE = $(FATE_LAVF_CONTAINER_FATE-yes:%=fate-lavf-fate-%) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/mpegtsenc: correct bitstream check
ffmpeg | branch: master | Gyan Doshi | Sat Mar 16 10:22:54 2024 +0530| [f5441e441f9b0d235e49bdccc69e141ccd92e854] | committer: Gyan Doshi avformat/mpegtsenc: correct bitstream check 8559cce3c3 made the bitstream check generic using a LUT. However, one of the comparisons which involves a bitwise AND and equality check is faulty due to operator precedence. First reported and analysed at https://github.com/streamlink/streamlink/issues/5876 Fixes #10908 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f5441e441f9b0d235e49bdccc69e141ccd92e854 --- libavformat/mpegtsenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 06e88e9879..b8efc535a7 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -2319,7 +2319,7 @@ static int mpegts_check_bitstream(AVFormatContext *s, AVStream *st, pkt->size >= 5 && AV_RB32(pkt->data) != 0x001 && (AV_RB24(pkt->data) != 0x01 || (st->codecpar->extradata_size > 0 && -(st->codecpar->extradata[0] & e->mask == e->value +((st->codecpar->extradata[0] & e->mask) == e->value return ff_stream_add_bitstream_filter(st, e->bsf_name, NULL); } return 1; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] configure: add threads dep for vulkan
ffmpeg | branch: master | Gyan Doshi | Tue Mar 12 10:02:37 2024 +0530| [9e8be937fc4933ade00a18578f8c1420006d4291] | committer: Gyan Doshi configure: add threads dep for vulkan Fixes #10900 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e8be937fc4933ade00a18578f8c1420006d4291 --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 05f8283af9..e0b5bcf589 100755 --- a/configure +++ b/configure @@ -3076,6 +3076,7 @@ nvdec_deps="ffnvcodec" vaapi_x11_deps="xlib_x11" videotoolbox_hwaccel_deps="videotoolbox pthreads" videotoolbox_hwaccel_extralibs="-framework QuartzCore" +vulkan_deps="threads" vulkan_deps_any="libdl LoadLibrary" av1_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_AV1" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter: update filter timeline state only on main link
ffmpeg | branch: master | Gyan Doshi | Fri Mar 1 19:21:52 2024 +0530| [3d1860ec8db7f9785bf1338e826138c0218dfb59] | committer: Gyan Doshi avfilter: update filter timeline state only on main link At present, consume_update evaluates timeline state on all links for a multi-input filter. This can lead to the filter being incorrectly en/dis-abled when evaluation on a frame on a secondary link leads to a different result than the frame on the current main link next in line for processing. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3d1860ec8db7f9785bf1338e826138c0218dfb59 --- libavfilter/avfilter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index c323ebb4b8..831871de90 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -1436,7 +1436,8 @@ static void consume_update(FilterLinkInternal *li, const AVFrame *frame) AVFilterLink *const link = >l; update_link_current_pts(li, frame->pts); ff_inlink_process_commands(link, frame); -link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame); +if (link == link->dst->inputs[0]) +link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame); link->frame_count_out++; link->sample_count_out += frame->nb_samples; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/libsvtav1: add version guard for external param
ffmpeg | branch: release/6.1 | Gyan Doshi | Wed Nov 8 10:33:19 2023 +0530| [25abb63bfc4f99d94124ccd7b80f1eec4a7e6f67] | committer: James Almer avcodec/libsvtav1: add version guard for external param Setting of external param 'force_key_frames' was added in 7bcc1b4eb8. It is available since v1.1.0 but ffmpeg allows linking against v0.9.0. (cherry picked from commit 67a2571a5547d39990e7f709f24d7a5b452ff8b9) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=25abb63bfc4f99d94124ccd7b80f1eec4a7e6f67 --- libavcodec/libsvtav1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 8d2c7f3be4..862192945b 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -250,6 +250,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, if (avctx->gop_size > 1) param->intra_period_length = avctx->gop_size - 1; +#if SVT_AV1_CHECK_VERSION(1, 1, 0) // In order for SVT-AV1 to force keyframes by setting pic_type to // EB_AV1_KEY_PICTURE on any frame, force_key_frames has to be set. Note // that this does not force all frames to be keyframes (it only forces a @@ -260,6 +261,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, // to be updated to set force_key_frames accordingly. if (avctx->gop_size == 1) param->force_key_frames = 1; +#endif if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { param->frame_rate_numerator = avctx->framerate.num; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] configure: select iamfenc as movenc dep
ffmpeg | branch: master | Gyan Doshi | Sat Feb 24 18:44:26 2024 +0530| [ecb3c8a536fc41f7c4cd02cd7de7822803faff64] | committer: James Almer configure: select iamfenc as movenc dep Unbreaks movenc compilation in minimal configuration. Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ecb3c8a536fc41f7c4cd02cd7de7822803faff64 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 197f762b58..2d0e6a444a 100755 --- a/configure +++ b/configure @@ -3554,7 +3554,7 @@ mlp_demuxer_select="mlp_parser" mmf_muxer_select="riffenc" mov_demuxer_select="iso_media riffdec iamfdec" mov_demuxer_suggest="zlib" -mov_muxer_select="iso_media riffenc rtpenc_chain vp9_superframe_bsf aac_adtstoasc_bsf ac3_parser" +mov_muxer_select="iso_media riffenc rtpenc_chain vp9_superframe_bsf aac_adtstoasc_bsf ac3_parser iamfenc" mp3_demuxer_select="mpegaudio_parser" mp3_muxer_select="mpegaudioheader" mp4_muxer_select="mov_muxer" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/wavenc: use strtoull for UMID conversion
ffmpeg | branch: master | Gyan Doshi | Mon Jan 29 10:44:06 2024 +0530| [7375a6ca7b4a4b223a71f85a772c64a34e60eabe] | committer: Gyan Doshi avformat/wavenc: use strtoull for UMID conversion Existing use of strtoll can lead to ERANGE errors leading to incorrect storage of UMID. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7375a6ca7b4a4b223a71f85a772c64a34e60eabe --- libavformat/wavenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c index 82acb9ef0f..a41f40b449 100644 --- a/libavformat/wavenc.c +++ b/libavformat/wavenc.c @@ -129,7 +129,7 @@ static void bwf_write_bext_chunk(AVFormatContext *s) for (i = 0; i < len/16; i++) { memcpy(umidpart_str, tmp_tag->value + 2 + (i*16), 16); -umidpart = strtoll(umidpart_str, NULL, 16); +umidpart = strtoull(umidpart_str, NULL, 16); avio_wb64(s->pb, umidpart); } ffio_fill(s->pb, 0, 64 - i*8); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/buffersrc: limit link variance logs below debug loglevel
ffmpeg | branch: master | Gyan Doshi | Fri Jan 26 19:50:08 2024 +0530| [94422871fce3b90bebc95f5cae939fbbc4e33224] | committer: Gyan Doshi avfilter/buffersrc: limit link variance logs below debug loglevel The video param change check will print loglines below debug level for each frame which is different from the inlink parameters. This can spam the console. It is now printed at warning level once for each param change else it is kept at debug level. Partially addresses #10823 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=94422871fce3b90bebc95f5cae939fbbc4e33224 --- libavfilter/buffersrc.c | 40 +++- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index afe69433b2..6e450ff6b7 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -49,10 +49,10 @@ typedef struct BufferSourceContext { unsigned nb_failed_requests; /* video only */ -int w, h; -enum AVPixelFormat pix_fmt; -enum AVColorSpace color_space; -enum AVColorRange color_range; +int w, h, prev_w, prev_h; +enum AVPixelFormat pix_fmt, prev_pix_fmt; +enum AVColorSpace color_space, prev_color_space; +enum AVColorRange color_range, prev_color_range; AVRationalpixel_aspect; AVBufferRef *hw_frames_ctx; @@ -66,16 +66,30 @@ typedef struct BufferSourceContext { int eof; int64_t last_pts; +int link_delta, prev_delta; } BufferSourceContext; #define CHECK_VIDEO_PARAM_CHANGE(s, c, width, height, format, csp, range, pts)\ -if (c->w != width || c->h != height || c->pix_fmt != format ||\ -c->color_space != csp || c->color_range != range) {\ -av_log(s, AV_LOG_INFO, "filter context - w: %d h: %d fmt: %d csp: %s range: %s, incoming frame - w: %d h: %d fmt: %d csp: %s range: %s pts_time: %s\n",\ +c->link_delta = c->w != width || c->h != height || c->pix_fmt != format ||\ +c->color_space != csp || c->color_range != range;\ +c->prev_delta = c->prev_w != width || c->prev_h != height || c->prev_pix_fmt != format ||\ +c->prev_color_space != csp || c->prev_color_range != range;\ +if (c->link_delta) {\ +int loglevel = c->prev_delta ? AV_LOG_WARNING : AV_LOG_DEBUG;\ +av_log(s, loglevel, "Changing video frame properties on the fly is not supported by all filters.\n");\ +av_log(s, loglevel, "filter context - w: %d h: %d fmt: %d csp: %s range: %s, incoming frame - w: %d h: %d fmt: %d csp: %s range: %s pts_time: %s\n",\ c->w, c->h, c->pix_fmt, av_color_space_name(c->color_space), av_color_range_name(c->color_range),\ width, height, format, av_color_space_name(csp), av_color_range_name(range),\ av_ts2timestr(pts, >outputs[0]->time_base));\ -av_log(s, AV_LOG_WARNING, "Changing video frame properties on the fly is not supported by all filters.\n");\ +}\ +if (c->prev_delta) {\ +if (!c->link_delta)\ +av_log(s, AV_LOG_VERBOSE, "video frame properties congruent with link at pts_time: %s\n", av_ts2timestr(pts, >outputs[0]->time_base));\ +c->prev_w = width;\ +c->prev_h = height;\ +c->prev_pix_fmt = format;\ +c->prev_color_space = csp;\ +c->prev_color_range = range;\ } #define CHECK_AUDIO_PARAM_CHANGE(s, c, srate, layout, format, pts)\ @@ -111,12 +125,12 @@ int av_buffersrc_parameters_set(AVFilterContext *ctx, AVBufferSrcParameters *par switch (ctx->filter->outputs[0].type) { case AVMEDIA_TYPE_VIDEO: if (param->format != AV_PIX_FMT_NONE) { -s->pix_fmt = param->format; +s->pix_fmt = s->prev_pix_fmt = param->format; } if (param->width > 0) -s->w = param->width; +s->w = s->prev_w = param->width; if (param->height > 0) -s->h = param->height; +s->h = s->prev_h = param->height; if (param->sample_aspect_ratio.num > 0 && param->sample_aspect_ratio.den > 0) s->pixel_aspect = param->sample_aspect_ratio; if (param->frame_rate.num > 0 && param->frame_rate.den > 0) @@ -128,9 +142,9 @@ int av_buffersrc_parameters_set(AVFilterContext *ctx, AVBufferSrcParameters *par return AVERROR(ENOMEM); } if (param->color_space != AVCOL_SPC_UNSPECIFIED) -s->color_space = param->color_space; +s->color_space = s->prev_color_space = param->color_space; if (param->color_range != AVCOL_RANGE_UNSPECIFIED) -s->color_rang
[FFmpeg-cvslog] configure: correct lensfun header function check
ffmpeg | branch: master | Gyan Doshi | Sun Dec 31 13:02:20 2023 +0530| [e1c1dc8347f13104bc21e4100fcf4d4dddf5e5d8] | committer: Gyan Doshi configure: correct lensfun header function check The function lf_db_new was deprecated in lensfun 09dcd3e7ad in 2017 in favour of lf_db_create. The AVfilter was adjusted in 8b78eb312d but the configure check wasn't changed. lensfun removed lf_db_new declaration in lf 35c0017593 so configure fails to find lensfun. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e1c1dc8347f13104bc21e4100fcf4d4dddf5e5d8 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 65b4659b0a..037c08afff 100755 --- a/configure +++ b/configure @@ -6776,7 +6776,7 @@ enabled libjxl&& require_pkg_config libjxl "libjxl >= 0.7.0" jxl/dec require_pkg_config libjxl_threads "libjxl_threads >= 0.7.0" jxl/thread_parallel_runner.h JxlThreadParallelRunner enabled libklvanc && require libklvanc libklvanc/vanc.h klvanc_context_create -lklvanc enabled libkvazaar&& require_pkg_config libkvazaar "kvazaar >= 2.0.0" kvazaar.h kvz_api_get -enabled liblensfun&& require_pkg_config liblensfun lensfun lensfun.h lf_db_new +enabled liblensfun&& require_pkg_config liblensfun lensfun lensfun.h lf_db_create if enabled libmfx && enabled libvpl; then die "ERROR: can not use libmfx and libvpl together" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/riffenc: don't force WAVEFORMATEXTENSIBLE for flt/dbl LPCM
ffmpeg | branch: master | Gyan Doshi | Thu Dec 21 11:03:58 2023 +0530| [c1340f3439ef4eba34e8e51e1f7c0bf789e3256a] | committer: Gyan Doshi avformat/riffenc: don't force WAVEFORMATEXTENSIBLE for flt/dbl LPCM 2c2a167ca7 forced WAVEFORMATEXTENSIBLE for all LPCM streams with greater than 16 bits per sample. However, WAVEFORMATEX allows IEEE Float samples or any depth where raw depth == coded depth, see Remarks section at https://learn.microsoft.com/en-us/windows/win32/api/mmreg/ns-mmreg-waveformatex and samples M1F1-float32-AFsp, M1F1-float64-AFsp at https://www.mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Samples.html There are hardware devices and likely software players requiring float samples that fail to qualify files with WAVEFORMATEXTENSIBLE headers. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c1340f3439ef4eba34e8e51e1f7c0bf789e3256a --- libavformat/riffenc.c | 2 +- tests/ref/acodec/pcm-f32le | 4 +-- tests/ref/acodec/pcm-f64le | 4 +-- tests/ref/seek/acodec-pcm-f32le | 54 - tests/ref/seek/acodec-pcm-f64le | 54 - 5 files changed, 59 insertions(+), 59 deletions(-) diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c index 3325419b94..8accb69541 100644 --- a/libavformat/riffenc.c +++ b/libavformat/riffenc.c @@ -81,7 +81,7 @@ int ff_put_wav_header(AVFormatContext *s, AVIOContext *pb, av_channel_layout_compare(>ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO)) || par->sample_rate > 48000 || par->codec_id == AV_CODEC_ID_EAC3 || par->codec_id == AV_CODEC_ID_DFPWM || - av_get_bits_per_sample(par->codec_id) > 16; + (av_get_bits_per_sample(par->codec_id) > 16 && par->codec_tag != 0x0003); if (waveformatextensible) avio_wl16(pb, 0xfffe); diff --git a/tests/ref/acodec/pcm-f32le b/tests/ref/acodec/pcm-f32le index c0fdd70cd2..c63a2c4b70 100644 --- a/tests/ref/acodec/pcm-f32le +++ b/tests/ref/acodec/pcm-f32le @@ -1,4 +1,4 @@ -653d82a64b7bd96ac193e105e9f92d4c *tests/data/fate/acodec-pcm-f32le.wav -2116880 tests/data/fate/acodec-pcm-f32le.wav +03ae40a19deacaca6e0c4ec08dd35956 *tests/data/fate/acodec-pcm-f32le.wav +2116858 tests/data/fate/acodec-pcm-f32le.wav 95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-f32le.out.wav stddev:0.00 PSNR:999.99 MAXDIFF:0 bytes: 1058400/ 1058400 diff --git a/tests/ref/acodec/pcm-f64le b/tests/ref/acodec/pcm-f64le index 5c90e7bbbd..894d593ac1 100644 --- a/tests/ref/acodec/pcm-f64le +++ b/tests/ref/acodec/pcm-f64le @@ -1,4 +1,4 @@ -48b4cd378f47a50dc902aa03cc8280ed *tests/data/fate/acodec-pcm-f64le.wav -4233680 tests/data/fate/acodec-pcm-f64le.wav +69ffdb079600c53a00c5b0119b586a98 *tests/data/fate/acodec-pcm-f64le.wav +4233658 tests/data/fate/acodec-pcm-f64le.wav 95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-f64le.out.wav stddev:0.00 PSNR:999.99 MAXDIFF:0 bytes: 1058400/ 1058400 diff --git a/tests/ref/seek/acodec-pcm-f32le b/tests/ref/seek/acodec-pcm-f32le index 335a8a0729..0b6bb33bcb 100644 --- a/tests/ref/seek/acodec-pcm-f32le +++ b/tests/ref/seek/acodec-pcm-f32le @@ -1,53 +1,53 @@ -ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 80 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts:-1.00 -ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 80 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 58 size: 4096 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 668344 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 668322 size: 4096 ret: 0 st: 0 flags:0 ts: 0.788345 -ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 278208 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 278186 size: 4096 ret: 0 st: 0 flags:1 ts:-0.317506 -ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 80 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.00 pts: 0.00 pos: 58 size: 4096 ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 909128 size: 4096 +ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 909106 size: 4096 ret: 0 st:-1 flags:1 ts: 1.470835 -ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 518992 size: 4096 +ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 518970 size: 4096 ret: 0 st: 0 flags:0 ts: 0.365011 -ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 128856 size: 4096 +ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 128834 size: 4096 ret:
[FFmpeg-cvslog] swr/swresample: avoid reapplication of firstpts
ffmpeg | branch: master | Gyan Doshi | Fri Dec 15 12:34:39 2023 +0530| [be8a4f80b97222d99b4262c9230ca8a1db28973a] | committer: Gyan Doshi swr/swresample: avoid reapplication of firstpts During a resampling operation where 1) user has specified first_pts 2) SWR_FLAG_RESAMPLE is not set initially (directly or otherwise) 3) first_pts has been fulfilled (always using hard compensation) then upon first encountering a delay where a soft compensation is required, swr_set_compensation will lead to another init of swr which will reset outpts to the specified firstpts thus leading to an output frame having its pts = firstpts. When the next input frame is received, swr will see a large delay and inject silence from firstpts to the current frame's pts. This can lead to severe desync and in worst case, loss of audio playback. Parameter firstpts initialized to AV_NOPTS_VALUE in swr_alloc and then checked in swr_init to avoid resetting outpts, thus avoiding reapplication of firstpts. Fixes #4131. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be8a4f80b97222d99b4262c9230ca8a1db28973a --- libswresample/options.c | 1 + libswresample/swresample.c| 5 +++-- tests/fate/libswresample.mak | 3 +++ tests/ref/fate/swr-async-firstpts | 24 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/libswresample/options.c b/libswresample/options.c index fb109fdbab..d8cf85c053 100644 --- a/libswresample/options.c +++ b/libswresample/options.c @@ -171,6 +171,7 @@ av_cold struct SwrContext *swr_alloc(void){ if(s){ s->av_class= _class; av_opt_set_defaults(s); +s->firstpts = AV_NOPTS_VALUE; } return s; } diff --git a/libswresample/swresample.c b/libswresample/swresample.c index f2a9b40474..1cf83a803f 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -375,8 +375,9 @@ av_cold int swr_init(struct SwrContext *s){ if (s->firstpts_in_samples != AV_NOPTS_VALUE) { if (!s->async && s->min_compensation >= FLT_MAX/2) s->async = 1; -s->firstpts = -s->outpts = s->firstpts_in_samples * s->out_sample_rate; +if (s->firstpts == AV_NOPTS_VALUE) +s->firstpts = +s->outpts = s->firstpts_in_samples * s->out_sample_rate; } else s->firstpts = AV_NOPTS_VALUE; diff --git a/tests/fate/libswresample.mak b/tests/fate/libswresample.mak index f2108016af..0d29f76024 100644 --- a/tests/fate/libswresample.mak +++ b/tests/fate/libswresample.mak @@ -1082,6 +1082,9 @@ $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_EXACT_LIN_ASYNC,s32p,s32le,s16) $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_EXACT_LIN_ASYNC,fltp,f32le,s16) $(call CROSS_TEST,$(SAMPLERATES_LITE),ARESAMPLE_EXACT_LIN_ASYNC,dblp,f64le,s16) +FATE_SWR_RESAMPLE-$(call FILTERDEMDEC, ARESAMPLE ASETPTS ATRIM SINE, , PCM_S16LE, LAVFI_INDEV) += fate-swr-async-firstpts +fate-swr-async-firstpts: CMD = framecrc -auto_conversion_filters -copyts -f lavfi -i "sine=r=1000:samples_per_frame=100,asetpts=PTS+S+S*floor(ld(1)/4)+st(1\,ld(1)+1)*0,atrim=end=2" -filter:a aresample=async=300:first_pts=0 + FATE_SWR_RESAMPLE-$(call FILTERDEMDECENCMUX, ARESAMPLE, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_SWR_RESAMPLE) fate-swr-resample: $(FATE_SWR_RESAMPLE-yes) FATE_SWR += $(FATE_SWR_RESAMPLE-yes) diff --git a/tests/ref/fate/swr-async-firstpts b/tests/ref/fate/swr-async-firstpts new file mode 100644 index 00..3f6b290bab --- /dev/null +++ b/tests/ref/fate/swr-async-firstpts @@ -0,0 +1,24 @@ +#tb 0: 1/1000 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 1000 +#channel_layout_name 0: mono +0, 0, 0, 132, 264, 0xc2981f45 +0,132,132, 68, 136, 0xe78e468d +0,200,200, 100, 200, 0xd55c67d0 +0,300,300, 100, 200, 0xd55c67d0 +0,400,400, 100, 200, 0xd55c67d0 +0,500,500, 93, 186, 0x85ca5db4 +0,593,593, 110, 220, 0xa2655d0b +0,703,703, 108, 216, 0x95cb6f01 +0,811,811, 108, 216, 0xf35668b8 +0,919,919, 149, 298, 0xc273245f +0, 1068, 1068, 136, 272, 0xedeb6e0a +0, 1204, 1204, 98, 196, 0xea18668e +0, 1302, 1302, 98, 196, 0x412861e7 +0, 1400, 1400, 98, 196, 0x7ec361b2 +0, 1498, 1498, 110, 220, 0xf3ae6a6a +0, 1608, 1608, 108, 216, 0xab2f6c93 +0, 1716, 1716, 107, 214, 0x50de6eb9 +0, 1823, 1823, 106, 212, 0x67b8656d +0, 1929, 1929, 18, 36, 0x2b7911c6 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https
[FFmpeg-cvslog] avfilter/select: initialize prev_selected_n to NAN
ffmpeg | branch: master | Gyan Doshi | Fri Dec 8 13:19:04 2023 +0530| [b9fd3e7a88b326f719bd3c47d0e0cc5a435de428] | committer: Gyan Doshi avfilter/select: initialize prev_selected_n to NAN As per the doc, prev_selected_n should be NAN at the start. However, this was never set. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9fd3e7a88b326f719bd3c47d0e0cc5a435de428 --- libavfilter/f_select.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 47e36f0014..9b330a0673 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -233,6 +233,7 @@ static int config_input(AVFilterLink *inlink) select->var_values[VAR_TB] = av_q2d(inlink->time_base); +select->var_values[VAR_PREV_SELECTED_N] = NAN; select->var_values[VAR_PREV_PTS] = NAN; select->var_values[VAR_PREV_SELECTED_PTS] = NAN; select->var_values[VAR_PREV_SELECTED_T] = NAN; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: restore entry for libvmaf option pool
ffmpeg | branch: master | Gyan Doshi | Sun Nov 26 16:21:22 2023 +0530| [0ea9e26636387336c48d6d20872ddd277479817b] | committer: Gyan Doshi doc/filters: restore entry for libvmaf option pool 3d29724c00 removed the doc entry for the option pool while adding a parser function for it at the same time! The option remains available and undeprecated. Fixes trac #10693 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ea9e26636387336c48d6d20872ddd277479817b --- doc/filters.texi | 4 1 file changed, 4 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 5268b2003c..80ffbb2c65 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -16864,6 +16864,10 @@ Set the file path to be used to store log files. @item log_fmt Set the format of the log file (xml, json, csv, or sub). +@item pool +Set the pool method to be used for computing vmaf. +Options are @code{min}, @code{harmonic_mean} or @code{mean} (default). + @item n_threads Set number of threads to be used when initializing libvmaf. Default value: @code{0}, no threads. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/libsvtav1: add version guard for external param
ffmpeg | branch: master | Gyan Doshi | Wed Nov 8 10:33:19 2023 +0530| [67a2571a5547d39990e7f709f24d7a5b452ff8b9] | committer: Gyan Doshi avcodec/libsvtav1: add version guard for external param Setting of external param 'force_key_frames' was added in 7bcc1b4eb8. It is available since v1.1.0 but ffmpeg allows linking against v0.9.0. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=67a2571a5547d39990e7f709f24d7a5b452ff8b9 --- libavcodec/libsvtav1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 8d2c7f3be4..862192945b 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -250,6 +250,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, if (avctx->gop_size > 1) param->intra_period_length = avctx->gop_size - 1; +#if SVT_AV1_CHECK_VERSION(1, 1, 0) // In order for SVT-AV1 to force keyframes by setting pic_type to // EB_AV1_KEY_PICTURE on any frame, force_key_frames has to be set. Note // that this does not force all frames to be keyframes (it only forces a @@ -260,6 +261,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, // to be updated to set force_key_frames accordingly. if (avctx->gop_size == 1) param->force_key_frames = 1; +#endif if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { param->frame_rate_numerator = avctx->framerate.num; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/vidstab: add option for file format specification
ffmpeg | branch: master | Gyan Doshi | Sun Oct 22 16:36:14 2023 +0530| [2b300eb533a45c471f09f60885e3c38ed9e5df1b] | committer: Gyan Doshi avfilter/vidstab: add option for file format specification The vidstab library added support in Nov 2020 for writing/reading the transforms data in binary in addition to ASCII. The library default was changed to binary format but no changes were made to the AVfilters resulting in data file for writing or reading being always opened as text. This effectively broke the filters. Option added to vidstabdetect to specify file format and open files in both filters with the correct attributes. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b300eb533a45c471f09f60885e3c38ed9e5df1b --- doc/filters.texi | 13 + libavfilter/vf_vidstabdetect.c| 15 ++- libavfilter/vf_vidstabtransform.c | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index f5032ddf74..cc5d0d3f12 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -24618,6 +24618,19 @@ If set to 0, it is disabled. The frames are counted starting from 1. Show fields and transforms in the resulting frames. It accepts an integer in the range 0-2. Default value is 0, which disables any visualization. + +@item fileformat +Format for the transforms data file to be written. +Acceptable values are + +@table @samp +@item ascii +Human-readable plain text + +@item binary +Binary format, roughly 40% smaller than @code{ascii}. (@emph{default}) +@end table + @end table @subsection Examples diff --git a/libavfilter/vf_vidstabdetect.c b/libavfilter/vf_vidstabdetect.c index a2c6d89503..aa050afab9 100644 --- a/libavfilter/vf_vidstabdetect.c +++ b/libavfilter/vf_vidstabdetect.c @@ -40,6 +40,7 @@ typedef struct StabData { VSMotionDetectConfig conf; char *result; +int fileformat; FILE *f; } StabData; @@ -58,6 +59,11 @@ static const AVOption vidstabdetect_options[] = { {"show","0: draw nothing; 1,2: show fields and transforms", OFFSETC(show), AV_OPT_TYPE_INT,{.i64 = 0}, 0, 2, FLAGS}, {"tripod", "virtual tripod mode (if >0): motion is compared to a reference" " reference frame (frame # is the value)", OFFSETC(virtualTripod), AV_OPT_TYPE_INT,{.i64 = 0}, 0, INT_MAX, FLAGS}, +#ifdef LIBVIDSTAB_FILE_FORMAT_VERSION +{ "fileformat", "transforms data file format", OFFSET(fileformat), AV_OPT_TYPE_INT, {.i64 = BINARY_SERIALIZATION_MODE}, ASCII_SERIALIZATION_MODE, BINARY_SERIALIZATION_MODE, FLAGS, "file_format"}, +{ "ascii","ASCII text", 0, AV_OPT_TYPE_CONST, {.i64 = ASCII_SERIALIZATION_MODE }, 0, 0, FLAGS, "file_format"}, +{ "binary", "binary", 0, AV_OPT_TYPE_CONST, {.i64 = BINARY_SERIALIZATION_MODE}, 0, 0, FLAGS, "file_format"}, +#endif {NULL} }; @@ -94,6 +100,13 @@ static int config_input(AVFilterLink *inlink) VSFrameInfo fi; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); int is_planar = desc->flags & AV_PIX_FMT_FLAG_PLANAR; +const char *file_mode = "w"; + +#ifdef LIBVIDSTAB_FILE_FORMAT_VERSION +md->serializationMode = s->fileformat; +if (s->fileformat == BINARY_SERIALIZATION_MODE) +file_mode = "wb"; +#endif vsFrameInfoInit(, inlink->w, inlink->h, ff_av2vs_pixfmt(ctx, inlink->format)); @@ -129,7 +142,7 @@ static int config_input(AVFilterLink *inlink) av_log(ctx, AV_LOG_INFO, " show = %d\n", s->conf.show); av_log(ctx, AV_LOG_INFO, "result = %s\n", s->result); -s->f = avpriv_fopen_utf8(s->result, "w"); +s->f = avpriv_fopen_utf8(s->result, file_mode); if (s->f == NULL) { av_log(ctx, AV_LOG_ERROR, "cannot open transform file %s\n", s->result); return AVERROR(EINVAL); diff --git a/libavfilter/vf_vidstabtransform.c b/libavfilter/vf_vidstabtransform.c index 8a66a463b4..f49d302b80 100644 --- a/libavfilter/vf_vidstabtransform.c +++ b/libavfilter/vf_vidstabtransform.c @@ -193,7 +193,7 @@ static int config_input(AVFilterLink *inlink) av_log(ctx, AV_LOG_INFO, "zoomspeed = %g\n", tc->conf.zoomSpeed); av_log(ctx, AV_LOG_INFO, "interpol = %s\n", getInterpolationTypeName(tc->conf.interpolType)); -f = avpriv_fopen_utf8(tc->input, "r"); +f = avpriv_fopen_utf8(tc->input, "rb"); if (!f) { int ret = AVERROR(errno); av_log(ctx, AV_LOG_ERROR, "cannot open input file %s\n", tc->input); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] configure: select subordinate formats for HLS
ffmpeg | branch: master | Gyan Doshi | Sat Feb 11 17:53:50 2023 +0530| [9f7e51e513665a72fb753887666259a883487947] | committer: Gyan Doshi configure: select subordinate formats for HLS HLS segments may be MPEG-TS or fragmented MP4, so those (de)muxers are required for reading/writing HLS media segments. Fixes functionality with --disable-everything --enable-demuxer=hls --enable-muxer=hls > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f7e51e513665a72fb753887666259a883487947 --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index bf8ae1c789..b6616f00b6 100755 --- a/configure +++ b/configure @@ -3436,8 +3436,8 @@ flac_demuxer_select="flac_parser" flv_muxer_select="aac_adtstoasc_bsf" gxf_muxer_select="pcm_rechunk_bsf" hds_muxer_select="flv_muxer" -hls_demuxer_select="adts_header ac3_parser" -hls_muxer_select="mpegts_muxer" +hls_demuxer_select="adts_header ac3_parser mov_demuxer mpegts_demuxer" +hls_muxer_select="mov_muxer mpegts_muxer" hls_muxer_suggest="gcrypt openssl" image2_alias_pix_demuxer_select="image2_demuxer" image2_brender_pix_demuxer_select="image2_demuxer" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/h264_metadata_bsf: remove AUDs at any position
ffmpeg | branch: master | Gyan Doshi | Sun Jan 29 17:10:04 2023 +0530| [159b028df58f480605b678109088e1b2ba8fdc71] | committer: Gyan Doshi avcodec/h264_metadata_bsf: remove AUDs at any position Some files, likely due to faulty packetization or muxing, can have AUDs at other positions besides the head unit of a packet. Remove these too. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=159b028df58f480605b678109088e1b2ba8fdc71 --- libavcodec/h264_metadata_bsf.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c index d318bf0cee..b9cfeaba94 100644 --- a/libavcodec/h264_metadata_bsf.c +++ b/libavcodec/h264_metadata_bsf.c @@ -469,12 +469,13 @@ static int h264_metadata_update_fragment(AVBSFContext *bsf, AVPacket *pkt, H264MetadataContext *ctx = bsf->priv_data; int err, i, has_sps, seek_point; -// If an AUD is present, it must be the first NAL unit. -if (au->nb_units && au->units[0].type == H264_NAL_AUD) { -if (ctx->aud == BSF_ELEMENT_REMOVE) -ff_cbs_delete_unit(au, 0); -} else { -if (pkt && ctx->aud == BSF_ELEMENT_INSERT) { +if (ctx->aud == BSF_ELEMENT_REMOVE) { +for (i = au->nb_units - 1; i >= 0; i--) { +if (au->units[i].type == H264_NAL_AUD) +ff_cbs_delete_unit(au, i); +} +} else if (ctx->aud == BSF_ELEMENT_INSERT) { +if (pkt) { err = h264_metadata_insert_aud(bsf, au); if (err < 0) return err; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/segment: calculate segment durations correctly.
ffmpeg | branch: master | Gyan Doshi | Sat Jan 7 15:28:52 2023 +0530| [01f46f18dbcdf323ceb4fdff7358cf3ca71366e6] | committer: Gyan Doshi avformat/segment: calculate segment durations correctly. segment_time and segment_times are defined as duration specifications, not timestamps, so calculation of segment duration must account for initial timestamp. Fixed. FATE ref for segment-mp4-to-ts changed on account of avoiding premature segment cut at the end of the first segment. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=01f46f18dbcdf323ceb4fdff7358cf3ca71366e6 --- libavformat/segment.c| 15 +++ tests/ref/fate/segment-mp4-to-ts | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/libavformat/segment.c b/libavformat/segment.c index 0e6421ea5d..80e4bf851c 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -116,6 +116,7 @@ typedef struct SegmentContext { int64_t initial_offset;///< initial timestamps offset, expressed in microseconds char *reference_stream_specifier; ///< reference stream specifier int reference_stream_index; +int64_t reference_stream_first_pts;///< initial timestamp, expressed in microseconds int break_non_keyframes; int write_empty; @@ -746,6 +747,8 @@ static int seg_init(AVFormatContext *s) seg->reference_stream_index, av_get_media_type_string(s->streams[seg->reference_stream_index]->codecpar->codec_type)); +seg->reference_stream_first_pts = AV_NOPTS_VALUE; + seg->oformat = av_guess_format(seg->format, s->url, NULL); if (!seg->oformat) @@ -898,6 +901,18 @@ calc_times: pkt->flags & AV_PKT_FLAG_KEY, pkt->stream_index == seg->reference_stream_index ? seg->frame_count : -1); +if (seg->reference_stream_first_pts == AV_NOPTS_VALUE && +pkt->stream_index == seg->reference_stream_index && +pkt->pts != AV_NOPTS_VALUE) { +seg->reference_stream_first_pts = av_rescale_q(pkt->pts, st->time_base, AV_TIME_BASE_Q); +} + +if (seg->reference_stream_first_pts != AV_NOPTS_VALUE) { +end_pts += (INT64_MAX - end_pts >= seg->reference_stream_first_pts) ? +seg->reference_stream_first_pts : +INT64_MAX - end_pts; +} + if (pkt->pts != AV_NOPTS_VALUE) pkt_pts_avtb = av_rescale_q(pkt->pts, st->time_base, AV_TIME_BASE_Q); diff --git a/tests/ref/fate/segment-mp4-to-ts b/tests/ref/fate/segment-mp4-to-ts index 54fcadb846..2994416270 100644 --- a/tests/ref/fate/segment-mp4-to-ts +++ b/tests/ref/fate/segment-mp4-to-ts @@ -23,7 +23,7 @@ 0, 50400, 54000, 3600, 607, 0xc53c2339, F=0x0, S=1,1 0, 54000, 72000, 3600, 4755, 0x2f642b58, F=0x0, S=1,1 0, 57600, 64800, 3600, 1182, 0xbe1a4847, F=0x0, S=1,1 -0, 61200, 61200, 3600, 809, 0x8d948a4e, F=0x2, S=1,1 +0, 61200, 61200, 3600, 809, 0x8d948a4e, F=0x0, S=1,1 0, 64800, 68400, 3600, 656, 0x4fa03c2b, F=0x0, S=1,1 0, 68400, 86400, 3600,26555, 0x5629b584, S=1,1 0, 72000, 79200, 3600, 1141, 0x761b31e8, F=0x0, S=1,1 @@ -71,7 +71,7 @@ 0, 223200, 226800, 3600, 809, 0x84e37fee, F=0x0, S=1,1 0, 226800, 244800, 3600, 4541, 0xd4e5c0de, F=0x0, S=1,1 0, 230400, 237600, 3600, 1545, 0x0099fc98, F=0x0, S=1,1 -0, 234000, 234000, 3600, 929, 0xfd72d049, F=0x0, S=1,1 +0, 234000, 234000, 3600, 929, 0xfd72d049, F=0x2, S=1,1 0, 237600, 241200, 3600, 829, 0xcfda9e96, F=0x0, S=1,1 0, 241200, 259200, 3600,24220, 0x5ca21d71, S=1,1 0, 244800, 252000, 3600, 1422, 0xcde6cc34, F=0x0, S=1,1 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/segment: add option min_seg_duration
ffmpeg | branch: master | Gyan Doshi | Wed Dec 21 19:59:58 2022 +0530| [d39b34123daadce3c7db2851120cf10b4c3511db] | committer: Gyan Doshi avformat/segment: add option min_seg_duration New option can be used to avoid creating very short segments with inputs whose GOP size is variable or unharmonic with segment_time. Only effective with segment_time. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d39b34123daadce3c7db2851120cf10b4c3511db --- doc/muxers.texi | 5 + libavformat/segment.c | 15 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 4edbb22b00..ed5341be39 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -2369,6 +2369,11 @@ Note that splitting may not be accurate, unless you force the reference stream key-frames at the given time. See the introductory notice and the examples below. +@item min_seg_duration @var{time} +Set minimum segment duration to @var{time}, the value must be a duration +specification. This prevents the muxer ending segments at a duration below +this value. Only effective with @code{segment_time}. Default value is "0". + @item segment_atclocktime @var{1|0} If set to "1" split at regular clock time intervals starting from 00:00 o'clock. The @var{time} value specified in @option{segment_time} is diff --git a/libavformat/segment.c b/libavformat/segment.c index c904e20708..0e6421ea5d 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -93,6 +93,7 @@ typedef struct SegmentContext { int list_type; ///< set the list type AVIOContext *list_pb; ///< list file put-byte context int64_t time; ///< segment duration +int64_t min_seg_duration; ///< minimum segment duration int use_strftime; ///< flag to expand filename with strftime int increment_tc; ///< flag to increment timecode if found @@ -696,6 +697,9 @@ static int seg_init(AVFormatContext *s) return AVERROR(EINVAL); } +if (seg->times_str || seg->frames_str) +seg->min_seg_duration = 0; + if (seg->times_str) { if ((ret = parse_times(s, >times, >nb_times, seg->times_str)) < 0) return ret; @@ -710,6 +714,10 @@ static int seg_init(AVFormatContext *s) } seg->clocktime_offset = seg->time - (seg->clocktime_offset % seg->time); } +if (seg->min_seg_duration > seg->time) { +av_log(s, AV_LOG_ERROR, "min_seg_duration cannot be greater than segment_time\n"); +return AVERROR(EINVAL); +} } if (seg->list) { @@ -839,7 +847,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt) { SegmentContext *seg = s->priv_data; AVStream *st = s->streams[pkt->stream_index]; -int64_t end_pts = INT64_MAX, offset; +int64_t end_pts = INT64_MAX, offset, pkt_pts_avtb; int start_frame = INT_MAX; int ret; struct tm ti; @@ -890,11 +898,15 @@ calc_times: pkt->flags & AV_PKT_FLAG_KEY, pkt->stream_index == seg->reference_stream_index ? seg->frame_count : -1); +if (pkt->pts != AV_NOPTS_VALUE) +pkt_pts_avtb = av_rescale_q(pkt->pts, st->time_base, AV_TIME_BASE_Q); + if (pkt->stream_index == seg->reference_stream_index && (pkt->flags & AV_PKT_FLAG_KEY || seg->break_non_keyframes) && (seg->segment_frame_count > 0 || seg->write_empty) && (seg->cut_pending || seg->frame_count >= start_frame || (pkt->pts != AV_NOPTS_VALUE && + pkt_pts_avtb - seg->cur_entry.start_pts >= seg->min_seg_duration && av_compare_ts(pkt->pts, st->time_base, end_pts - seg->time_delta, AV_TIME_BASE_Q) >= 0))) { /* sanitize end time in case last packet didn't have a defined duration */ @@ -1031,6 +1043,7 @@ static const AVOption options[] = { { "segment_clocktime_wrap_duration", "set segment clocktime wrapping duration", OFFSET(clocktime_wrap_duration), AV_OPT_TYPE_DURATION, {.i64 = INT64_MAX}, 0, INT64_MAX, E}, { "segment_time", "set segment duration", OFFSET(time),AV_OPT_TYPE_DURATION, {.i64 = 200}, INT64_MIN, INT64_MAX, E }, { "segment_time_delta","set approximation value used for the segment times", OFFSET(time_delta), AV_OPT_TYPE_DURATION, {.i64 = 0}, 0, INT64_MAX, E }, +{ "min_seg_duration", "set minimum segment duration", OFFSET(min_seg_duration), AV_OPT_TYPE_DURATION, {.i64 = 0}, 0, INT64_MAX, E }, { "segment_times", "set segment split time points", OFFSET(times_str),AV_OPT_TYP
[FFmpeg-cvslog] avformat/movenc: correct write_colr warning placement
ffmpeg | branch: master | Gyan Doshi | Mon Dec 12 10:08:49 2022 +0530| [9adf02247cd5f1c6cc404ab3dad317a40f4f6e0c] | committer: Gyan Doshi avformat/movenc: correct write_colr warning placement The old warning is no longer applicable in the inner block after c5b20cfe19. Reviewed-by: Zhao Zhili Signed-off-by: Gyan Doshi > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9adf02247cd5f1c6cc404ab3dad317a40f4f6e0c --- libavformat/movenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 7b00e65cdd..7d49892283 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2330,10 +2330,11 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex av_stream_get_side_data(track->st, AV_PKT_DATA_ICC_PROFILE, NULL)) { int prefer_icc = mov->flags & FF_MOV_FLAG_PREFER_ICC || !has_color_info; mov_write_colr_tag(pb, track, prefer_icc); -} else if (mov->flags & FF_MOV_FLAG_WRITE_COLR) { - av_log(mov->fc, AV_LOG_WARNING, "Not writing 'colr' atom. Format is not MOV or MP4.\n"); } +} else if (mov->flags & FF_MOV_FLAG_WRITE_COLR) { +av_log(mov->fc, AV_LOG_WARNING, "Not writing 'colr' atom. Format is not MOV or MP4 or AVIF.\n"); } + if (track->mode == MODE_MOV || track->mode == MODE_MP4) { mov_write_clli_tag(pb, track); mov_write_mdcv_tag(pb, track); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] ffmpeg: fix implementation of updated input start time
ffmpeg | branch: master | Gyan Doshi | Fri Oct 21 19:47:25 2022 +0530| [5ccd4d306054cec839e9078203a3b3892a3372a2] | committer: Gyan Doshi ffmpeg: fix implementation of updated input start time The current adjustment of input start times just adjusts the tsoffset. And it does so, by resetting the tsoffset to nullify the new start time. This leads to breakage of -copyts, ignoring of input_ts_offset, breaking of -isync as well as breaking wrap correction. Fixed by taking cognizance of these parameters, and by correcting start times just before sync offsets are applied. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ccd4d306054cec839e9078203a3b3892a3372a2 --- fftools/ffmpeg.c | 2 +- fftools/ffmpeg.h | 5 - fftools/ffmpeg_demux.c | 4 ++-- fftools/ffmpeg_opt.c | 33 +++-- 4 files changed, 30 insertions(+), 14 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 62eb3e374b..e6f6773f6a 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1813,7 +1813,7 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p start_time = 0; if (copy_ts) { start_time += f->start_time != AV_NOPTS_VALUE ? f->start_time : 0; -start_time += start_at_zero ? 0 : f->ctx->start_time; +start_time += start_at_zero ? 0 : f->start_time_effective; } if (ist->pts >= f->recording_time + start_time) { close_output_stream(ost); diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index e5980ce9da..c7035143a7 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -443,7 +443,10 @@ typedef struct InputFile { int ist_index;/* index of first stream in input_streams */ int64_t input_ts_offset; int input_sync_ref; - +/** + * Effective format start time based on enabled streams. + */ +int64_t start_time_effective; int64_t ts_offset; /** * Extra timestamp offset added by discontinuity handling. diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index ca9d3ebfa2..ee867cc15c 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -170,7 +170,7 @@ static void ts_fixup(Demuxer *d, AVPacket *pkt, int *repeat_pict) { InputFile *ifile = >f; InputStream *ist = input_streams[ifile->ist_index + pkt->stream_index]; -const int64_t start_time = ifile->ctx->start_time; +const int64_t start_time = ifile->start_time_effective; int64_t duration; if (debug_ts) { @@ -422,7 +422,7 @@ int ifile_get_packet(InputFile *f, AVPacket **pkt) if (f->readrate || f->rate_emu) { int i; int64_t file_start = copy_ts * ( - (f->ctx->start_time != AV_NOPTS_VALUE ? f->ctx->start_time * !start_at_zero : 0) + + (f->start_time_effective != AV_NOPTS_VALUE ? f->start_time_effective * !start_at_zero : 0) + (f->start_time != AV_NOPTS_VALUE ? f->start_time : 0) ); float scale = f->rate_emu ? 1.0 : f->readrate; diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 840dc054e9..9c71d736d8 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -202,13 +202,15 @@ int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, int st_id return 0; } +/* Correct input file start times based on enabled streams */ static void correct_input_start_times(void) { -// Correct starttime based on the enabled streams for (int i = 0; i < nb_input_files; i++) { InputFile *ifile = input_files[i]; AVFormatContext*is = ifile->ctx; -int64_t new_start_time = INT64_MAX; +int64_t new_start_time = INT64_MAX, diff, abs_start_seek; + +ifile->start_time_effective = is->start_time; if (is->start_time == AV_NOPTS_VALUE || !(is->iformat->flags & AVFMT_TS_DISCONT)) @@ -220,9 +222,20 @@ static void correct_input_start_times(void) continue; new_start_time = FFMIN(new_start_time, av_rescale_q(st->start_time, st->time_base, AV_TIME_BASE_Q)); } -if (new_start_time > is->start_time) { -av_log(is, AV_LOG_VERBOSE, "Correcting start time by %"PRId64"\n", new_start_time - is->start_time); -ifile->ts_offset = -new_start_time; + +diff = new_start_time - is->start_time; +if (diff) { +av_log(NULL, AV_LOG_VERBOSE, "Correcting start time of Input #%d by %"PRId64" us.\n", i, diff); +ifile->start_time_effective = new_start_time; +if (copy_ts && start_at_zero) +ifile->ts_offset = -new_start_time; +else if (!copy_ts) { +abs
[FFmpeg-cvslog] ffmpeg: shift start time correction to ffmpeg_opt
ffmpeg | branch: master | Gyan Doshi | Fri Oct 21 18:55:37 2022 +0530| [93faba449c0dc9d953d9aeb381f03728ff66e2cb] | committer: Gyan Doshi ffmpeg: shift start time correction to ffmpeg_opt In preparation for applying start time correction that accounts for all factors such as copyts, input_ts_offset ..etc > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93faba449c0dc9d953d9aeb381f03728ff66e2cb --- fftools/ffmpeg.c | 22 -- fftools/ffmpeg_opt.c | 27 +++ 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 93d1551e1e..62eb3e374b 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3192,28 +3192,6 @@ static int transcode_init(void) input_streams[j + ifile->ist_index]->start = av_gettime_relative(); } -// Correct starttime based on the enabled streams -for (i = 0; i < nb_input_files; i++) { -InputFile *ifile = input_files[i]; -AVFormatContext*is = ifile->ctx; -int64_t new_start_time = INT64_MAX; - -if (is->start_time == AV_NOPTS_VALUE || -!(is->iformat->flags & AVFMT_TS_DISCONT)) -continue; - -for (int j = 0; j < is->nb_streams; j++) { -AVStream *st = is->streams[j]; -if(st->discard == AVDISCARD_ALL || st->start_time == AV_NOPTS_VALUE) -continue; -new_start_time = FFMIN(new_start_time, av_rescale_q(st->start_time, st->time_base, AV_TIME_BASE_Q)); -} -if (new_start_time > is->start_time) { -av_log(is, AV_LOG_VERBOSE, "Correcting start time by %"PRId64"\n", new_start_time - is->start_time); -ifile->ts_offset = -new_start_time; -} -} - /* init input streams */ for (i = 0; i < nb_input_streams; i++) if ((ret = init_input_stream(i, error, sizeof(error))) < 0) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index eef325b478..840dc054e9 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -202,6 +202,31 @@ int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, int st_id return 0; } +static void correct_input_start_times(void) +{ +// Correct starttime based on the enabled streams +for (int i = 0; i < nb_input_files; i++) { +InputFile *ifile = input_files[i]; +AVFormatContext*is = ifile->ctx; +int64_t new_start_time = INT64_MAX; + +if (is->start_time == AV_NOPTS_VALUE || +!(is->iformat->flags & AVFMT_TS_DISCONT)) +continue; + +for (int j = 0; j < is->nb_streams; j++) { +AVStream *st = is->streams[j]; +if(st->discard == AVDISCARD_ALL || st->start_time == AV_NOPTS_VALUE) +continue; +new_start_time = FFMIN(new_start_time, av_rescale_q(st->start_time, st->time_base, AV_TIME_BASE_Q)); +} +if (new_start_time > is->start_time) { +av_log(is, AV_LOG_VERBOSE, "Correcting start time by %"PRId64"\n", new_start_time - is->start_time); +ifile->ts_offset = -new_start_time; +} +} +} + static int apply_sync_offsets(void) { for (int i = 0; i < nb_input_files; i++) { @@ -1268,6 +1293,8 @@ int ffmpeg_parse_options(int argc, char **argv) goto fail; } +correct_input_start_times(); + check_filter_outputs(); fail: ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] ffprobe: restore reporting error code for failed inputs
ffmpeg | branch: release/5.1 | Gyan Doshi | Tue Aug 16 00:14:16 2022 +0530| [4e4cc6e56a899f6b4302e80dbcd6b4462f340905] | committer: Gyan Doshi ffprobe: restore reporting error code for failed inputs c11fb46731 led to a regression whereby the return code for missing input or input probe is overridden by writer close return code and hence not conveyed in the exit code. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4e4cc6e56a899f6b4302e80dbcd6b4462f340905 --- fftools/ffprobe.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index f156663019..608d9050f7 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -4026,7 +4026,7 @@ int main(int argc, char **argv) WriterContext *wctx; char *buf; char *w_name = NULL, *w_args = NULL; -int ret, i; +int ret, input_ret, i; init_dynload(); @@ -4150,10 +4150,14 @@ int main(int argc, char **argv) show_error(wctx, ret); } +input_ret = ret; + writer_print_section_footer(wctx); ret = writer_close(); if (ret < 0) av_log(NULL, AV_LOG_ERROR, "Writing output failed: %s\n", av_err2str(ret)); + +ret = FFMIN(ret, input_ret); } end: ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] ffprobe: restore reporting error code for failed inputs
ffmpeg | branch: master | Gyan Doshi | Tue Aug 16 00:14:16 2022 +0530| [d5544f6457ad06987311beda0e4b7c08bf52915c] | committer: Gyan Doshi ffprobe: restore reporting error code for failed inputs c11fb46731 led to a regression whereby the return code for missing input or input probe is overridden by writer close return code and hence not conveyed in the exit code. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d5544f6457ad06987311beda0e4b7c08bf52915c --- fftools/ffprobe.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index ad633ccc44..8983dc28cc 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -4032,7 +4032,7 @@ int main(int argc, char **argv) WriterContext *wctx; char *buf; char *w_name = NULL, *w_args = NULL; -int ret, i; +int ret, input_ret, i; init_dynload(); @@ -4156,10 +4156,14 @@ int main(int argc, char **argv) show_error(wctx, ret); } +input_ret = ret; + writer_print_section_footer(wctx); ret = writer_close(); if (ret < 0) av_log(NULL, AV_LOG_ERROR, "Writing output failed: %s\n", av_err2str(ret)); + +ret = FFMIN(ret, input_ret); } end: ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: clarify behaviour of weights in amix
ffmpeg | branch: master | Gyan Doshi | Tue Aug 9 14:16:16 2022 +0530| [9e029dc265398f6a50cd61837959010c52228869] | committer: Gyan Doshi doc/filters: clarify behaviour of weights in amix > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e029dc265398f6a50cd61837959010c52228869 --- doc/filters.texi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index c85c33a104..01a359f20f 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -2236,8 +2236,10 @@ The transition time, in seconds, for volume renormalization when an input stream ends. The default value is 2 seconds. @item weights -Specify weight of each input audio stream as sequence. -Each weight is separated by space. By default all inputs have same weight. +Specify weight of each input audio stream as a sequence of numbers separated +by a space. If fewer weights are specified compared to number of inputs, the +last weight is assigned to the remaining inputs. +Default weight for each input is 1. @item normalize Always scale inputs instead of only doing summation of samples. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: add examples for amix to subsection
ffmpeg | branch: master | Gyan Doshi | Tue Aug 9 10:34:50 2022 +0530| [baf1f5dfb28514eb680273e21f2c8568bf68f278] | committer: Gyan Doshi doc/filters: add examples for amix to subsection > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=baf1f5dfb28514eb680273e21f2c8568bf68f278 --- doc/filters.texi | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index dd7ee1394a..fd894bcaf1 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -2210,13 +2210,6 @@ and @var{pan} audio filters support many formats). If the @var{amix} input has integer samples then @ref{aresample} will be automatically inserted to perform the conversion to float samples. -For example -@example -ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT -@end example -will mix 3 input audio streams to a single output with the same duration as the -first input and a dropout transition time of 3 seconds. - It accepts the following parameters: @table @option @@ -2252,6 +2245,26 @@ Beware of heavy clipping if inputs are not normalized prior or after filtering by this filter if this option is disabled. By default is enabled. @end table +@subsection Examples + +@itemize + +@item +This will mix 3 input audio streams to a single output with the same duration as the +first input and a dropout transition time of 3 seconds: +@example +ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT +@end example + +@item +This will mix one vocal and one music input audio stream to a single output with the same duration as the +longest input. The music will have quarter the weight as the vocals, and the inputs are not normalized: +@example +ffmpeg -i VOCALS -i MUSIC -filter_complex amix=inputs=2:duration=longest:dropout_transition=0:weights="1 0.25":normalize=0 OUTPUT +@end example + +@end itemize + @subsection Commands This filter supports the following commands: ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] ffmpeg: add option -isync
ffmpeg | branch: master | Gyan Doshi | Mon Jun 13 16:50:44 2022 +0530| [882aac99d2a7d15492ce1da9859676b0c04295b8] | committer: Gyan Doshi ffmpeg: add option -isync This is a per-file input option that adjusts an input's timestamps with reference to another input, so that emitted packet timestamps account for the difference between the start times of the two inputs. Typical use case is to sync two or more live inputs such as from capture devices. Both the target and reference input source timestamps should be based on the same clock source. If either input lacks starting timestamps, then no sync adjustment is made. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=882aac99d2a7d15492ce1da9859676b0c04295b8 --- doc/ffmpeg.texi | 15 + fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_opt.c | 59 3 files changed, 76 insertions(+) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 1a534ff1cc..767df69b7f 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -518,6 +518,21 @@ see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) Like the @code{-ss} option but relative to the "end of file". That is negative values are earlier in the file, 0 is at EOF. +@item -isync @var{input_index} (@emph{input}) +Assign an input as a sync source. + +This will take the difference between the start times of the target and reference inputs and +offset the timestamps of the target file by that difference. The source timestamps of the two +inputs should derive from the same clock source for expected results. If @code{copyts} is set +then @code{start_at_zero} must also be set. If either of the inputs has no starting timestamp +then no sync adjustment is made. + +Acceptable values are those that refer to a valid ffmpeg input index. If the sync reference is +the target index itself or @var{-1}, then no adjustment is made to target timestamps. A sync +reference may not itself be synced to any other input. + +Default value is @var{-1}. + @item -itsoffset @var{offset} (@emph{input}) Set the input time offset. diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 99d31c346e..391a35cf50 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -118,6 +118,7 @@ typedef struct OptionsContext { float readrate; int accurate_seek; int thread_queue_size; +int input_sync_ref; SpecifierOpt *ts_scale; intnb_ts_scale; @@ -410,6 +411,7 @@ typedef struct InputFile { at the moment when looping happens */ AVRational time_base; /* time base of the duration */ int64_t input_ts_offset; +int input_sync_ref; int64_t ts_offset; int64_t last_ts; diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index e08455478f..ac7fe3b27a 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -235,6 +235,7 @@ static void init_options(OptionsContext *o) o->chapters_input_file = INT_MAX; o->accurate_seek = 1; o->thread_queue_size = -1; +o->input_sync_ref = -1; } static int show_hwaccels(void *optctx, const char *opt, const char *arg) @@ -287,6 +288,58 @@ static int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, in return 0; } +static int apply_sync_offsets(void) +{ +for (int i = 0; i < nb_input_files; i++) { +InputFile *ref, *self = input_files[i]; +int64_t adjustment; +int64_t self_start_time, ref_start_time, self_seek_start, ref_seek_start; +int start_times_set = 1; + +if (self->input_sync_ref == -1 || self->input_sync_ref == i) continue; +if (self->input_sync_ref >= nb_input_files || self->input_sync_ref < -1) { +av_log(NULL, AV_LOG_FATAL, "-isync for input %d references non-existent input %d.\n", i, self->input_sync_ref); +exit_program(1); +} + +if (copy_ts && !start_at_zero) { +av_log(NULL, AV_LOG_FATAL, "Use of -isync requires that start_at_zero be set if copyts is set.\n"); +exit_program(1); +} + +ref = input_files[self->input_sync_ref]; +if (ref->input_sync_ref != -1 && ref->input_sync_ref != self->input_sync_ref) { +av_log(NULL, AV_LOG_ERROR, "-isync for input %d references a resynced input %d. Sync not set.\n", i, self->input_sync_ref); +continue; +} + +if (self->ctx->start_time_realtime != AV_NOPTS_VALUE && ref->ctx->start_time_realtime != AV_NOPTS_VALUE) { +self_start_time = self->ctx->start_time_realtime; +ref_start_time = ref->ctx->start_time_realtime; +} else if (self->ctx->start_time != AV_NOPTS_VALUE && ref->ctx->start_time != AV_NOPTS_VALUE) { +self_start_time = self->
[FFmpeg-cvslog] ffmpeg: add option -isync
ffmpeg | branch: release/5.1 | Gyan Doshi | Mon Jun 13 16:50:44 2022 +0530| [b21d387d6f83c71dd756d670840107473e8bebb0] | committer: Gyan Doshi ffmpeg: add option -isync This is a per-file input option that adjusts an input's timestamps with reference to another input, so that emitted packet timestamps account for the difference between the start times of the two inputs. Typical use case is to sync two or more live inputs such as from capture devices. Both the target and reference input source timestamps should be based on the same clock source. If either input lacks starting timestamps, then no sync adjustment is made. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b21d387d6f83c71dd756d670840107473e8bebb0 --- doc/ffmpeg.texi | 15 + fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_opt.c | 59 3 files changed, 76 insertions(+) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 1a534ff1cc..767df69b7f 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -518,6 +518,21 @@ see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) Like the @code{-ss} option but relative to the "end of file". That is negative values are earlier in the file, 0 is at EOF. +@item -isync @var{input_index} (@emph{input}) +Assign an input as a sync source. + +This will take the difference between the start times of the target and reference inputs and +offset the timestamps of the target file by that difference. The source timestamps of the two +inputs should derive from the same clock source for expected results. If @code{copyts} is set +then @code{start_at_zero} must also be set. If either of the inputs has no starting timestamp +then no sync adjustment is made. + +Acceptable values are those that refer to a valid ffmpeg input index. If the sync reference is +the target index itself or @var{-1}, then no adjustment is made to target timestamps. A sync +reference may not itself be synced to any other input. + +Default value is @var{-1}. + @item -itsoffset @var{offset} (@emph{input}) Set the input time offset. diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 99d31c346e..391a35cf50 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -118,6 +118,7 @@ typedef struct OptionsContext { float readrate; int accurate_seek; int thread_queue_size; +int input_sync_ref; SpecifierOpt *ts_scale; intnb_ts_scale; @@ -410,6 +411,7 @@ typedef struct InputFile { at the moment when looping happens */ AVRational time_base; /* time base of the duration */ int64_t input_ts_offset; +int input_sync_ref; int64_t ts_offset; int64_t last_ts; diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index e08455478f..ac7fe3b27a 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -235,6 +235,7 @@ static void init_options(OptionsContext *o) o->chapters_input_file = INT_MAX; o->accurate_seek = 1; o->thread_queue_size = -1; +o->input_sync_ref = -1; } static int show_hwaccels(void *optctx, const char *opt, const char *arg) @@ -287,6 +288,58 @@ static int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, in return 0; } +static int apply_sync_offsets(void) +{ +for (int i = 0; i < nb_input_files; i++) { +InputFile *ref, *self = input_files[i]; +int64_t adjustment; +int64_t self_start_time, ref_start_time, self_seek_start, ref_seek_start; +int start_times_set = 1; + +if (self->input_sync_ref == -1 || self->input_sync_ref == i) continue; +if (self->input_sync_ref >= nb_input_files || self->input_sync_ref < -1) { +av_log(NULL, AV_LOG_FATAL, "-isync for input %d references non-existent input %d.\n", i, self->input_sync_ref); +exit_program(1); +} + +if (copy_ts && !start_at_zero) { +av_log(NULL, AV_LOG_FATAL, "Use of -isync requires that start_at_zero be set if copyts is set.\n"); +exit_program(1); +} + +ref = input_files[self->input_sync_ref]; +if (ref->input_sync_ref != -1 && ref->input_sync_ref != self->input_sync_ref) { +av_log(NULL, AV_LOG_ERROR, "-isync for input %d references a resynced input %d. Sync not set.\n", i, self->input_sync_ref); +continue; +} + +if (self->ctx->start_time_realtime != AV_NOPTS_VALUE && ref->ctx->start_time_realtime != AV_NOPTS_VALUE) { +self_start_time = self->ctx->start_time_realtime; +ref_start_time = ref->ctx->start_time_realtime; +} else if (self->ctx->start_time != AV_NOPTS_VALUE && ref->ctx->start_time != AV_NOPTS_VALUE) { +self_start_time = self->
[FFmpeg-cvslog] doc/ffmpeg: correct description of -shortest
ffmpeg | branch: master | Gyan Doshi | Mon Jul 4 15:01:48 2022 +0530| [dba7376d59d61c434b046ce9087368f71b60045d] | committer: Gyan Doshi doc/ffmpeg: correct description of -shortest -shortest stops 'recording' when the shortest output stream ends. The native or even seek-adjusted duration of the source input stream isn't considered. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dba7376d59d61c434b046ce9087368f71b60045d --- doc/ffmpeg.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index d943f4d6f5..1a534ff1cc 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -1749,7 +1749,7 @@ Default value is 0. @item -bitexact (@emph{input/output}) Enable bitexact mode for (de)muxer and (de/en)coder @item -shortest (@emph{output}) -Finish encoding when the shortest input stream ends. +Finish encoding when the shortest output stream ends. @item -dts_delta_threshold Timestamp discontinuity delta threshold. @item -dts_error_threshold @var{seconds} ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/Makefile: always make colorspace.o
ffmpeg | branch: master | Gyan Doshi | Sat Jun 25 11:50:45 2022 +0530| [0744c84792f78bc4de082ef8ca041f66852b506b] | committer: Gyan Doshi avfilter/Makefile: always make colorspace.o Unbreaks libavfilter builds when configured with a subset of filters. drawutils added ff_draw_init2 in 6c3a82f043 which calls functions defined in colorspace.c. So the latter needs to be built alongside the former. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0744c84792f78bc4de082ef8ca041f66852b506b --- libavfilter/Makefile | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 7ba1c8a861..22b0a0ca15 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -13,6 +13,7 @@ OBJS = allfilters.o \ avfiltergraph.o \ buffersink.o \ buffersrc.o \ + colorspace.o \ drawutils.o \ fifo.o \ formats.o\ @@ -225,7 +226,7 @@ OBJS-$(CONFIG_COLORHOLD_FILTER) += vf_colorkey.o OBJS-$(CONFIG_COLORLEVELS_FILTER)+= vf_colorlevels.o OBJS-$(CONFIG_COLORMAP_FILTER) += vf_colormap.o OBJS-$(CONFIG_COLORMATRIX_FILTER)+= vf_colormatrix.o -OBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o colorspace.o colorspacedsp.o +OBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o colorspacedsp.o OBJS-$(CONFIG_COLORTEMPERATURE_FILTER) += vf_colortemperature.o OBJS-$(CONFIG_CONVOLUTION_FILTER)+= vf_convolution.o OBJS-$(CONFIG_CONVOLUTION_OPENCL_FILTER) += vf_convolution_opencl.o opencl.o \ @@ -327,8 +328,8 @@ OBJS-$(CONFIG_HWMAP_FILTER) += vf_hwmap.o OBJS-$(CONFIG_HWUPLOAD_CUDA_FILTER) += vf_hwupload_cuda.o OBJS-$(CONFIG_HWUPLOAD_FILTER) += vf_hwupload.o OBJS-$(CONFIG_HYSTERESIS_FILTER) += vf_hysteresis.o framesync.o -OBJS-$(CONFIG_ICCDETECT_FILTER) += vf_iccdetect.o fflcms2.o colorspace.o -OBJS-$(CONFIG_ICCGEN_FILTER) += vf_iccgen.o fflcms2.o colorspace.o +OBJS-$(CONFIG_ICCDETECT_FILTER) += vf_iccdetect.o fflcms2.o +OBJS-$(CONFIG_ICCGEN_FILTER) += vf_iccgen.o fflcms2.o OBJS-$(CONFIG_IDENTITY_FILTER) += vf_identity.o OBJS-$(CONFIG_IDET_FILTER) += vf_idet.o OBJS-$(CONFIG_IL_FILTER) += vf_il.o @@ -492,8 +493,8 @@ OBJS-$(CONFIG_TLUT2_FILTER) += vf_lut2.o framesync.o OBJS-$(CONFIG_TMEDIAN_FILTER)+= vf_xmedian.o framesync.o OBJS-$(CONFIG_TMIDEQUALIZER_FILTER) += vf_tmidequalizer.o OBJS-$(CONFIG_TMIX_FILTER) += vf_mix.o framesync.o -OBJS-$(CONFIG_TONEMAP_FILTER)+= vf_tonemap.o colorspace.o -OBJS-$(CONFIG_TONEMAP_OPENCL_FILTER) += vf_tonemap_opencl.o colorspace.o opencl.o \ +OBJS-$(CONFIG_TONEMAP_FILTER)+= vf_tonemap.o +OBJS-$(CONFIG_TONEMAP_OPENCL_FILTER) += vf_tonemap_opencl.o opencl.o \ opencl/tonemap.o opencl/colorspace_common.o OBJS-$(CONFIG_TONEMAP_VAAPI_FILTER) += vf_tonemap_vaapi.o vaapi_vpp.o OBJS-$(CONFIG_TPAD_FILTER) += vf_tpad.o ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/mfenc: set variable frame size flag.
ffmpeg | branch: master | Gyan Doshi | Fri Jun 17 11:30:05 2022 +0530| [56419428a85fa83c2d2275b6eb82a4e7ac543401] | committer: Gyan Doshi avcodec/mfenc: set variable frame size flag. Default avctx->frame_size is 0 which led to init failure for audio MediaFoundation encoders since 827d6fe73d. The MF audio encoders accept variable frame size input buffers. Fixes #9802 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=56419428a85fa83c2d2275b6eb82a4e7ac543401 --- libavcodec/mfenc.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c index 13ed7b3e11..bbe78605a9 100644 --- a/libavcodec/mfenc.c +++ b/libavcodec/mfenc.c @@ -1220,7 +1220,7 @@ static int mf_init(AVCodecContext *avctx) #define OFFSET(x) offsetof(MFContext, x) -#define MF_ENCODER(MEDIATYPE, NAME, ID, OPTS, EXTRA) \ +#define MF_ENCODER(MEDIATYPE, NAME, ID, OPTS, FMTS, CAPS) \ static const AVClass ff_ ## NAME ## _mf_encoder_class = { \ .class_name = #NAME "_mf", \ .item_name = av_default_item_name, \ @@ -1237,9 +1237,8 @@ static int mf_init(AVCodecContext *avctx) .init = mf_init, \ .close = mf_close, \ FF_CODEC_RECEIVE_PACKET_CB(mf_receive_packet), \ -EXTRA \ -.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID | \ - AV_CODEC_CAP_DR1, \ +FMTS \ +CAPS \ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | \ FF_CODEC_CAP_INIT_CLEANUP, \ }; @@ -1247,10 +1246,13 @@ static int mf_init(AVCodecContext *avctx) #define AFMTS \ .p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, \ AV_SAMPLE_FMT_NONE }, +#define ACAPS \ +.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID | \ + AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE, -MF_ENCODER(AUDIO, aac, AAC, NULL, AFMTS); -MF_ENCODER(AUDIO, ac3, AC3, NULL, AFMTS); -MF_ENCODER(AUDIO, mp3, MP3, NULL, AFMTS); +MF_ENCODER(AUDIO, aac, AAC, NULL, AFMTS, ACAPS); +MF_ENCODER(AUDIO, ac3, AC3, NULL, AFMTS, ACAPS); +MF_ENCODER(AUDIO, mp3, MP3, NULL, AFMTS, ACAPS); #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption venc_opts[] = { @@ -1283,6 +1285,9 @@ static const AVOption venc_opts[] = { .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, \ AV_PIX_FMT_YUV420P, \ AV_PIX_FMT_NONE }, +#define VCAPS \ +.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HYBRID | \ + AV_CODEC_CAP_DR1, -MF_ENCODER(VIDEO, h264,H264, venc_opts, VFMTS); -MF_ENCODER(VIDEO, hevc,HEVC, venc_opts, VFMTS); +MF_ENCODER(VIDEO, h264,H264, venc_opts, VFMTS, VCAPS); +MF_ENCODER(VIDEO, hevc,HEVC, venc_opts, VFMTS, VCAPS); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/APIchanges: add missing marker for release 5.0
ffmpeg | branch: master | Gyan Doshi | Tue Jun 14 15:27:51 2022 +0530| [557a1a8af27a2666433ca9970a15addcd1d8a506] | committer: Gyan Doshi doc/APIchanges: add missing marker for release 5.0 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=557a1a8af27a2666433ca9970a15addcd1d8a506 --- doc/APIchanges | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index 5857e67ae6..20b944933a 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -96,6 +96,8 @@ API changes, most recent first: 2022-01-26 - af94ab7c7c0 - lavu 57.19.100 - tx.h Add AV_TX_FLOAT_RDFT, AV_TX_DOUBLE_RDFT and AV_TX_INT32_RDFT. + 8< - FFmpeg 5.0 was cut here 8< - + 2022-01-04 - 78dc21b123e - lavu 57.16.100 - frame.h Add AV_FRAME_DATA_DOVI_METADATA. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] ffmpeg: add option fps_mode
ffmpeg | branch: master | Gyan Doshi | Tue Jun 7 17:54:54 2022 +0530| [09c53a04c5892baee88872fbce3df17a00472faa] | committer: Gyan Doshi ffmpeg: add option fps_mode fps_mode sets video sync per output stream. Overrides vsync for matching streams. vsync is deprecated. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=09c53a04c5892baee88872fbce3df17a00472faa --- doc/ffmpeg.texi | 14 -- fftools/ffmpeg.c | 9 + fftools/ffmpeg.h | 3 +++ fftools/ffmpeg_mux.c | 2 +- fftools/ffmpeg_opt.c | 42 +++--- 5 files changed, 48 insertions(+), 22 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 0d7e1a479d..51515c2cb8 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -1618,12 +1618,14 @@ it may cause packet loss. It is useful for when flow speed of output packets is important, such as live streaming. @item -re (@emph{input}) Read input at native frame rate. This is equivalent to setting @code{-readrate 1}. -@item -vsync @var{parameter} -Video sync method. - -For compatibility reasons some of the values can be specified as numbers (shown -in parentheses in the following table). This is deprecated and will stop working -in the future. +@item -vsync @var{parameter} (@emph{global}) +@itemx -fps_mode[:@var{stream_specifier}] @var{parameter} (@emph{output,per-stream}) +Set video sync method / framerate mode. vsync is applied to all output video streams +but can be overridden for a stream by setting fps_mode. vsync is deprecated and will be +removed in the future. + +For compatibility reasons some of the values for vsync can be specified as numbers (shown +in parentheses in the following table). @table @option @item passthrough (0) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index a5e1bf3993..09caa3e3c4 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3017,11 +3017,12 @@ static int init_output_stream_encode(OutputStream *ost, AVFrame *frame) if (!(enc_ctx->time_base.num && enc_ctx->time_base.den)) enc_ctx->time_base = av_buffersink_get_time_base(ost->filter->filter); -if ( av_q2d(enc_ctx->time_base) < 0.001 && video_sync_method != VSYNC_PASSTHROUGH - && (video_sync_method == VSYNC_CFR || video_sync_method == VSYNC_VSCFR || - (video_sync_method == VSYNC_AUTO && !(of->format->flags & AVFMT_VARIABLE_FPS{ +if ( av_q2d(enc_ctx->time_base) < 0.001 && ost->vsync_method != VSYNC_PASSTHROUGH + && (ost->vsync_method == VSYNC_CFR || ost->vsync_method == VSYNC_VSCFR || + (ost->vsync_method == VSYNC_AUTO && !(of->format->flags & AVFMT_VARIABLE_FPS{ av_log(oc, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n" - "Please consider specifying a lower framerate, a different muxer or -vsync 2\n"); + "Please consider specifying a lower framerate, a different muxer or " + "setting vsync/fps_mode to vfr\n"); } enc_ctx->width = av_buffersink_get_w(ost->filter->filter); diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 7326193caf..69a368b8d1 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -176,6 +176,8 @@ typedef struct OptionsContext { intnb_qscale; SpecifierOpt *forced_key_frames; intnb_forced_key_frames; +SpecifierOpt *fps_mode; +intnb_fps_mode; SpecifierOpt *force_fps; intnb_force_fps; SpecifierOpt *frame_aspect_ratios; @@ -489,6 +491,7 @@ typedef struct OutputStream { AVRational max_frame_rate; enum VideoSyncMethod vsync_method; int is_cfr; +const char *fps_mode; int force_fps; int top_field_first; int rotate_overridden; diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 794d580635..a55fd18f8f 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -96,7 +96,7 @@ void of_write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, return; } -if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && video_sync_method == VSYNC_DROP) || +if ((st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && ost->vsync_method == VSYNC_DROP) || (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && audio_sync_method < 0)) pkt->pts = pkt->dts = AV_NOPTS_VALUE; diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 2c1b3bd0dd..398067da96 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -81,6 +81,7 @@ static const char *const opt_name_codec_tags[] = {"tag", "atag", static const char *const op
[FFmpeg-cvslog] doc/protocols: sort IPFS section alphabetically
ffmpeg | branch: master | Gyan Doshi | Thu May 26 16:13:33 2022 +0530| [8a0f7f7bfe86a2cc57edd5255ecc144dc17e51a3] | committer: Gyan Doshi doc/protocols: sort IPFS section alphabetically > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8a0f7f7bfe86a2cc57edd5255ecc144dc17e51a3 --- doc/protocols.texi | 62 +++--- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index 90a9eefde0..399e998068 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -614,6 +614,37 @@ Establish a TLS (HTTPS) connection to Icecast. icecast://[@var{username}[:@var{password}]@@]@var{server}:@var{port}/@var{mountpoint} @end example +@section ipfs + +InterPlanetary File System (IPFS) protocol support. One can access files stored +on the IPFS network through so called gateways. Those are http(s) endpoints. +This protocol wraps the IPFS native protocols (ipfs:// and ipns://) to be send +to such a gateway. Users can (and should) host their own node which means this +protocol will use your local gateway to access files on the IPFS network. + +If a user doesn't have a node of their own then the public gateway dweb.link is +used by default. + +You can use this protocol in 2 ways. Using IPFS: +@example +ffplay ipfs://QmbGtJg23skhvFmu9mJiePVByhfzu5rwo74MEkVDYAmF5T +@end example + +Or the IPNS protocol (IPNS is mutable IPFS): +@example +ffplay ipns://QmbGtJg23skhvFmu9mJiePVByhfzu5rwo74MEkVDYAmF5T +@end example + +You can also change the gateway to be used: + +@table @option + +@item gateway +Defines the gateway to use. When nothing is provided the protocol will first try +your local gateway. If that fails dweb.link will be used. + +@end table + @section mmst MMS (Microsoft Media Server) protocol over TCP. @@ -2025,35 +2056,4 @@ decoding errors. @end table -@section ipfs - -InterPlanetary File System (IPFS) protocol support. One can access files stored -on the IPFS network through so called gateways. Those are http(s) endpoints. -This protocol wraps the IPFS native protocols (ipfs:// and ipns://) to be send -to such a gateway. Users can (and should) host their own node which means this -protocol will use your local gateway to access files on the IPFS network. - -If a user doesn't have a node of their own then the public gateway dweb.link is -used by default. - -You can use this protocol in 2 ways. Using IPFS: -@example -ffplay ipfs://QmbGtJg23skhvFmu9mJiePVByhfzu5rwo74MEkVDYAmF5T -@end example - -Or the IPNS protocol (IPNS is mutable IPFS): -@example -ffplay ipns://QmbGtJg23skhvFmu9mJiePVByhfzu5rwo74MEkVDYAmF5T -@end example - -You can also change the gateway to be used: - -@table @option - -@item gateway -Defines the gateway to use. When nothing is provided the protocol will first try -your local gateway. If that fails dweb.link will be used. - -@end table - @c man end PROTOCOLS ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/protocols: add details and reformat IPFS section
ffmpeg | branch: master | Gyan Doshi | Thu May 26 16:36:57 2022 +0530| [0dcbe1c1aa8ace2a84a4a7963acd755c4bbd96fb] | committer: Gyan Doshi doc/protocols: add details and reformat IPFS section > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0dcbe1c1aa8ace2a84a4a7963acd755c4bbd96fb --- doc/protocols.texi | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index 399e998068..39b719dc50 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -617,15 +617,26 @@ icecast://[@var{username}[:@var{password}]@@]@var{server}:@var{port}/@var{mountp @section ipfs InterPlanetary File System (IPFS) protocol support. One can access files stored -on the IPFS network through so called gateways. Those are http(s) endpoints. -This protocol wraps the IPFS native protocols (ipfs:// and ipns://) to be send +on the IPFS network through so-called gateways. These are http(s) endpoints. +This protocol wraps the IPFS native protocols (ipfs:// and ipns://) to be sent to such a gateway. Users can (and should) host their own node which means this -protocol will use your local gateway to access files on the IPFS network. +protocol will use one's local gateway to access files on the IPFS network. -If a user doesn't have a node of their own then the public gateway dweb.link is -used by default. +If a user doesn't have a node of their own then the public gateway @code{https://dweb.link} +is used by default. -You can use this protocol in 2 ways. Using IPFS: +This protocol accepts the following options: + +@table @option + +@item gateway +Defines the gateway to use. When not set, the protocol will first try +locating the local gateway by looking at @code{$IPFS_GATEWAY}, @code{$IPFS_PATH} +and @code{$HOME/.ipfs/}, in that order. If that fails @code{https://dweb.link} will be used. + +@end table + +One can use this protocol in 2 ways. Using IPFS: @example ffplay ipfs://QmbGtJg23skhvFmu9mJiePVByhfzu5rwo74MEkVDYAmF5T @end example @@ -635,16 +646,6 @@ Or the IPNS protocol (IPNS is mutable IPFS): ffplay ipns://QmbGtJg23skhvFmu9mJiePVByhfzu5rwo74MEkVDYAmF5T @end example -You can also change the gateway to be used: - -@table @option - -@item gateway -Defines the gateway to use. When nothing is provided the protocol will first try -your local gateway. If that fails dweb.link will be used. - -@end table - @section mmst MMS (Microsoft Media Server) protocol over TCP. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] opt_common: note D and T type streams for completeness.
ffmpeg | branch: master | Gyan Doshi | Thu May 19 19:36:45 2022 +0530| [9ab20b1614194280b862d98dfcdb7b1bcff03329] | committer: Gyan Doshi opt_common: note D and T type streams for completeness. Addresses #9784 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9ab20b1614194280b862d98dfcdb7b1bcff03329 --- fftools/opt_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fftools/opt_common.c b/fftools/opt_common.c index 55d86eeb19..ae5e28a5af 100644 --- a/fftools/opt_common.c +++ b/fftools/opt_common.c @@ -675,6 +675,8 @@ int show_codecs(void *optctx, const char *opt, const char *arg) " ..V... = Video codec\n" " ..A... = Audio codec\n" " ..S... = Subtitle codec\n" + " ..D... = Data codec\n" + " ..T... = Attachment codec\n" " ...I.. = Intra frame-only codec\n" " L. = Lossy compression\n" " .S = Lossless compression\n" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/muxers: note write_btrt option for MOV/MP4
ffmpeg | branch: master | Gyan Doshi | Mon May 16 14:10:48 2022 +0530| [00ae20dfb49a748df7bfe30c2447cb1815881c89] | committer: Gyan Doshi doc/muxers: note write_btrt option for MOV/MP4 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=00ae20dfb49a748df7bfe30c2447cb1815881c89 --- doc/muxers.texi | 8 1 file changed, 8 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index 1af603b7f6..b6cafaa5fd 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -1731,6 +1731,14 @@ B-frames. Additionally, eases conformance with the DASH-IF interoperability guidelines. This option is implicitly set when writing ismv (Smooth Streaming) files. + +@item -write_btrt @var{bool} +Force or disable writing bitrate box inside stsd box of a track. +The box contains decoding buffer size (in bytes), maximum bitrate and +average bitrate for the track. The box will be skipped if none of these values +can be computed. +Default is @code{-1} or @code{auto}, which will write the box only in MP4 mode. + @item -write_prft Write producer time reference box (PRFT) with a specified time source for the NTP field in the PRFT box. Set value as @samp{wallclock} to specify timesource ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/dashdec: accept and relay CENC decryption key
ffmpeg | branch: master | Gyan Doshi | Sat May 14 14:56:56 2022 +0530| [8b64d8d9aa7fede94ab531b7be3f73cd2f3c448c] | committer: Gyan Doshi avformat/dashdec: accept and relay CENC decryption key Allows to process CENC-encrypted media segments. Option arg syntax is same as that for option decryption_key in MOV demuxer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b64d8d9aa7fede94ab531b7be3f73cd2f3c448c --- doc/demuxers.texi | 11 +++ libavformat/dashdec.c | 5 + 2 files changed, 16 insertions(+) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 238b8e03a8..c95a9ae594 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -274,6 +274,17 @@ which streams to actually receive. Each stream mirrors the @code{id} and @code{bandwidth} properties from the @code{} as metadata keys named "id" and "variant_bitrate" respectively. +@subsection Options + +This demuxer accepts the following option: + +@table @option + +@item cenc_decryption_key +16-byte key, in hex, to decrypt files encrypted using ISO Common Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7). + +@end table + @section imf Interoperable Master Format demuxer. diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 0b5ff5aeb9..0f66251354 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -150,6 +150,7 @@ typedef struct DASHContext { char *allowed_extensions; AVDictionary *avio_opts; int max_url_size; +char *cenc_decryption_key; /* Flags for init section*/ int is_init_section_common_video; @@ -1893,6 +1894,9 @@ static int reopen_demux_for_component(AVFormatContext *s, struct representation pls->ctx->pb = >pb.pub; pls->ctx->io_open = nested_io_open; +if (c->cenc_decryption_key) +av_dict_set(_fmt_opts, "decryption_key", c->cenc_decryption_key, AV_OPT_FLAG_DECODING_PARAM); + // provide additional information from mpd if available ret = avformat_open_input(>ctx, "", in_fmt, _fmt_opts); //pls->init_section->url av_dict_free(_fmt_opts); @@ -2344,6 +2348,7 @@ static const AVOption dash_options[] = { OFFSET(allowed_extensions), AV_OPT_TYPE_STRING, {.str = "aac,m4a,m4s,m4v,mov,mp4,webm,ts"}, INT_MIN, INT_MAX, FLAGS}, +{ "cenc_decryption_key", "Media decryption key (hex)", OFFSET(cenc_decryption_key), AV_OPT_TYPE_STRING, {.str = NULL}, INT_MIN, INT_MAX, .flags = FLAGS }, {NULL} }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/geq: unbreak alpha processing
ffmpeg | branch: master | Gyan Doshi | Sat May 7 17:42:18 2022 +0530| [b980d9e8ecf5d4bc5e39a74bdad98c7cc400da84] | committer: Gyan Doshi avfilter/geq: unbreak alpha processing d607af50fd broke alpha processing by always overwriting any supplied alpha expression. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b980d9e8ecf5d4bc5e39a74bdad98c7cc400da84 --- libavfilter/vf_geq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c index fd9e0fd80b..2b53980278 100644 --- a/libavfilter/vf_geq.c +++ b/libavfilter/vf_geq.c @@ -275,7 +275,7 @@ static av_cold int geq_init(AVFilterContext *ctx) if (!geq->expr_str[A] && geq->bps != 32) { geq->expr_str[A] = av_asprintf("%d", (1<bps) - 1); -} else { +} else if (!geq->expr_str[A]) { geq->expr_str[A] = av_asprintf("%f", 1.f); } if (!geq->expr_str[G]) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] configure: bump year
ffmpeg | branch: release/2.8 | Gyan Doshi | Sat Jan 1 00:47:41 2022 +0530| [7dae15a42bf6e19df2446fdcfaa1a7938aa2f427] | committer: Michael Niedermayer configure: bump year (cherry picked from commit 2f6360ff21a98f9db6af3e0932d39f1dc7b47d6c) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7dae15a42bf6e19df2446fdcfaa1a7938aa2f427 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index c7d889d16f..dd0a65e678 100755 --- a/configure +++ b/configure @@ -6144,7 +6144,7 @@ cat > $TMPH <https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] configure: bump year
ffmpeg | branch: release/3.4 | Gyan Doshi | Sat Jan 1 00:47:41 2022 +0530| [64c2815c29b353af61a1c509e63cb014c8f4f6f4] | committer: Michael Niedermayer configure: bump year (cherry picked from commit 2f6360ff21a98f9db6af3e0932d39f1dc7b47d6c) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64c2815c29b353af61a1c509e63cb014c8f4f6f4 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 30b1e2107c..e6d9030d84 100755 --- a/configure +++ b/configure @@ -7000,7 +7000,7 @@ cat > $TMPH <https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] configure: bump year
ffmpeg | branch: release/3.2 | Gyan Doshi | Sat Jan 1 00:47:41 2022 +0530| [a82872c2839660fad35dce157963781b708c4044] | committer: Michael Niedermayer configure: bump year (cherry picked from commit 2f6360ff21a98f9db6af3e0932d39f1dc7b47d6c) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a82872c2839660fad35dce157963781b708c4044 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 245783d4de..194b639f38 100755 --- a/configure +++ b/configure @@ -6703,7 +6703,7 @@ cat > $TMPH <https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] configure: bump year
ffmpeg | branch: release/4.1 | Gyan Doshi | Sat Jan 1 00:47:41 2022 +0530| [d8416843327813c44fbecd7a4314122cdabe1ff3] | committer: Michael Niedermayer configure: bump year (cherry picked from commit 2f6360ff21a98f9db6af3e0932d39f1dc7b47d6c) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d8416843327813c44fbecd7a4314122cdabe1ff3 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 88ea656f4f..9a8a368a12 100755 --- a/configure +++ b/configure @@ -7243,7 +7243,7 @@ cat > $TMPH <https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] configure: bump year
ffmpeg | branch: release/4.2 | Gyan Doshi | Sat Jan 1 00:47:41 2022 +0530| [773e4c43f6987f9364089f8995c3088437342832] | committer: Michael Niedermayer configure: bump year (cherry picked from commit 2f6360ff21a98f9db6af3e0932d39f1dc7b47d6c) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=773e4c43f6987f9364089f8995c3088437342832 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 69c708f4a4..927857fd10 100755 --- a/configure +++ b/configure @@ -7397,7 +7397,7 @@ cat > $TMPH <https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/lensfun: add option db_path
ffmpeg | branch: master | Gyan Doshi | Sun Apr 10 11:45:27 2022 +0530| [1405b65d22d8e05ae8bb74fc13e275be2ae6b9f9] | committer: Gyan Doshi avfilter/lensfun: add option db_path The lensfun filter, at present, loads its database from a path hardcoded at build time. This may not be known or available to end users. Added option db_path allows custom path. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1405b65d22d8e05ae8bb74fc13e275be2ae6b9f9 --- doc/filters.texi | 4 libavfilter/vf_lensfun.c | 8 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 24c2243b2a..c04537e2d6 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -14700,6 +14700,10 @@ required. The model of the lens (for example, "Canon EF-S 18-55mm f/3.5-5.6 IS STM"). This option is required. +@item db_path +The full path to the lens database folder. If not set, the filter will attempt to +load the database from the install path when the library was built. Default is unset. + @item mode The type of correction to apply. The following values are valid options: diff --git a/libavfilter/vf_lensfun.c b/libavfilter/vf_lensfun.c index 596daed104..35c522a723 100644 --- a/libavfilter/vf_lensfun.c +++ b/libavfilter/vf_lensfun.c @@ -73,7 +73,7 @@ typedef struct DistortionCorrectionThreadData { typedef struct LensfunContext { const AVClass *class; -const char *make, *model, *lens_model; +const char *make, *model, *lens_model, *db_path; int mode; float focal_length; float aperture; @@ -97,6 +97,7 @@ static const AVOption lensfun_options[] = { { "make", "set camera maker", OFFSET(make), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, { "model", "set camera model", OFFSET(model), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, { "lens_model", "set lens model", OFFSET(lens_model), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, +{ "db_path", "set path to database", OFFSET(db_path), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, { "mode", "set mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=GEOMETRY_DISTORTION}, 0, VIGNETTING | GEOMETRY_DISTORTION | SUBPIXEL_DISTORTION, FLAGS, "mode" }, { "vignetting", "fix lens vignetting", 0, AV_OPT_TYPE_CONST, {.i64=VIGNETTING}, 0, 0, FLAGS, "mode" }, { "geometry", "correct geometry distortion", 0, AV_OPT_TYPE_CONST, {.i64=GEOMETRY_DISTORTION}, 0, 0, FLAGS, "mode" }, @@ -136,9 +137,10 @@ static av_cold int init(AVFilterContext *ctx) const lfLens **lenses; db = lf_db_create(); -if (lf_db_load(db) != LF_NO_ERROR) { +if ((lensfun->db_path ? lf_db_load_path(db, lensfun->db_path) : lf_db_load(db)) != LF_NO_ERROR) { lf_db_destroy(db); -av_log(ctx, AV_LOG_FATAL, "Failed to load lensfun database\n"); +av_log(ctx, AV_LOG_FATAL, "Failed to load lensfun database from %s path\n", + lensfun->db_path ? lensfun->db_path : "default"); return AVERROR_INVALIDDATA; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: guide to list lensfun db emtries
ffmpeg | branch: master | Gyan Doshi | Mon Apr 11 16:33:22 2022 +0530| [d6d46a2c508be0bc603874b49997a06a44feed7b] | committer: Gyan Doshi doc/filters: guide to list lensfun db emtries > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d6d46a2c508be0bc603874b49997a06a44feed7b --- doc/filters.texi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 6a66b0ed11..4e9b0e0111 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -14679,6 +14679,13 @@ filter choosing the best match with the given options, and the filter will output the chosen camera and lens models (logged with level "info"). You must provide the make, camera model, and lens model as they are required. +To obtain a list of available makes and models, leave out one or both of @code{make} and +@code{model} options. The filter will send the full list to the log with level @code{INFO}. +The first column is the make and the second column is the model. +To obtain a list of available lenses, set any values for make and model and leave out the +@code{lens_model} option. The filter will send the full list of lenses in the log with level +@code{INFO}. The ffmpeg tool will exit after the list is printed. + The filter accepts the following options: @table @option ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: add range/defaults for tile filter options
ffmpeg | branch: master | Gyan Doshi | Thu Apr 7 16:14:43 2022 +0530| [607ecc27ed9c22c75d063b462b3e78b47e7d742c] | committer: Gyan Doshi doc/filters: add range/defaults for tile filter options > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=607ecc27ed9c22c75d063b462b3e78b47e7d742c --- doc/filters.texi | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 3fbaebb09c..6a66b0ed11 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -21406,9 +21406,8 @@ The filter accepts the following options: @table @option @item layout -Set the grid size (i.e. the number of lines and columns). For the syntax of -this option, check the -@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}. +Set the grid size in the form @code{COLUMNSxROWS}. Range is upto UINT_MAX cells. +Default is @code{6x5}. @item nb_frames Set the maximum number of frames to render in the given area. It must be less @@ -21416,12 +21415,12 @@ than or equal to @var{w}x@var{h}. The default value is @code{0}, meaning all the area will be used. @item margin -Set the outer border margin in pixels. +Set the outer border margin in pixels. Range is 0 to 1024. Default is @code{0}. @item padding Set the inner border thickness (i.e. the number of pixels between frames). For more advanced padding options (such as having different values for the edges), -refer to the pad video filter. +refer to the pad video filter. Range is 0 to 1024. Default is @code{0}. @item color Specify the color of the unused area. For the syntax of this option, check the @@ -21430,12 +21429,12 @@ The default value of @var{color} is "black". @item overlap Set the number of frames to overlap when tiling several successive frames together. -The value must be between @code{0} and @var{nb_frames - 1}. +The value must be between @code{0} and @var{nb_frames - 1}. Default is @code{0}. @item init_padding Set the number of frames to initially be empty before displaying first output frame. This controls how soon will one get first output frame. -The value must be between @code{0} and @var{nb_frames - 1}. +The value must be between @code{0} and @var{nb_frames - 1}. Default is @code{0}. @end table @subsection Examples ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/encoders: update libwebpenc quality option
ffmpeg | branch: master | Gyan Doshi | Thu Mar 24 17:47:46 2022 +0530| [fa12d808d7239d120a3b43b6fb7e106db4e46d30] | committer: Gyan Doshi doc/encoders: update libwebpenc quality option A private encoder option 'quality' was added in 716674b151, making the doc entry obsolete. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa12d808d7239d120a3b43b6fb7e106db4e46d30 --- doc/encoders.texi | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index 1bd38671ca..4b8cc69c0d 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -2261,11 +2261,10 @@ and compression tools used, and varies the combination of these tools. This maps to the @var{method} option in libwebp. The valid range is 0 to 6. Default is 4. -@item -qscale @var{float} -For lossy encoding, this controls image quality, 0 to 100. For lossless -encoding, this controls the effort and time spent at compressing more. The -default value is 75. Note that for usage via libavcodec, this option is called -@var{global_quality} and must be multiplied by @var{FF_QP2LAMBDA}. +@item -quality @var{float} +For lossy encoding, this controls image quality. For lossless encoding, this +controls the effort and time spent in compression. +Range is 0 to 100. Default is 75. @item -preset @var{type} Configuration preset. This does some automatic settings based on the general ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/bitstream_filters: add missing options in h264_metadata
ffmpeg | branch: master | Gyan Doshi | Mon Mar 21 16:15:16 2022 +0530| [505a7d39cd9990428899241a017ef523e236b9ca] | committer: Gyan Doshi doc/bitstream_filters: add missing options in h264_metadata > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=505a7d39cd9990428899241a017ef523e236b9ca --- doc/bitstream_filters.texi | 35 +++ 1 file changed, 35 insertions(+) diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi index 8c5d84dceb..0b354fda04 100644 --- a/doc/bitstream_filters.texi +++ b/doc/bitstream_filters.texi @@ -247,12 +247,16 @@ Modify metadata embedded in an H.264 stream. Insert or remove AUD NAL units in all access units of the stream. @table @samp +@item pass @item insert @item remove @end table +Default is pass. + @item sample_aspect_ratio Set the sample aspect ratio of the stream in the VUI parameters. +See H.264 table E-1. @item overscan_appropriate_flag Set whether the stream is suitable for display using overscan @@ -311,6 +315,37 @@ insert the string ``hello'' associated with the given UUID. @item delete_filler Deletes both filler NAL units and filler SEI messages. +@item display_orientation +Insert, extract or remove Display orientation SEI messages. +See H.264 section D.1.27 and D.2.27 for syntax and semantics. + +@table @samp +@item pass +@item insert +@item remove +@item extract +@end table + +Default is pass. + +Insert mode works in conjunction with @code {rotate} and @code{flip} options. +Any pre-existing Display orientation messages will be removed in insert or remove mode. +Extract mode attaches the display matrix to the packet as side data. + +@item rotate +Set rotation in display orientation SEI (anticlockwise angle in degrees). +Range is -360 to +360. Default is NaN. + +@item flip +Set flip in display orientation SEI. + +@table @samp +@item horizontal +@item vertical +@end table + +Default is unset. + @item level Set the level in the SPS. Refer to H.264 section A.3 and tables A-1 to A-5. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: correct default value of lut filters
ffmpeg | branch: master | Gyan Doshi | Thu Mar 3 17:06:33 2022 +0530| [72684d2c2df015fadefc06b6eb58964ad8afa2fe] | committer: Gyan Doshi doc/filters: correct default value of lut filters > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=72684d2c2df015fadefc06b6eb58964ad8afa2fe --- doc/filters.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index 8cba7f744d..571d9430c6 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -15096,7 +15096,7 @@ expression @end table -All expressions default to "val". +All expressions default to "clipval". @subsection Commands ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/drawtext: change reload value to an interval
ffmpeg | branch: master | Gyan Doshi | Mon Feb 28 13:13:42 2022 +0530| [4b72bca6ca3f982614ac2f94160c55abe3778555] | committer: Gyan Doshi avfilter/drawtext: change reload value to an interval Allows user to specify a frame interval at which textfile is reloaded. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4b72bca6ca3f982614ac2f94160c55abe3778555 --- doc/filters.texi | 6 -- libavfilter/vf_drawtext.c | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index c5cba2aa2d..8cba7f744d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -11278,8 +11278,10 @@ text data in detection bboxes of side data. So please do not use this parameter if you are not sure about the text source. @item reload -If set to 1, the @var{textfile} will be reloaded before each frame. -Be sure to update it atomically, or it may be read partially, or even fail. +The @var{textfile} will be reloaded at specified frame interval. +Be sure to update @var{textfile} atomically, or it may be read partially, +or even fail. +Range is 0 to INT_MAX. Default is 0. @item x @item y diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 2a88692cbd..6ba3f6622a 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -198,7 +198,7 @@ typedef struct DrawTextContext { AVRational tc_rate;///< frame rate for timecode AVTimecode tc; ///< timecode context int tc24hmax; ///< 1 if timecode is wrapped to 24 hours, 0 otherwise -int reload; ///< reload text file for each frame +int reload; ///< reload text file at specified frame interval int start_number; ///< starting frame number for n/frame_num var char *text_source_string; ///< the string to specify text data source enum AVFrameSideDataType text_source; @@ -245,7 +245,7 @@ static const AVOption drawtext_options[]= { {"timecode_rate", "set rate (timecode only)", OFFSET(tc_rate), AV_OPT_TYPE_RATIONAL, {.dbl=0}, 0, INT_MAX, FLAGS}, {"r", "set rate (timecode only)", OFFSET(tc_rate), AV_OPT_TYPE_RATIONAL, {.dbl=0}, 0, INT_MAX, FLAGS}, {"rate","set rate (timecode only)", OFFSET(tc_rate), AV_OPT_TYPE_RATIONAL, {.dbl=0}, 0, INT_MAX, FLAGS}, -{"reload", "reload text file for each frame", OFFSET(reload), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, +{"reload", "reload text file at specified frame interval", OFFSET(reload), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS}, { "alpha", "apply alpha while rendering", OFFSET(a_expr), AV_OPT_TYPE_STRING, { .str = "1" }, .flags = FLAGS }, {"fix_bounds", "check and fix text coords to avoid clipping", OFFSET(fix_bounds), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, {"start_number", "start frame number for n/frame_num variable", OFFSET(start_number), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS}, @@ -1565,7 +1565,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) } } -if (s->reload) { +if (s->reload && !(inlink->frame_count_out % s->reload)) { if ((ret = load_textfile(ctx)) < 0) { av_frame_free(); return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/muxers: note video_track_timecale in mov
ffmpeg | branch: master | Gyan Doshi | Thu Feb 24 16:28:26 2022 +0530| [8ef03c2ff1338439913123a3ebafd1777dade061] | committer: Gyan Doshi doc/muxers: note video_track_timecale in mov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8ef03c2ff1338439913123a3ebafd1777dade061 --- doc/muxers.texi | 4 1 file changed, 4 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index 7c7669077d..1af603b7f6 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -1750,6 +1750,10 @@ Default is @code{false}. Set the timescale written in the movie header box (@code{mvhd}). Range is 1 to INT_MAX. Default is 1000. +@item -video_track_timescale @var{scale} +Set the timescale used for video tracks. Range is 0 to INT_MAX. +If set to @code{0}, the timescale is automatically set based on +the native stream time base. Default is 0. @end table @subsection Example ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/muxers: add entry for empty_hdlr_name in mov
ffmpeg | branch: master | Gyan Doshi | Thu Feb 17 16:26:33 2022 +0530| [281250808615eef26c33f22fa8a0712855c9c029] | committer: Gyan Doshi doc/muxers: add entry for empty_hdlr_name in mov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=281250808615eef26c33f22fa8a0712855c9c029 --- doc/muxers.texi | 4 1 file changed, 4 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index c49ae3a17b..7c7669077d 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -1742,6 +1742,10 @@ where PTS values are set as as wallclock time at the source. For example, an encoding use case with decklink capture source where @option{video_pts} and @option{audio_pts} are set to @samp{abs_wallclock}. +@item -empty_hdlr_name @var{bool} +Enable to skip writing the name inside a @code{hdlr} box. +Default is @code{false}. + @item -movie_timescale @var{scale} Set the timescale written in the movie header box (@code{mvhd}). Range is 1 to INT_MAX. Default is 1000. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/mpegts: initialize max_packet_size when sub-demuxer
ffmpeg | branch: master | Gyan Doshi | Sat Feb 5 18:54:10 2022 +0530| [b6bb6b9f22ff519644b16dcc71a4b92ee3979c1b] | committer: Gyan Doshi avformat/mpegts: initialize max_packet_size when sub-demuxer bca30570d2 added a user option to set max_packet_size replacing a hardcoded value. This had a side-effect of leaving the field set to 0 when packet demuxing is carried out from another demuxer using avpriv functions, which could lead to demux failure. Hardcoded max_packet_size inside avpriv_mpegts_parse_open to 2048000 to avoid this. Value chosen to be 10x that of default value to accommodate large payloads. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b6bb6b9f22ff519644b16dcc71a4b92ee3979c1b --- libavformat/mpegts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index da15223b8a..e23f596490 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -3377,6 +3377,7 @@ MpegTSContext *avpriv_mpegts_parse_open(AVFormatContext *s) return NULL; /* no stream case, currently used by RTP */ ts->raw_packet_size = TS_PACKET_SIZE; +ts->max_packet_size = 2048000; ts->stream = s; ts->auto_guess = 1; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] ffprobe: allow side-data selection by element
ffmpeg | branch: master | Gyan Doshi | Mon Jan 31 11:18:46 2022 +0530| [e1a14479a81f5366b95df543992a7fe637cf2dde] | committer: Gyan Doshi ffprobe: allow side-data selection by element At present, side data printing forces display for all levels i.e. stream, packets and frames. This can bloat output and also force decode of all frames in selected streams. Now, stream_side_data[=type], packet_side_data[=type] & frame_side_data[=type] can be used with -show_entries to specify carrier element. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e1a14479a81f5366b95df543992a7fe637cf2dde --- fftools/ffprobe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 20582ca7ac..8a8e3de540 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -223,7 +223,7 @@ static struct section sections[] = { [SECTION_ID_FRAME] = { SECTION_ID_FRAME, "frame", 0, { SECTION_ID_FRAME_TAGS, SECTION_ID_FRAME_SIDE_DATA_LIST, SECTION_ID_FRAME_LOGS, -1 } }, [SECTION_ID_FRAME_TAGS] = { SECTION_ID_FRAME_TAGS, "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "frame_tags" }, [SECTION_ID_FRAME_SIDE_DATA_LIST] ={ SECTION_ID_FRAME_SIDE_DATA_LIST, "side_data_list", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA, -1 }, .element_name = "side_data", .unique_name = "frame_side_data_list" }, -[SECTION_ID_FRAME_SIDE_DATA] = { SECTION_ID_FRAME_SIDE_DATA, "side_data", 0, { SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST, SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST, -1 } }, +[SECTION_ID_FRAME_SIDE_DATA] = { SECTION_ID_FRAME_SIDE_DATA, "side_data", 0, { SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST, SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST, -1 }, .unique_name = "frame_side_data" }, [SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST] = { SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST, "timecodes", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA_TIMECODE, -1 } }, [SECTION_ID_FRAME_SIDE_DATA_TIMECODE] = { SECTION_ID_FRAME_SIDE_DATA_TIMECODE, "timecode", 0, { -1 } }, [SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST] = { SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST, "components", SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA_COMPONENT, -1 } }, @@ -239,7 +239,7 @@ static struct section sections[] = { [SECTION_ID_PACKET] = { SECTION_ID_PACKET, "packet", 0, { SECTION_ID_PACKET_TAGS, SECTION_ID_PACKET_SIDE_DATA_LIST, -1 } }, [SECTION_ID_PACKET_TAGS] ={ SECTION_ID_PACKET_TAGS, "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "packet_tags" }, [SECTION_ID_PACKET_SIDE_DATA_LIST] ={ SECTION_ID_PACKET_SIDE_DATA_LIST, "side_data_list", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET_SIDE_DATA, -1 }, .element_name = "side_data", .unique_name = "packet_side_data_list" }, -[SECTION_ID_PACKET_SIDE_DATA] = { SECTION_ID_PACKET_SIDE_DATA, "side_data", 0, { -1 } }, +[SECTION_ID_PACKET_SIDE_DATA] = { SECTION_ID_PACKET_SIDE_DATA, "side_data", 0, { -1 }, .unique_name = "packet_side_data" }, [SECTION_ID_PIXEL_FORMATS] = { SECTION_ID_PIXEL_FORMATS, "pixel_formats", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PIXEL_FORMAT, -1 } }, [SECTION_ID_PIXEL_FORMAT] = { SECTION_ID_PIXEL_FORMAT, "pixel_format", 0, { SECTION_ID_PIXEL_FORMAT_FLAGS, SECTION_ID_PIXEL_FORMAT_COMPONENTS, -1 } }, [SECTION_ID_PIXEL_FORMAT_FLAGS] = { SECTION_ID_PIXEL_FORMAT_FLAGS, "flags", 0, { -1 }, .unique_name = "pixel_format_flags" }, @@ -262,7 +262,7 @@ static struct section sections[] = { [SECTION_ID_STREAM_DISPOSITION] = { SECTION_ID_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "stream_disposition" }, [SECTION_ID_STREAM_TAGS] ={ SECTION_ID_STREAM_TAGS, "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "stream_tags" }, [SECTION_ID_STREAM_SIDE_DATA_LIST] ={ SECTION_ID_STREAM_SIDE_DATA_LIST, "side_data_list", SECTION_FLAG_IS_ARRAY, { SECTION_ID_STREAM_SIDE_DATA, -1 }, .element_name = "side_data", .unique_name = "stream_side_data_list" }, -[SECTION_ID_STREAM_SIDE_DATA] = { SECTION_ID_STREAM_SIDE_DATA, "side_data", 0, { -1 } }, +[SECTION_ID_STREAM_SIDE_DATA] = { SECTION_ID_STREAM_SIDE_DATA, "side_data", 0, { -1 }, .unique_name = "stream_side_data" }, [SECTION_ID_SUBTITLE] = { SECTION_ID_SUBTITLE, "subtitle", 0, { -1 } }, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: note format constraint for volumedetect
ffmpeg | branch: master | Gyan Doshi | Mon Jan 24 10:09:07 2022 +0530| [b635ac126f340512335386d32bcd2693535945c3] | committer: Gyan Doshi doc/filters: note format constraint for volumedetect > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b635ac126f340512335386d32bcd2693535945c3 --- doc/filters.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 9a890d1555..04c34cb1fb 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -6743,8 +6743,9 @@ volume='if(lt(t,10),1,max(1-(t-10)/5,0))':eval=frame Detect the volume of the input video. -The filter has no parameters. The input is not modified. Statistics about -the volume will be printed in the log when the input stream end is reached. +The filter has no parameters. It supports only 16-bit signed integer samples, +so the input will be converted when needed. Statistics about the volume will +be printed in the log when the input stream end is reached. In particular it will show the mean volume (root mean square), maximum volume (on a per-sample basis), and the beginning of a histogram of the ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/mpegts: add option max_packet_size
ffmpeg | branch: master | Gyan Doshi | Wed Jan 12 20:57:59 2022 +0530| [bca30570d28bbaa07badadabf55ec3589201a82f] | committer: Gyan Doshi avformat/mpegts: add option max_packet_size Makes maximum size of emitted packet user-tunable. Default is existing 204800 bytes. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bca30570d28bbaa07badadabf55ec3589201a82f --- doc/demuxers.texi| 4 libavformat/mpegts.c | 11 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 26ae768d7a..238b8e03a8 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -775,6 +775,10 @@ disabled). Default value is -1. @item merge_pmt_versions Re-use existing streams when a PMT's version is updated and elementary streams move to different PIDs. Default value is 0. + +@item max_packet_size +Set maximum size, in bytes, of packet emitted by the demuxer. Payloads above this size +are split across multiple packets. Range is 1 to INT_MAX/2. Default is 204800 bytes. @end table @section mpjpeg diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 2479cb6f7d..da15223b8a 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -47,8 +47,6 @@ * synchronization is lost */ #define MAX_RESYNC_SIZE 65536 -#define MAX_PES_PAYLOAD 200 * 1024 - #define MAX_MP4_DESCR_COUNT 16 #define MOD_UNLIKELY(modulus, dividend, divisor, prev_dividend) \ @@ -162,6 +160,7 @@ struct MpegTSContext { int resync_size; int merge_pmt_versions; +int max_packet_size; /**/ /* private mpegts data */ @@ -198,6 +197,8 @@ static const AVOption options[] = { {.i64 = 0}, 0, 1, 0 }, {"skip_clear", "skip clearing programs", offsetof(MpegTSContext, skip_clear), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, 0 }, +{"max_packet_size", "maximum size of emitted packet", offsetof(MpegTSContext, max_packet_size), AV_OPT_TYPE_INT, + {.i64 = 204800}, 1, INT_MAX/2, AV_OPT_FLAG_DECODING_PARAM }, { NULL }, }; @@ -1121,7 +1122,7 @@ static AVBufferRef *buffer_pool_get(MpegTSContext *ts, int size) { int index = av_log2(size + AV_INPUT_BUFFER_PADDING_SIZE); if (!ts->pools[index]) { -int pool_size = FFMIN(MAX_PES_PAYLOAD + AV_INPUT_BUFFER_PADDING_SIZE, 2 << index); +int pool_size = FFMIN(ts->max_packet_size + AV_INPUT_BUFFER_PADDING_SIZE, 2 << index); ts->pools[index] = av_buffer_pool_init(pool_size, NULL); if (!ts->pools[index]) return NULL; @@ -1368,7 +1369,7 @@ skip: break; case MPEGTS_PAYLOAD: do { -int max_packet_size = MAX_PES_PAYLOAD; +int max_packet_size = ts->max_packet_size; if (pes->PES_packet_length && pes->PES_packet_length + PES_START_SIZE > pes->pes_header_size) max_packet_size = pes->PES_packet_length + PES_START_SIZE - pes->pes_header_size; @@ -1378,7 +1379,7 @@ skip: if (ret < 0) return ret; pes->PES_packet_length = 0; -max_packet_size = MAX_PES_PAYLOAD; +max_packet_size = ts->max_packet_size; ts->stop_parse = 1; } else if (pes->data_index == 0 && buf_size > max_packet_size) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/hlsenc: convey stream id to segment streams
ffmpeg | branch: release/5.0 | Gyan Doshi | Fri Jan 7 22:21:21 2022 +0530| [1c2d1d988a3fc2460276df11507b062017c5f535] | committer: Gyan Doshi avformat/hlsenc: convey stream id to segment streams > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1c2d1d988a3fc2460276df11507b062017c5f535 --- libavformat/hlsenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 459129818a..ef8973cea1 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -900,6 +900,7 @@ static int hls_mux_init(AVFormatContext *s, VariantStream *vs) st->sample_aspect_ratio = vs->streams[i]->sample_aspect_ratio; st->time_base = vs->streams[i]->time_base; av_dict_copy(>metadata, vs->streams[i]->metadata, 0); +st->id = vs->streams[i]->id; } vs->start_pos = 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/hlsenc: convey stream id to segment streams
ffmpeg | branch: master | Gyan Doshi | Fri Jan 7 22:21:21 2022 +0530| [1850c610e72c690a42dbde467011e22d73e73a78] | committer: Gyan Doshi avformat/hlsenc: convey stream id to segment streams > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1850c610e72c690a42dbde467011e22d73e73a78 --- libavformat/hlsenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 459129818a..ef8973cea1 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -900,6 +900,7 @@ static int hls_mux_init(AVFormatContext *s, VariantStream *vs) st->sample_aspect_ratio = vs->streams[i]->sample_aspect_ratio; st->time_base = vs->streams[i]->time_base; av_dict_copy(>metadata, vs->streams[i]->metadata, 0); +st->id = vs->streams[i]->id; } vs->start_pos = 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] configure: bump year
ffmpeg | branch: master | Gyan Doshi | Sat Jan 1 00:47:41 2022 +0530| [2f6360ff21a98f9db6af3e0932d39f1dc7b47d6c] | committer: Gyan Doshi configure: bump year > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f6360ff21a98f9db6af3e0932d39f1dc7b47d6c --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 07fb7925d8..6ad70b9f7b 100755 --- a/configure +++ b/configure @@ -7754,7 +7754,7 @@ cat > $TMPH <https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/mov: add option max_stts_delta
ffmpeg | branch: master | Gyan Doshi | Sat Nov 27 15:39:12 2021 +0530| [9cfc7a244052dced520776ff0ecc6f0a9390f62b] | committer: Gyan Doshi avformat/mov: add option max_stts_delta Very high stts sample deltas may occasionally be intended but usually they are written in error or used to store a negative value for dts correction when treated as signed 32-bit integers. This option lets the user set an upper limit, beyond which the delta is clamped to 1. Values greater than the limit if negative when cast to int32 are used to adjust onward dts. Unit is the track time scale. Default is UINT_MAX - 48000*10 which allows upto a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of uint32 range. Signed-off-by: Gyan Doshi Reviewed-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9cfc7a244052dced520776ff0ecc6f0a9390f62b --- doc/demuxers.texi | 9 + libavformat/isom.h | 1 + libavformat/mov.c | 55 +- 3 files changed, 40 insertions(+), 25 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index b474a24278..26ae768d7a 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -726,6 +726,15 @@ specify. @item decryption_key 16-byte key, in hex, to decrypt files encrypted using ISO Common Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7). + +@item max_stts_delta +Very high sample deltas written in a trak's stts box may occasionally be intended but usually they are written in +error or used to store a negative value for dts correction when treated as signed 32-bit integers. This option lets +the user set an upper limit, beyond which the delta is clamped to 1. Values greater than the limit if negative when +cast to int32 are used to adjust onward dts. + +Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows upto +a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of @code{uint32} range. @end table @subsection Audible AAX diff --git a/libavformat/isom.h b/libavformat/isom.h index ef8f19b18c..625dea8421 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -305,6 +305,7 @@ typedef struct MOVContext { int32_t movie_display_matrix[3][3]; ///< display matrix from mvhd int have_read_mfra_size; uint32_t mfra_size; +uint32_t max_stts_delta; } MOVContext; int ff_mp4_read_descr_len(AVIOContext *pb); diff --git a/libavformat/mov.c b/libavformat/mov.c index 2aed6e80ef..351ecde770 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2925,6 +2925,8 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) unsigned int i, entries, alloc_size = 0; int64_t duration = 0; int64_t total_sample_count = 0; +int64_t current_dts = 0; +int64_t corrected_dts = 0; if (c->fc->nb_streams < 1) return 0; @@ -2965,11 +2967,34 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) sc->stts_data[i].count= sample_count; sc->stts_data[i].duration= sample_duration; -av_log(c->fc, AV_LOG_TRACE, "sample_count=%d, sample_duration=%d\n", +av_log(c->fc, AV_LOG_TRACE, "sample_count=%u, sample_duration=%u\n", sample_count, sample_duration); -duration+=(int64_t)sample_duration*(uint64_t)sample_count; -total_sample_count+=sample_count; +/* STTS sample offsets are uint32 but some files store it as int32 + * with negative values used to correct DTS delays. + There may be abnormally large values as well. */ +if (sample_duration > c->max_stts_delta) { +// assume high delta is a correction if negative when cast as int32 +int32_t delta_magnitude = (int32_t)sample_duration; +av_log(c->fc, AV_LOG_WARNING, "Too large sample offset %u in stts entry %u with count %u in st:%d. Clipping to 1.\n", + sample_duration, i, sample_count, st->index); +sc->stts_data[i].duration = 1; +corrected_dts += (delta_magnitude < 0 ? (int64_t)delta_magnitude : 1) * sample_count; +} else { +corrected_dts += sample_duration * sample_count; +} + +current_dts += sc->stts_data[i].duration * sample_count; + +if (current_dts > corrected_dts) { +int64_t drift = (current_dts - corrected_dts)/FFMAX(sample_count, 1); +uint32_t correction = (sc->stts_data[i].duration > drift) ? drift : sc->stts_data[i].duration - 1; +current_dts -= correction * sample_count; +sc->stts_data[i].duration -= correction; +} + + duration+=(int64_t)sc->stts_data[i].duration*(uint64_t)sc->stts_data[i].count; +total_sample_count+=sc->stts_data[i].count; } sc->stts_count = i;
[FFmpeg-cvslog] doc/demuxers: add entry for aac
ffmpeg | branch: master | Gyan Doshi | Thu Dec 30 17:28:30 2021 +0530| [12f21849e550280c7e577e9958ead9aa42a29584] | committer: Gyan Doshi doc/demuxers: add entry for aac > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=12f21849e550280c7e577e9958ead9aa42a29584 --- doc/demuxers.texi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index cab8a7072c..593ff34c86 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -25,6 +25,13 @@ Audible Format 2, 3, and 4 demuxer. This demuxer is used to demux Audible Format 2, 3, and 4 (.aa) files. +@section aac + +Raw Audio Data Transport Stream AAC demuxer. + +This demuxer is used to demux an ADTS input containing a single AAC stream +alongwith any ID3v1/2 or APE tags in it. + @section apng Animated Portable Network Graphics demuxer. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/concatf: ignore trailing whitespaces
ffmpeg | branch: master | Gyan Doshi | Tue Dec 7 17:44:05 2021 +0530| [a454dfacd560e40fa5fea796f0d5b437f78e54e4] | committer: Gyan Doshi avformat/concatf: ignore trailing whitespaces The concatf protocol returns an opaque error on open if concatf list file contains trailing newlines. Signed-off-by: Gyan Doshi Reviewed-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a454dfacd560e40fa5fea796f0d5b437f78e54e4 --- libavformat/concat.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/concat.c b/libavformat/concat.c index 2560811ff9..faeba2293a 100644 --- a/libavformat/concat.c +++ b/libavformat/concat.c @@ -245,6 +245,10 @@ static av_cold int concatf_open(URLContext *h, const char *uri, int flags) char *node_uri; int64_t size; size_t len = i; +int leading_spaces = strspn(cursor, " \n\t\r"); + +if (!cursor[leading_spaces]) +break; node_uri = av_get_token(, "\r\n"); if (!node_uri) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: note duration range in xfade
ffmpeg | branch: master | Gyan Doshi | Mon Dec 6 16:53:47 2021 +0530| [ef00d40e32e71cc18cc40ee2c90714b31d0a3ce5] | committer: Gyan Doshi doc/filters: note duration range in xfade > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef00d40e32e71cc18cc40ee2c90714b31d0a3ce5 --- doc/filters.texi | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/filters.texi b/doc/filters.texi index 3edf3f50b0..8eff460cd9 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -22989,6 +22989,7 @@ Default transition effect is fade. @item duration Set cross fade duration in seconds. +Range is 0 to 60 seconds. Default duration is 1 second. @item offset ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/mov: make STTS duration unsigned int
ffmpeg | branch: master | Gyan Doshi | Tue Nov 16 19:02:32 2021 +0530| [203b0e3561dea1ec459be226d805abe73e7535e5] | committer: Gyan Doshi avformat/mov: make STTS duration unsigned int As per 8.6.1.2.2 of ISO/IEC 14496-12:2015(E), STTS sample offsets are to be always stored as uint32_t. So far, they have been signed ints which led to desync in files with very large offsets. The MOVStts struct was used to store CTTS offsets as well. These can be negative in version 1. So a new struct MOVCtts was created and all declarations for CTTS usage changed to MOVCtts. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=203b0e3561dea1ec459be226d805abe73e7535e5 --- libavformat/isom.h | 9 +++-- libavformat/mov.c| 20 ++-- libavformat/movenc.c | 2 +- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/libavformat/isom.h b/libavformat/isom.h index f3c18c95be..ef8f19b18c 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -55,9 +55,14 @@ struct AVAESCTR; typedef struct MOVStts { unsigned int count; -int duration; +unsigned int duration; } MOVStts; +typedef struct MOVCtts { +unsigned int count; +int duration; +} MOVCtts; + typedef struct MOVStsc { int first; int count; @@ -168,7 +173,7 @@ typedef struct MOVStreamContext { uint8_t *sdtp_data; unsigned int ctts_count; unsigned int ctts_allocated_size; -MOVStts *ctts_data; +MOVCtts *ctts_data; unsigned int stsc_count; MOVStsc *stsc_data; unsigned int stsc_index; diff --git a/libavformat/mov.c b/libavformat/mov.c index 8a910a3165..451cb78bbf 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -77,7 +77,7 @@ typedef struct MOVParseTableEntry { static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom); static int mov_read_mfra(MOVContext *c, AVIOContext *f); -static int64_t add_ctts_entry(MOVStts** ctts_data, unsigned int* ctts_count, unsigned int* allocated_size, +static int64_t add_ctts_entry(MOVCtts** ctts_data, unsigned int* ctts_count, unsigned int* allocated_size, int count, int duration); static int mov_metadata_track_or_disc_number(MOVContext *c, AVIOContext *pb, @@ -2938,7 +2938,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) return AVERROR(ENOMEM); for (i = 0; i < entries && !pb->eof_reached; i++) { -int sample_duration; +unsigned int sample_duration; unsigned int sample_count; unsigned int min_entries = FFMIN(FFMAX(i + 1, 1024 * 1024), entries); MOVStts *stts_data = av_fast_realloc(sc->stts_data, _size, @@ -3191,7 +3191,7 @@ static int get_edit_list_entry(MOVContext *mov, static int find_prev_closest_index(AVStream *st, AVIndexEntry *e_old, int nb_old, - MOVStts* ctts_data, + MOVCtts* ctts_data, int64_t ctts_count, int64_t timestamp_pts, int flag, @@ -3342,17 +3342,17 @@ static void fix_index_entry_timestamps(AVStream* st, int end_index, int64_t end_ * Append a new ctts entry to ctts_data. * Returns the new ctts_count if successful, else returns -1. */ -static int64_t add_ctts_entry(MOVStts** ctts_data, unsigned int* ctts_count, unsigned int* allocated_size, +static int64_t add_ctts_entry(MOVCtts** ctts_data, unsigned int* ctts_count, unsigned int* allocated_size, int count, int duration) { -MOVStts *ctts_buf_new; -const size_t min_size_needed = (*ctts_count + 1) * sizeof(MOVStts); +MOVCtts *ctts_buf_new; +const size_t min_size_needed = (*ctts_count + 1) * sizeof(MOVCtts); const size_t requested_size = min_size_needed > *allocated_size ? FFMAX(min_size_needed, 2 * (*allocated_size)) : min_size_needed; -if ((unsigned)(*ctts_count) >= UINT_MAX / sizeof(MOVStts) - 1) +if ((unsigned)(*ctts_count) >= UINT_MAX / sizeof(MOVCtts) - 1) return -1; ctts_buf_new = av_fast_realloc(*ctts_data, allocated_size, requested_size); @@ -3486,7 +3486,7 @@ static void mov_fix_index(MOVContext *mov, AVStream *st) int nb_old = sti->nb_index_entries; const AVIndexEntry *e_old_end = e_old + nb_old; const AVIndexEntry *current = NULL; -MOVStts *ctts_data_old = msc->ctts_data; +MOVCtts *ctts_data_old = msc->ctts_data; int64_t ctts_index_old = 0; int64_t ctts_sample_old = 0; int64_t ctts_count_old = msc->ctts_count; @@ -3793,7 +3793,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) unsigned int stps_index = 0; unsigned int i, j; uint64_t stream_size = 0; -MOVStts *ctts_data_old = sc->ctts_data; +MOVCtts *ctts_data_old = sc->c
[FFmpeg-cvslog] doc/filters: add details and ranges for colorkey
ffmpeg | branch: master | Gyan Doshi | Mon Nov 15 17:34:56 2021 +0530| [9e8cdb24cd2001959b37b08254d4c0cbc5668717] | committer: Gyan Doshi doc/filters: add details and ranges for colorkey > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e8cdb24cd2001959b37b08254d4c0cbc5668717 --- doc/filters.texi | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 1fced203b6..3aa54e6c69 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -8496,25 +8496,31 @@ This filter supports the all above options as @ref{commands}. @section colorkey RGB colorspace color keying. +This filter operates on 8-bit RGB format frames by setting the alpha component of each pixel +which falls within the similarity radius of the key color to 0. The alpha value for pixels outside +the similarity radius depends on the value of the blend option. The filter accepts the following options: @table @option @item color -The color which will be replaced with transparency. +Set the color for which alpha will be set to 0 (full transparency). +See @ref{color syntax,,"Color" section in the ffmpeg-utils manual,ffmpeg-utils}. +Default is @code{black}. @item similarity -Similarity percentage with the key color. - -0.01 matches only the exact key color, while 1.0 matches everything. +Set the radius from the key color within which other colors also have full transparency. +The computed distance is related to the unit fractional distance in 3D space between the RGB values +of the key color and the pixel's color. Range is 0.01 to 1.0. 0.01 matches within a very small radius +around the exact key color, while 1.0 matches everything. +Default is @code{0.01}. @item blend -Blend percentage. - -0.0 makes pixels either fully transparent, or not transparent at all. - -Higher values result in semi-transparent pixels, with a higher transparency -the more similar the pixels color is to the key color. +Set how the alpha value for pixels that fall outside the similarity radius is computed. +0.0 makes pixels either fully transparent or fully opaque. +Higher values result in semi-transparent pixels, with greater transparency +the more similar the pixel color is to the key color. +Range is 0.0 to 1.0. Default is @code{0.0}. @end table @subsection Examples ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: add notes for varblur
ffmpeg | branch: master | Gyan Doshi | Thu Oct 21 16:31:54 2021 +0530| [2aa343bb6f8577faff99ecb29f2a71011ceb35b1] | committer: Gyan Doshi doc/filters: add notes for varblur > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2aa343bb6f8577faff99ecb29f2a71011ceb35b1 --- doc/filters.texi | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 22e604f712..93eadda45d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -21706,20 +21706,25 @@ Default is universal. @section varblur Apply variable blur filter by using 2nd video stream to set blur radius. +The 2nd stream must have the same dimensions. This filter accepts the following options: @table @option @item min_r -Set min allowed radius. By default is 0. Allowed range is from 0 to 254. +Set min allowed radius. Allowed range is from 0 to 254. Default is 0. @item max_r -Set max allowed radius. By default is 8. Allowed range is from 1 to 255. +Set max allowed radius. Allowed range is from 1 to 255. Default is 8. @item planes -Set which planes to process. By default all are used. +Set which planes to process. By default, all are used. @end table The @code{varblur} filter also supports the @ref{framesync} options. +@subsection Commands + +This filter supports all the above options as @ref{commands}. + @section vectorscope Display 2 color component values in the two dimensional graph (which is called ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: correct description of select filter variables
ffmpeg | branch: master | Gyan Doshi | Mon Oct 18 14:46:04 2021 +0530| [d04c005021d0f5a8341d7da11d2a14eeb4287985] | committer: Gyan Doshi doc/filters: correct description of select filter variables > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d04c005021d0f5a8341d7da11d2a14eeb4287985 --- doc/filters.texi | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 3b8611d93b..7bde858a69 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -26200,27 +26200,27 @@ The sequential number of the last selected frame. It's NAN if undefined. The timebase of the input timestamps. @item pts -The PTS (Presentation TimeStamp) of the filtered video frame, +The PTS (Presentation TimeStamp) of the filtered frame, expressed in @var{TB} units. It's NAN if undefined. @item t -The PTS of the filtered video frame, +The PTS of the filtered frame, expressed in seconds. It's NAN if undefined. @item prev_pts -The PTS of the previously filtered video frame. It's NAN if undefined. +The PTS of the previously filtered frame. It's NAN if undefined. @item prev_selected_pts -The PTS of the last previously filtered video frame. It's NAN if undefined. +The PTS of the last previously filtered frame. It's NAN if undefined. @item prev_selected_t -The PTS of the last previously selected video frame, expressed in seconds. It's NAN if undefined. +The PTS of the last previously selected frame, expressed in seconds. It's NAN if undefined. @item start_pts -The PTS of the first video frame in the video. It's NAN if undefined. +The first PTS in the stream which is not NAN. It remains NAN if not found. @item start_t -The time of the first video frame in the video. It's NAN if undefined. +The first PTS, in seconds, in the stream which is not NAN. It remains NAN if not found. @item pict_type @emph{(video only)} The type of the filtered frame. It can assume one of the following ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] README: fix typo and description of libavfilter
ffmpeg | branch: master | Gyan Doshi | Fri Oct 8 10:02:34 2021 +0530| [f79be02be0abb7f4264fdc8467639eea7cd23d62] | committer: Gyan Doshi README: fix typo and description of libavfilter Thanks to Arif Driessen for bringing notice to the typo. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f79be02be0abb7f4264fdc8467639eea7cd23d62 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 447347c700..f8c23f2870 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ such as audio, video, subtitles and related metadata. * `libavcodec` provides implementation of a wider range of codecs. * `libavformat` implements streaming protocols, container formats and basic I/O access. * `libavutil` includes hashers, decompressors and miscellaneous utility functions. -* `libavfilter` provides a mean to alter decoded Audio and Video through chain of filters. +* `libavfilter` provides means to alter decoded audio and video through a directed graph of connected filters. * `libavdevice` provides an abstraction to access capture and playback devices. * `libswresample` implements audio mixing and resampling routines. * `libswscale` implements color conversion and scaling routines. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/muxers: add entry for OBU muxer
ffmpeg | branch: master | Gyan Doshi | Sun Sep 5 16:19:02 2021 +0530| [a947098558ea33f4709af7d762b164c341cf5f34] | committer: Gyan Doshi doc/muxers: add entry for OBU muxer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a947098558ea33f4709af7d762b164c341cf5f34 --- doc/muxers.texi | 4 1 file changed, 4 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index 05719c173c..7338e8d5d3 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -2169,6 +2169,10 @@ ITU-T H.262 / MPEG-2 Part 2 video. Extensions: m2v +@subsection obu + +AV1 low overhead Open Bitstream Units muxer. Temporal delimiter OBUs will be inserted in all temporal units of the stream. + @subsection rawvideo Raw uncompressed video. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/mov: add AVFMT_SHOW_IDS flag
ffmpeg | branch: master | Gyan Doshi | Wed Aug 11 12:08:13 2021 +0530| [d905af0c2409c854dcd45a05fe4caf9ac49d82ad] | committer: Gyan Doshi avformat/mov: add AVFMT_SHOW_IDS flag The MOV muxer can store streamids as track ids but they aren't visible when probing the result via lavf/dump or ffprobe due to lack of this flag in the demuxer. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d905af0c2409c854dcd45a05fe4caf9ac49d82ad --- libavformat/mov.c | 2 +- tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov | 2 +- tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov | 2 +- tests/ref/fate/mov-zombie | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 46bc7b5aa3..c556390525 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8216,5 +8216,5 @@ const AVInputFormat ff_mov_demuxer = { .read_packet= mov_read_packet, .read_close = mov_read_close, .read_seek = mov_read_seek, -.flags = AVFMT_NO_BYTE_SEEK | AVFMT_SEEK_TO_PTS, +.flags = AVFMT_NO_BYTE_SEEK | AVFMT_SEEK_TO_PTS | AVFMT_SHOW_IDS, }; diff --git a/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov b/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov index 4ef569df89..8d21c396fc 100644 --- a/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov +++ b/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov @@ -36,7 +36,7 @@ color_primaries=unknown chroma_location=unspecified field_order=unknown refs=1 -id=N/A +id=0x1 r_frame_rate=25/1 avg_frame_rate=25/1 time_base=1/12800 diff --git a/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov b/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov index 70e7cdc943..6f1f7c543f 100644 --- a/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov +++ b/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov @@ -36,7 +36,7 @@ color_primaries=unknown chroma_location=unspecified field_order=unknown refs=1 -id=N/A +id=0x1 r_frame_rate=25/1 avg_frame_rate=25/1 time_base=1/12800 diff --git a/tests/ref/fate/mov-zombie b/tests/ref/fate/mov-zombie index 6e6d43d563..b6656de744 100644 --- a/tests/ref/fate/mov-zombie +++ b/tests/ref/fate/mov-zombie @@ -194,5 +194,5 @@ frame|media_type=video|stream_index=0|key_frame=0|pts=188623|pts_time=2.095811|p packet|codec_type=video|stream_index=0|pts=197632|pts_time=2.195911|dts=191625|dts_time=2.129167|duration=3003|duration_time=0.033367|size=580|pos=101820|flags=__ frame|media_type=video|stream_index=0|key_frame=0|pts=191626|pts_time=2.129178|pkt_dts=N/A|pkt_dts_time=N/A|best_effort_timestamp=191626|best_effort_timestamp_time=2.129178|pkt_duration=3003|pkt_duration_time=0.033367|pkt_pos=99180|pkt_size=1666|width=160|height=240|pix_fmt=yuv420p|sample_aspect_ratio=2:1|pict_type=P|coded_picture_number=63|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=tv|color_space=smpte170m|color_primaries=smpte170m|color_transfer=bt709|chroma_location=topleftside_data|side_data_type=H.26[45] User Data Unregistered SEI message -stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_tag_string=avc1|codec_tag=0x31637661|width=160|height=240|coded_width=160|coded_height=240|closed_captions=0|has_b_frames=1|sample_aspect_ratio=2:1|display_aspect_ratio=4:3|pix_fmt=yuv420p|level=12|color_range=tv|color_space=smpte170m|color_transfer=bt709|color_primaries=smpte170m|chroma_location=topleft|field_order=unknown|refs=2|is_avc=true|nal_length_size=4|id=N/A|r_frame_rate=3/1001|avg_frame_rate=6372000/212521|time_base=1/9|start_pts=0|start_time=0.00|duration_ts=2125200|duration=23.61|bit_rate=333874|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=708|nb_read_frames=65|nb_read_packets=66|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:capti ons=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:creation_time=2008-05-12T20:59:27.00Z|tag:language=eng|tag:handler_name=Apple Video Media Handler|tag:vendor_id=appl|tag:encoder=H.264 +stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_tag_string=avc1|codec_tag=0x31637661|width=160|height=240|coded_width=160|coded_height=240|closed_captions=0|has_b_frames=1|sample_aspect_ratio=2:1|display_aspect_ratio=4:3|pix_fmt=yuv420p|level=12|color_range=tv|color_space=smpte170m|color_transfer=bt709|color_primaries=smpte170m|chroma_location=topleft|field_order=unknown|refs=2|is_avc=true|nal_length_size=4|id=0x1|r_frame_rate=3/1001|avg_frame_rate=6372000/212521|time_base=1/9|start_pts=0|start_time=0.00|duration_ts=2125200|duration=23.613
[FFmpeg-cvslog] ffmpeg_opt: restore documented stream selection behaviour
ffmpeg | branch: master | Gyan Doshi | Wed Jul 28 13:11:42 2021 +0530| [c50f5460d2f059e5be393eac90e4eac55a6034c6] | committer: Gyan Doshi ffmpeg_opt: restore documented stream selection behaviour 11d3b03fcb added consideration of default stream disposition for audio and video when choosing the 'best' stream among all the inputs. This can lead to video streams with lower resolution or audio streams with fewer channels being selected. Stream disposition, however, only sets a priority for a stream among all other streams in the *same input*. It cannot set a priority for a stream across all inputs. This patch sets a middle-way and selects the best stream from each file with default disposition considered. Then it discards disposition weight and selects best stream as per the original criteria of highest resolution for video and most channels for audio. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c50f5460d2f059e5be393eac90e4eac55a6034c6 --- fftools/ffmpeg_opt.c | 77 ++-- 1 file changed, 50 insertions(+), 27 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 1b43bab9fc..34cc6c4fd3 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2260,23 +2260,35 @@ static int open_output_file(OptionsContext *o, const char *filename) if (!o->video_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_VIDEO) != AV_CODEC_ID_NONE) { int best_score = 0, idx = -1; int qcr = avformat_query_codec(oc->oformat, oc->oformat->video_codec, 0); -for (i = 0; i < nb_input_streams; i++) { -int score; -ist = input_streams[i]; -score = ist->st->codecpar->width * ist->st->codecpar->height - + 1 * !!(ist->st->event_flags & AVSTREAM_EVENT_FLAG_NEW_PACKETS) - + 500*!!(ist->st->disposition & AV_DISPOSITION_DEFAULT); -if (ist->user_set_discard == AVDISCARD_ALL) -continue; -if((qcr!=MKTAG('A', 'P', 'I', 'C')) && (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC)) -score = 1; -if (ist->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && -score > best_score) { -if((qcr==MKTAG('A', 'P', 'I', 'C')) && !(ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC)) +for (j = 0; j < nb_input_files; j++) { +InputFile *ifile = input_files[j]; +int file_best_score = 0, file_best_idx = -1; +for (i = 0; i < ifile->nb_streams; i++) { +int score; +ist = input_streams[ifile->ist_index + i]; +score = ist->st->codecpar->width * ist->st->codecpar->height + + 1 * !!(ist->st->event_flags & AVSTREAM_EVENT_FLAG_NEW_PACKETS) + + 500*!!(ist->st->disposition & AV_DISPOSITION_DEFAULT); +if (ist->user_set_discard == AVDISCARD_ALL) continue; -best_score = score; -idx = i; +if((qcr!=MKTAG('A', 'P', 'I', 'C')) && (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC)) +score = 1; +if (ist->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && +score > file_best_score) { +if((qcr==MKTAG('A', 'P', 'I', 'C')) && !(ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC)) +continue; +file_best_score = score; +file_best_idx = ifile->ist_index + i; +} } +if (file_best_idx >= 0) { +if((qcr == MKTAG('A', 'P', 'I', 'C')) || !(ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC)) +file_best_score -= 500*!!(input_streams[file_best_idx]->st->disposition & AV_DISPOSITION_DEFAULT); +if (file_best_score > best_score) { +best_score = file_best_score; +idx = file_best_idx; +} + } } if (idx >= 0) new_video_stream(o, oc, idx); @@ -2285,19 +2297,30 @@ static int open_output_file(OptionsContext *o, const char *filename) /* audio: most channels */ if (!o->audio_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_AUDIO) != AV_CODEC_ID_NONE) { int best_score = 0, id
[FFmpeg-cvslog] avcodec/noise_bsf: restore dropamount for backwards compatibility
ffmpeg | branch: master | Gyan Doshi | Fri Jul 30 17:26:53 2021 +0530| [b9176dbfb7c209f2adf1f420df74b91df56c1fb3] | committer: Gyan Doshi avcodec/noise_bsf: restore dropamount for backwards compatibility > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9176dbfb7c209f2adf1f420df74b91df56c1fb3 --- doc/bitstream_filters.texi | 7 ++- libavcodec/noise_bsf.c | 19 +++ tests/fate/matroska.mak| 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi index 18a758635f..1900eb4352 100644 --- a/doc/bitstream_filters.texi +++ b/doc/bitstream_filters.texi @@ -538,11 +538,16 @@ Accepts an expression whose evaluation per-packet determines how often bytes in packet will be modified. A value below 0 will result in a variable frequency. Default is 0 which results in no modification. However, if neither amount nor drop is specified, amount will be set to @var{-1}. See below for accepted variables. -@item drop, dropamount +@item drop Accepts an expression evaluated per-packet whose value determines whether that packet is dropped. Evaluation to a positive value results in the packet being dropped. Evaluation to a negative value results in a variable chance of it being dropped, roughly inverse in proportion to the magnitude of the value. Default is 0 which results in no drops. See below for accepted variables. +@item dropamount +Accepts a non-negative integer, which assigns a variable chance of it being dropped, roughly inverse +in proportion to the value. Default is 0 which results in no drops. This option is kept for backwards +compatibility and is equivalent to setting drop to a negative value with the same magnitude +i.e. @code{dropamount=4} is the same as @code{drop=-4}. Ignored if drop is also specified. @end table Both @code{amount} and @code{drop} accept expressions containing the following variables: diff --git a/libavcodec/noise_bsf.c b/libavcodec/noise_bsf.c index 9d7ef93001..05b5d5f32b 100644 --- a/libavcodec/noise_bsf.c +++ b/libavcodec/noise_bsf.c @@ -65,6 +65,7 @@ typedef struct NoiseContext { char *amount_str; char *drop_str; +int dropamount; AVExpr *amount_pexpr; AVExpr *drop_pexpr; @@ -81,7 +82,7 @@ static int noise_init(AVBSFContext *ctx) int ret; if (!s->amount_str) { -s->amount_str = !s->drop_str ? av_strdup("-1") : av_strdup("0"); +s->amount_str = (!s->drop_str && !s->dropamount) ? av_strdup("-1") : av_strdup("0"); if (!s->amount_str) return AVERROR(ENOMEM); } @@ -93,6 +94,12 @@ static int noise_init(AVBSFContext *ctx) return ret; } +if (s->drop_str && s->dropamount) { +av_log(ctx, AV_LOG_WARNING, "Both drop '%s' and dropamount=%d set. Ignoring dropamount.\n", + s->drop_str, s->dropamount); +s->dropamount = 0; +} + if (s->drop_str) { ret = av_expr_parse(>drop_pexpr, s->drop_str, var_names, NULL, NULL, NULL, NULL, 0, ctx); @@ -114,7 +121,7 @@ static int noise_init(AVBSFContext *ctx) static int noise(AVBSFContext *ctx, AVPacket *pkt) { NoiseContext *s = ctx->priv_data; -int i, ret, amount, drop; +int i, ret, amount, drop = 0; double res; ret = ff_bsf_get_packet_ref(ctx, pkt); @@ -156,10 +163,14 @@ static int noise(AVBSFContext *ctx, AVPacket *pkt) drop = !!res; } +if(s->dropamount) { +drop = !(s->state % s->dropamount); +} + av_log(ctx, AV_LOG_VERBOSE, "Stream #%d packet %d pts %"PRId64" - amount %d drop %d\n", pkt->stream_index, (unsigned int)s->var_values[VAR_N], pkt->pts, amount, drop); -if (s->drop_str && drop) { +if (drop) { s->var_values[VAR_STATE] = ++s->state; av_packet_unref(pkt); return AVERROR(EAGAIN); @@ -198,7 +209,7 @@ static void noise_close(AVBSFContext *bsf) static const AVOption options[] = { { "amount", NULL, OFFSET(amount_str), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, FLAGS }, { "drop", NULL, OFFSET(drop_str), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, FLAGS }, -{ "dropamount", NULL, OFFSET(drop_str), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, FLAGS }, +{ "dropamount", NULL, OFFSET(dropamount), AV_OPT_TYPE_INT,{ .i64 = 0}, 0, INT_MAX, FLAGS }, { NULL }, }; diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak index b57765280a..625b2a4571 100644 --- a/tests/fate/matroska.mak +++ b/tests/fate/matroska.mak @@ -88,7 +88,7 @@ FATE_MATROSKA_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL MXF_DEMUXER\ MATROSKA_MUXER MATROSKA_D
[FFmpeg-cvslog] avcodec/noise_bsf: add expr support
ffmpeg | branch: master | Gyan Doshi | Sun Jul 25 15:49:54 2021 +0530| [23da5caf094a7c20dd3cd59ebd2ddd8b0f5950fc] | committer: Gyan Doshi avcodec/noise_bsf: add expr support > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23da5caf094a7c20dd3cd59ebd2ddd8b0f5950fc --- doc/bitstream_filters.texi | 64 ++ libavcodec/noise_bsf.c | 161 - tests/fate/matroska.mak| 2 +- 3 files changed, 199 insertions(+), 28 deletions(-) diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi index d10842ae47..18a758635f 100644 --- a/doc/bitstream_filters.texi +++ b/doc/bitstream_filters.texi @@ -534,20 +534,62 @@ container. Can be used for fuzzing or testing error resilience/concealment. Parameters: @table @option @item amount -A numeral string, whose value is related to how often output bytes will -be modified. Therefore, values below or equal to 0 are forbidden, and -the lower the more frequent bytes will be modified, with 1 meaning -every byte is modified. -@item dropamount -A numeral string, whose value is related to how often packets will be dropped. -Therefore, values below or equal to 0 are forbidden, and the lower the more -frequent packets will be dropped, with 1 meaning every packet is dropped. +Accepts an expression whose evaluation per-packet determines how often bytes in that +packet will be modified. A value below 0 will result in a variable frequency. +Default is 0 which results in no modification. However, if neither amount nor drop is specified, +amount will be set to @var{-1}. See below for accepted variables. +@item drop, dropamount +Accepts an expression evaluated per-packet whose value determines whether that packet is dropped. +Evaluation to a positive value results in the packet being dropped. Evaluation to a negative +value results in a variable chance of it being dropped, roughly inverse in proportion to the magnitude +of the value. Default is 0 which results in no drops. See below for accepted variables. @end table -The following example applies the modification to every byte but does not drop -any packets. +Both @code{amount} and @code{drop} accept expressions containing the following variables: + +@table @samp +@item n +The index of the packet, starting from zero. +@item tb +The timebase for packet timestamps. +@item pts +Packet presentation timestamp. +@item dts +Packet decoding timestamp. +@item nopts +Constant representing AV_NOPTS_VALUE. +@item startpts +First non-AV_NOPTS_VALUE PTS seen in the stream. +@item startdts +First non-AV_NOPTS_VALUE DTS seen in the stream. +@item duration +@itemx d +Packet duration, in timebase units. +@item pos +Packet position in input; may be -1 when unknown or not set. +@item size +Packet size, in bytes. +@item key +Whether packet is marked as a keyframe. +@item state +A pseudo random integer, primarily derived from the content of packet payload. +@end table + +@subsection Examples +Apply modification to every byte but don't drop any packets. +@example +ffmpeg -i INPUT -c copy -bsf noise=1 output.mkv +@end example + +Drop every video packet not marked as a keyframe after timestamp 30s but do not +modify any of the remaining packets. +@example +ffmpeg -i INPUT -c copy -bsf:v noise=drop='gt(t\,30)*not(key)' output.mkv +@end example + +Drop one second of audio every 10 seconds and add some random noise to the rest. @example -ffmpeg -i INPUT -c copy -bsf noise[=1] output.mkv +ffmpeg -i INPUT -c copy -bsf:a noise=amount=-1:drop='between(mod(t\,10)\,9\,10)' output.mkv @end example @section null diff --git a/libavcodec/noise_bsf.c b/libavcodec/noise_bsf.c index 6ebd369633..9d7ef93001 100644 --- a/libavcodec/noise_bsf.c +++ b/libavcodec/noise_bsf.c @@ -23,55 +23,182 @@ #include "bsf.h" #include "bsf_internal.h" +#include "libavutil/avstring.h" #include "libavutil/log.h" #include "libavutil/opt.h" +#include "libavutil/eval.h" + +static const char *const var_names[] = { +"n", /// packet index, starting from zero +"tb", /// timebase +"pts", /// packet presentation timestamp +"dts", /// packet decoding timestamp +"nopts", /// AV_NOPTS_VALUE +"startpts",/// first seen non-AV_NOPTS_VALUE packet timestamp +"startdts",/// first seen non-AV_NOPTS_VALUE packet timestamp +"duration", "d", /// packet duration +"pos", /// original position of packet in its source +"size",/// packet size +"key" ,/// packet keyframe flag +"state", /// random-ish state
[FFmpeg-cvslog] doc/filters: note expr and eval mode support in overlay_cuda
ffmpeg | branch: master | Gyan Doshi | Wed Jul 21 13:26:13 2021 +0530| [f614390eccbef569cdff7bcccebf88f2920389b8] | committer: Gyan Doshi doc/filters: note expr and eval mode support in overlay_cuda Commit 58c908cf94 added support for expressions for x and y parameters. Also added was option to set eval frequency. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f614390eccbef569cdff7bcccebf88f2920389b8 --- doc/filters.texi | 47 ++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index 232d81ae3e..1b1db2ebb8 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -15910,9 +15910,54 @@ It accepts the following parameters: @table @option @item x @item y -Set the x and y coordinates of the overlaid video on the main video. +Set expressions for the x and y coordinates of the overlaid video +on the main video. + +They can contain the following parameters: + +@table @option + +@item main_w, W +@item main_h, H +The main input width and height. + +@item overlay_w, w +@item overlay_h, h +The overlay input width and height. + +@item x +@item y +The computed values for @var{x} and @var{y}. They are evaluated for +each new frame. + +@item n +The ordinal index of the main input frame, starting from 0. + +@item pos +The byte offset position in the file of the main input frame, NAN if unknown. + +@item t +The timestamp of the main input frame, expressed in seconds, NAN if unknown. + +@end table + Default value is "0" for both expressions. +@item eval +Set when the expressions for @option{x} and @option{y} are evaluated. + +It accepts the following values: +@table @option +@item init +Evaluate expressions once during filter initialization or +when a command is processed. + +@item frame +Evaluate expressions for each incoming frame +@end table + +Default value is @option{frame}. + @item eof_action See @ref{framesync}. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/gifdec: log loop count
ffmpeg | branch: master | Gyan Doshi | Mon Jul 19 16:41:34 2021 +0530| [cd7043131f4e2ecf9e5a88c53d3f1a67e2402928] | committer: Gyan Doshi avformat/gifdec: log loop count > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd7043131f4e2ecf9e5a88c53d3f1a67e2402928 --- libavformat/gifdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/gifdec.c b/libavformat/gifdec.c index c20bde1781..1977f46e3a 100644 --- a/libavformat/gifdec.c +++ b/libavformat/gifdec.c @@ -247,6 +247,7 @@ static int gif_read_ext(AVFormatContext *s) if (sb_size == 3 && data[0] == 1) { gdc->total_iter = AV_RL16(data+1); +av_log(s, AV_LOG_DEBUG, "Loop count is %d\n", gdc->total_iter); if (gdc->total_iter == 0) gdc->total_iter = -1; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] ffmpeg: delay readrate enforcement for decoded streams
ffmpeg | branch: master | Gyan Doshi | Mon Jul 19 13:12:55 2021 +0530| [6f206852289ee8997bef6a43a88252834d2d3e02] | committer: Gyan Doshi ffmpeg: delay readrate enforcement for decoded streams Read rate enforcement delayed till first decoded frame is obtained, to speed up init of output streams. Thanks to Linjie Fu for the initial patch. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6f206852289ee8997bef6a43a88252834d2d3e02 --- fftools/ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 5678f6e7b9..a2dca146fe 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -4237,7 +4237,7 @@ static int get_input_packet(InputFile *f, AVPacket **pkt) for (i = 0; i < f->nb_streams; i++) { InputStream *ist = input_streams[f->ist_index + i]; int64_t stream_ts_offset, pts, now; -if (!ist->nb_packets) continue; +if (!ist->nb_packets || (ist->decoding_needed && !ist->got_output)) continue; stream_ts_offset = FFMAX(ist->first_dts != AV_NOPTS_VALUE ? ist->first_dts : 0, file_start); pts = av_rescale(ist->dts, 100, AV_TIME_BASE); now = (av_gettime_relative() - ist->start) * scale + stream_ts_offset; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] ffmpeg: add option readrate
ffmpeg | branch: master | Gyan Doshi | Fri Jul 16 18:17:39 2021 +0530| [c320b78e95bab2a71a636dc4da905522c4646b35] | committer: Gyan Doshi ffmpeg: add option readrate Allows to read inputs at arbitrary rates. -re is equivalent to -readrate 1 Tested with -copyts {+ start_at_zero}, -ss, streamcopied & decoded streams. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c320b78e95bab2a71a636dc4da905522c4646b35 --- doc/ffmpeg.texi | 21 ++--- fftools/ffmpeg.c | 13 ++--- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_opt.c | 16 +++- 4 files changed, 41 insertions(+), 11 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index dad21c6ae6..c896aede3b 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -1575,14 +1575,21 @@ Exit after ffmpeg has been running for @var{duration} seconds in CPU user time. Dump each input packet to stderr. @item -hex (@emph{global}) When dumping packets, also dump the payload. +@item -readrate @var{speed} (@emph{input}) +Limit input read speed. + +Its value is a floating-point positive number which represents the maximum duration of +media, in seconds, that should be ingested in one second of wallclock time. +Default value is zero and represents no imposed limitation on speed of ingestion. +Value @code{1} represents real-time speed and is equivalent to @code{-re}. + +Mainly used to simulate a capture device or live input stream (e.g. when reading from a file). +Should not be used with a low value when input is an actual capture device or live stream as +it may cause packet loss. + +It is useful for when flow speed of output packets is important, such as live streaming. @item -re (@emph{input}) -Read input at native frame rate. Mainly used to simulate a grab device, -or live input stream (e.g. when reading from a file). Should not be used -with actual grab devices or live input streams (where it can cause packet -loss). -By default @command{ffmpeg} attempts to read the input(s) as fast as possible. -This option will slow down the reading of the input(s) to the native frame rate -of the input(s). It is useful for real-time output (e.g. live streaming). +Read input at native frame rate. This is equivalent to setting @code{-readrate 1}. @item -vsync @var{parameter} Video sync method. For compatibility reasons old values can be specified as numbers. diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 1ac2e48600..e0f2fe138f 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3765,7 +3765,7 @@ static int transcode_init(void) /* init framerate emulation */ for (i = 0; i < nb_input_files; i++) { InputFile *ifile = input_files[i]; -if (ifile->rate_emu) +if (ifile->readrate || ifile->rate_emu) for (j = 0; j < ifile->nb_streams; j++) input_streams[j + ifile->ist_index]->start = av_gettime_relative(); } @@ -4225,12 +4225,19 @@ static int get_input_packet_mt(InputFile *f, AVPacket **pkt) static int get_input_packet(InputFile *f, AVPacket **pkt) { -if (f->rate_emu) { +if (f->readrate || f->rate_emu) { int i; +int64_t file_start = copy_ts * ( + (f->ctx->start_time != AV_NOPTS_VALUE ? f->ctx->start_time * !start_at_zero : 0) + + (f->start_time != AV_NOPTS_VALUE ? f->start_time : 0) + ); +float scale = f->rate_emu ? 1.0 : f->readrate; for (i = 0; i < f->nb_streams; i++) { InputStream *ist = input_streams[f->ist_index + i]; +if (!ist->nb_packets) continue; +int64_t stream_ts_offset = FFMAX(ist->first_dts != AV_NOPTS_VALUE ? ist->first_dts : 0, file_start); int64_t pts = av_rescale(ist->dts, 100, AV_TIME_BASE); -int64_t now = av_gettime_relative() - ist->start; +int64_t now = (av_gettime_relative() - ist->start)*scale + stream_ts_offset; if (pts > now) return AVERROR(EAGAIN); } diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 3cfb4c4488..6308fb5aeb 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -119,6 +119,7 @@ typedef struct OptionsContext { int64_t input_ts_offset; int loop; int rate_emu; +float readrate; int accurate_seek; int thread_queue_size; @@ -418,6 +419,7 @@ typedef struct InputFile { from ctx.nb_streams if new streams appear during av_read_frame() */ int nb_streams_warn; /* number of streams that the user was warned of */ int rate_emu; +float readrate; int accurate_seek; AVPacket *pkt; diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index cb7d6ceefc..9558bcaeb2 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1286,6 +1286,17 @@ static int open_input_file(
Re: [FFmpeg-cvslog] avformat/img2dec: Deduplicate AVClasses
On 2021-07-09 00:12, Andreas Rheinhardt wrote: ffmpeg | branch: master | Andreas Rheinhardt | Mon Jun 7 16:13:33 2021 +0200| [f06bd041238b5e88d449064244bf7f9cb77cc532] | committer: Andreas Rheinhardt avformat/img2dec: Deduplicate AVClasses The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f06bd041238b5e88d449064244bf7f9cb77cc532 --- libavformat/img2dec.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 55a91ca698..c9651bd941 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -651,21 +651,21 @@ static const AVOption img2pipe_options[] = { { "frame_size", "force frame size in bytes", OFFSET(frame_size), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, DEC }, COMMON_OPTIONS }; - -#if CONFIG_IMAGE2PIPE_DEMUXER -static const AVClass img2pipe_class = { -.class_name = "image2pipe demuxer", +static const AVClass imgagepipe_class = { imgage? +.class_name = "imagepipe demuxer", .item_name = av_default_item_name, .option = img2pipe_options, .version= LIBAVUTIL_VERSION_INT, }; + +#if CONFIG_IMAGE2PIPE_DEMUXER const AVInputFormat ff_image2pipe_demuxer = { .name = "image2pipe", .long_name = NULL_IF_CONFIG_SMALL("piped image2 sequence"), .priv_data_size = sizeof(VideoDemuxData), .read_header= ff_img_read_header, .read_packet= ff_img_read_packet, -.priv_class = _class, +.priv_class = _class, same. }; #endif @@ -1106,12 +1106,6 @@ static int photocd_probe(const AVProbeData *p) } #define IMAGEAUTO_DEMUXER(imgname, codecid)\ -static const AVClass imgname ## _class = {\ -.class_name = AV_STRINGIFY(imgname) " demuxer",\ -.item_name = av_default_item_name,\ -.option = img2pipe_options,\ -.version= LIBAVUTIL_VERSION_INT,\ -};\ const AVInputFormat ff_image_ ## imgname ## _pipe_demuxer = {\ .name = AV_STRINGIFY(imgname) "_pipe",\ .long_name = NULL_IF_CONFIG_SMALL("piped " AV_STRINGIFY(imgname) " sequence"),\ @@ -1119,7 +1113,7 @@ const AVInputFormat ff_image_ ## imgname ## _pipe_demuxer = {\ .read_probe = imgname ## _probe,\ .read_header= ff_img_read_header,\ .read_packet= ff_img_read_packet,\ -.priv_class = & imgname ## _class,\ +.priv_class = _class,\ same. .flags = AVFMT_GENERIC_INDEX, \ .raw_codec_id = codecid,\ }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/qsvenc: clip global_quality for ICQ modes.
ffmpeg | branch: master | Gyan Doshi | Sun Jul 11 10:26:33 2021 +0530| [1aa9dcd091ed9cebf06c4c6a9c96ff80a54722f4] | committer: Gyan Doshi avcodec/qsvenc: clip global_quality for ICQ modes. Allowed range is 1 to 51. Ref: https://software.intel.com/content/www/us/en/develop/articles/advanced-bitrate-control-methods-in-intel-media-sdk.html > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1aa9dcd091ed9cebf06c4c6a9c96ff80a54722f4 --- doc/encoders.texi | 3 ++- libavcodec/qsvenc.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index 4c38996372..8fccd73691 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -3119,7 +3119,8 @@ also set (the @option{-qscale} ffmpeg option). @option{look_ahead} option is also set. @item -@var{ICQ} -- intelligent constant quality otherwise. +@var{ICQ} -- intelligent constant quality otherwise. For the ICQ modes, global +quality range is 1 to 51, with 1 being the best quality. @end itemize @item diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index ca2b42cafd..b9a922d6b9 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -650,7 +650,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) case MFX_RATECONTROL_LA_ICQ: q->extco2.LookAheadDepth = q->look_ahead_depth; case MFX_RATECONTROL_ICQ: -q->param.mfx.ICQQuality = avctx->global_quality; +q->param.mfx.ICQQuality = av_clip(avctx->global_quality, 1, 51); break; #endif #endif ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] ffmpeg: add option recast_media
ffmpeg | branch: master | Gyan Doshi | Fri Jul 2 15:48:21 2021 +0530| [79ebdbb9b9da0a86b277e3f85981196c781af398] | committer: Gyan Doshi ffmpeg: add option recast_media Allows forcing decoders of different media type. Needed to decode media data muxed as data streams. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=79ebdbb9b9da0a86b277e3f85981196c781af398 --- doc/ffmpeg.texi | 5 + fftools/ffmpeg_opt.c | 7 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 7827291755..b27b9fe2c4 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -449,6 +449,11 @@ output file already exists. Set number of times input stream shall be looped. Loop 0 means no loop, loop -1 means infinite loop. +@item -recast_media (@emph{global}) +Allow forcing a decoder of a different media type than the one +detected or designated by the demuxer. Useful for decoding media +data muxed as data streams. + @item -c[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream}) @itemx -codec[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream}) Select an encoder (when used before an output file) or a decoder (when used diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index a63bed54cf..cb7d6ceefc 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -186,6 +186,7 @@ static int input_sync; static int input_stream_potentially_available = 0; static int ignore_unknown_streams = 0; static int copy_unknown_streams = 0; +static int recast_media = 0; static int find_stream_info = 1; static void uninit_options(OptionsContext *o) @@ -759,7 +760,7 @@ static const AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name); exit_program(1); } -if (codec->type != type) { +if (codec->type != type && !recast_media) { av_log(NULL, AV_LOG_FATAL, "Invalid %s type '%s'\n", codec_string, name); exit_program(1); } @@ -774,6 +775,8 @@ static const AVCodec *choose_decoder(OptionsContext *o, AVFormatContext *s, AVSt if (codec_name) { const AVCodec *codec = find_codec_or_die(codec_name, st->codecpar->codec_type, 0); st->codecpar->codec_id = codec->id; +if (recast_media && st->codecpar->codec_type != codec->type) +st->codecpar->codec_type = codec->type; return codec; } else return avcodec_find_decoder(st->codecpar->codec_id); @@ -3429,6 +3432,8 @@ const OptionDef options[] = { "Ignore unknown stream types" }, { "copy_unknown", OPT_BOOL | OPT_EXPERT, { _unknown_streams }, "Copy unknown stream types" }, +{ "recast_media", OPT_BOOL | OPT_EXPERT, { _media }, +"allow recasting stream type in order to force a decoder of different media type" }, { "c", HAS_ARG | OPT_STRING | OPT_SPEC | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(codec_names) }, "codec name", "codec" }, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/fps: remove unconventional acronyms
ffmpeg | branch: master | Gyan Doshi | Sat Jul 3 11:51:10 2021 +0530| [b7ba472f43e7f1ab4d4268f4f1cc77d70ae405d7] | committer: Gyan Doshi avfilter/fps: remove unconventional acronyms In dd770883e9, support for expressions was added. Among the constants added were labels of qnstc, qpal, sntsc & spal. These were added in ba2a8cb40b to represent parameter permutations where only the resolution is different. They don't have any usage currency and don't represent any industry standards or convention in terms of framerate. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7ba472f43e7f1ab4d4268f4f1cc77d70ae405d7 --- doc/filters.texi | 4 ++-- libavfilter/vf_fps.c | 16 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index eaf23e3736..d991c06628 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -12341,10 +12341,10 @@ constants: @item source_fps The input's frame rate -@item ntsc, qntsc, sntsc +@item ntsc NTSC frame rate of @code{3/1001} -@item pal, qpal, spal +@item pal PAL frame rate of @code{25.0} @item film diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index 29588a5f6e..fbc845da1b 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -47,10 +47,6 @@ static const char *const var_names[] = { "source_fps", "ntsc", "pal", - "qntsc", - "qpal", - "sntsc", - "spal", "film", "ntsc_film", NULL @@ -60,10 +56,6 @@ enum var_name { VAR_SOURCE_FPS, VAR_FPS_NTSC, VAR_FPS_PAL, - VAR_FPS_QNTSC, - VAR_FPS_QPAL, - VAR_FPS_SNTSC, - VAR_FPS_SPAL, VAR_FPS_FILM, VAR_FPS_NTSC_FILM, VARS_NB @@ -71,10 +63,6 @@ enum var_name { static const double ntsc_fps = 3.0 / 1001.0; static const double pal_fps = 25.0; -static const double qntsc_fps = 3.0 / 1001.0; -static const double qpal_fps = 25.0; -static const double sntsc_fps = 3.0 / 1001.0; -static const double spal_fps = 25.0; static const double film_fps = 24.0; static const double ntsc_film_fps = 24000.0 / 1001.0; @@ -194,10 +182,6 @@ static int config_props(AVFilterLink* outlink) var_values[VAR_SOURCE_FPS]= av_q2d(inlink->frame_rate); var_values[VAR_FPS_NTSC] = ntsc_fps; var_values[VAR_FPS_PAL] = pal_fps; -var_values[VAR_FPS_QNTSC] = qntsc_fps; -var_values[VAR_FPS_QPAL] = qpal_fps; -var_values[VAR_FPS_SNTSC] = sntsc_fps; -var_values[VAR_FPS_SPAL] = spal_fps; var_values[VAR_FPS_FILM] = film_fps; var_values[VAR_FPS_NTSC_FILM] = ntsc_film_fps; ret = av_expr_parse_and_eval(, s->framerate, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/bsf: switch to av_get_token to parse bsf list string
ffmpeg | branch: master | Gyan Doshi | Sat Jul 3 17:20:59 2021 +0530| [301d275301d72387732ccdc526babaf984ddafe5] | committer: Gyan Doshi avcodec/bsf: switch to av_get_token to parse bsf list string The recently added setts bsf makes use of the eval API whose expressions can contain commas. The existing parsing in av_bsf_list_parse_str() uses av_strtok to naively split the string at commas, thus preventing the use of setts filter with expressions containing commas. av_get_token can work with escaped commas, allowing full use of setts. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=301d275301d72387732ccdc526babaf984ddafe5 --- libavcodec/bsf.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index 9d67ea5395..0305244f8d 100644 --- a/libavcodec/bsf.c +++ b/libavcodec/bsf.c @@ -520,7 +520,6 @@ static int bsf_parse_single(char *str, AVBSFList *bsf_lst) int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf_lst) { AVBSFList *lst; -char *bsf_str, *buf, *dup, *saveptr; int ret; if (!str) @@ -530,24 +529,18 @@ int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf_lst) if (!lst) return AVERROR(ENOMEM); -if (!(dup = buf = av_strdup(str))) { -ret = AVERROR(ENOMEM); -goto end; -} - -while (bsf_str = av_strtok(buf, ",", )) { +do { +char *bsf_str = av_get_token(, ","); ret = bsf_parse_single(bsf_str, lst); +av_free(bsf_str); if (ret < 0) goto end; - -buf = NULL; -} +} while (*str && *++str); ret = av_bsf_list_finalize(, bsf_lst); end: if (ret < 0) av_bsf_list_free(); -av_free(dup); return ret; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/muxers: note atomic_writing in image2
ffmpeg | branch: master | Gyan Doshi | Wed Jun 30 09:52:09 2021 +0530| [de8e6e67e7523e48bb27ac224a0b446df05e1640] | committer: Gyan Doshi doc/muxers: note atomic_writing in image2 Fixes #9308 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de8e6e67e7523e48bb27ac224a0b446df05e1640 --- doc/muxers.texi | 4 1 file changed, 4 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index e77055e7ef..0972bbfd5c 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -1419,6 +1419,10 @@ overwritten with new images. Default value is 0. If set to 1, expand the filename with date and time information from @code{strftime()}. Default value is 0. +@item atomic_writing +Write output to a temporary file, which is renamed to target filename once +writing is completed. Default is disabled. + @item protocol_opts @var{options_list} Set protocol options as a :-separated list of key=value parameters. Values containing the @code{:} special character must be escaped. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: mention availability of mcdeint, uspp
ffmpeg | branch: master | Gyan Doshi | Sun Jun 27 15:54:42 2021 +0530| [49e3a8165c940b0e4b6c39b2e316065c56084fea] | committer: Gyan Doshi doc/filters: mention availability of mcdeint, uspp Filters are present in tree of master and in docs but were hard-disabled in 95054bfa48. They remain available in v4.4 or earlier. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=49e3a8165c940b0e4b6c39b2e316065c56084fea --- doc/filters.texi | 4 1 file changed, 4 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 3368a90877..bbd0a3d14d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -14689,6 +14689,8 @@ Apply motion-compensation deinterlacing. It needs one field per frame as input and must thus be used together with yadif=1/3 or equivalent. +This filter is only available in ffmpeg version 4.4 or earlier. + This filter accepts the following options: @table @option @item mode @@ -20667,6 +20669,8 @@ The way this differs from the behavior of spp is that uspp actually encodes & decodes each case with libavcodec Snow, whereas spp uses a simplified intra only 8x8 DCT similar to MJPEG. +This filter is only available in ffmpeg version 4.4 or earlier. + The filter accepts the following options: @table @option ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: document expr support in fps filter
ffmpeg | branch: master | Gyan Doshi | Wed Jun 16 16:00:15 2021 +0530| [604924a069735f3f1fd56b5dd125e68d402f15ba] | committer: Gyan Doshi doc/filters: document expr support in fps filter Added in dd770883e976c91feeb8de58eacd97dfb4e8308e > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=604924a069735f3f1fd56b5dd125e68d402f15ba --- doc/filters.texi | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index 78faf767cf..da8f7d7726 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -12334,7 +12334,27 @@ It accepts the following parameters: @table @option @item fps -The desired output frame rate. The default is @code{25}. +The desired output frame rate. It accepts expressions containing the following +constants: + +@table @samp +@item source_fps +The input's frame rate + +@item ntsc, qntsc, sntsc +NTSC frame rate of @code{3/1001} + +@item pal, qpal, spal +PAL frame rate of @code{25.0} + +@item film +Film frame rate of @code{24.0} + +@item ntsc_film +NTSC-film frame rate of @code{24000/1001} +@end table + +The default is @code{25}. @item start_time Assume the first PTS should be the given value, in seconds. This allows for ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/demuxers: note defaults for apng options
ffmpeg | branch: master | Gyan Doshi | Sun Jun 13 17:25:03 2021 +0530| [3ce272a9da62151fd54391661160b6620d4dc32c] | committer: Gyan Doshi doc/demuxers: note defaults for apng options > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ce272a9da62151fd54391661160b6620d4dc32c --- doc/demuxers.texi | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 808b1f3090..5b8cf1bfea 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -37,12 +37,15 @@ between the last fcTL and IEND chunks. @table @option @item -ignore_loop @var{bool} -Ignore the loop variable in the file if set. +Ignore the loop variable in the file if set. Default is enabled. + @item -max_fps @var{int} -Maximum framerate in frames per second (0 for no limit). +Maximum framerate in frames per second. Default of 0 imposes no limit. + @item -default_fps @var{int} Default framerate in frames per second when none is specified in the file -(0 meaning as fast as possible). +(0 meaning as fast as possible). Default is 15. + @end table @section asf ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/ffmpeg: document reinit_filter
ffmpeg | branch: master | Gyan Doshi | Thu Jun 10 10:11:52 2021 +0530| [99bbf4a5be77edbde4106a459475cb7973d027c7] | committer: Gyan Doshi doc/ffmpeg: document reinit_filter > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99bbf4a5be77edbde4106a459475cb7973d027c7 --- doc/ffmpeg.texi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 9feabe6517..7827291755 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -759,6 +759,16 @@ This option is similar to @option{-filter}, the only difference is that its argument is the name of the file from which a filtergraph description is to be read. +@item -reinit_filter[:@var{stream_specifier}] @var{integer} (@emph{input,per-stream}) +This boolean option determines if the filtergraph(s) to which this stream is fed gets +reinitialized when input frame parameters change mid-stream. This option is enabled by +default as most video and all audio filters cannot handle deviation in input frame properties. +Upon reinitialization, existing filter state is lost, like e.g. the frame count @code{n} +reference available in some filters. Any frames buffered at time of reinitialization are lost. +The properties where a change triggers reinitialization are, +for video, frame resolution or pixel format; +for audio, sample format, sample rate, channel count or channel layout. + @item -filter_threads @var{nb_threads} (@emph{global}) Defines how many threads are used to process a filter pipeline. Each pipeline will produce a thread pool with this many threads available for parallel processing. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/mov: add option to use tfdt for fragment timestamps.
ffmpeg | branch: master | Gyan Doshi | Sat May 29 14:45:34 2021 +0530| [071930de724166bfb90fc6d368c748771188fd94] | committer: Gyan Doshi avformat/mov: add option to use tfdt for fragment timestamps. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=071930de724166bfb90fc6d368c748771188fd94 --- doc/demuxers.texi | 6 ++ libavformat/isom.h | 1 + libavformat/mov.c | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 2575dad704..808b1f3090 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -665,6 +665,12 @@ Set mfra timestamps as PTS Don't use mfra box to set timestamps @end table +@item use_tfdt +For fragmented input, set fragment's starting timestamp to @code{baseMediaDecodeTime} from the @code{tfdt} box. +Default is disabled, which will preferentially use the @code{earliest_presentation_time} from the @code{sidx} box. +In either case, the timestamp from the @code{mfra} box will be used if it's available and @code{use_mfra_for} is +set to pts or dts. + @item export_all Export unrecognized boxes within the @var{udta} box as metadata entries. The first four characters of the box type are set as the key. Default is false. diff --git a/libavformat/isom.h b/libavformat/isom.h index 5a6d504090..ac1b3f3d56 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -277,6 +277,7 @@ typedef struct MOVContext { int moov_retry; int use_mfra_for; int has_looked_for_mfra; +int use_tfdt; MOVFragmentIndex frag_index; int atom_depth; unsigned int aax_mode; ///< 'aax' file has been detected diff --git a/libavformat/mov.c b/libavformat/mov.c index c088c9f515..6c99a67ff5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4803,7 +4803,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) dts = frag_stream_info->first_tfra_pts; av_log(c->fc, AV_LOG_DEBUG, "found mfra time %"PRId64 ", using it for dts\n", pts); -} else if (frag_stream_info->sidx_pts != AV_NOPTS_VALUE) { +} else if (frag_stream_info->sidx_pts != AV_NOPTS_VALUE && !c->use_tfdt) { // FIXME: sidx earliest_presentation_time is *PTS*, s.b. // pts = frag_stream_info->sidx_pts; dts = frag_stream_info->sidx_pts - sc->time_offset; @@ -8169,6 +8169,8 @@ static const AVOption mov_options[] = { FLAGS, "use_mfra_for" }, {"pts", "pts", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_MFRA_PTS}, 0, 0, FLAGS, "use_mfra_for" }, +{"use_tfdt", "use tfdt for fragment timestamps", OFFSET(use_tfdt), AV_OPT_TYPE_BOOL, {.i64 = 0}, +0, 1, FLAGS}, { "export_all", "Export unrecognized metadata entries", OFFSET(export_all), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, .flags = FLAGS }, { "export_xmp", "Export full XMP metadata", OFFSET(export_xmp), ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/hls: relay format options to segment demuxer
ffmpeg | branch: master | Gyan Doshi | Sat May 29 15:45:18 2021 +0530| [51f1194edae2020ec99b816bd045a29db0e469f8] | committer: Gyan Doshi avformat/hls: relay format options to segment demuxer Signed-off-by: Gyan Doshi Reviewed-by: Steven Liu > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=51f1194edae2020ec99b816bd045a29db0e469f8 --- doc/demuxers.texi | 3 +++ libavformat/hls.c | 9 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 13fe17ff4f..2575dad704 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -347,6 +347,9 @@ Enabled by default for HTTP/1.1 servers. @item http_seekable Use HTTP partial requests for downloading HTTP segments. 0 = disable, 1 = enable, -1 = auto, Default is auto. + +@item seg_format_options +Set options for the demuxer of media segments using a list of key=value pairs separated by @code{:}. @end table @section image2 diff --git a/libavformat/hls.c b/libavformat/hls.c index 8fc6924c90..c2ca23e973 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -207,6 +207,7 @@ typedef struct HLSContext { int64_t cur_timestamp; AVIOInterruptCB *interrupt_callback; AVDictionary *avio_opts; +AVDictionary *seg_format_opts; char *allowed_extensions; int max_reload; int http_persistent; @@ -1959,6 +1960,7 @@ static int hls_read_header(AVFormatContext *s) struct playlist *pls = c->playlists[i]; const AVInputFormat *in_fmt = NULL; char *url; +AVDictionary *seg_format_opts = NULL; if (!(pls->ctx = avformat_alloc_context())) { ret = AVERROR(ENOMEM); @@ -2017,7 +2019,10 @@ static int hls_read_header(AVFormatContext *s) if ((ret = ff_copy_whiteblacklists(pls->ctx, s)) < 0) goto fail; -ret = avformat_open_input(>ctx, pls->segments[0]->url, in_fmt, NULL); +av_dict_copy(_format_opts, c->seg_format_opts, 0); + +ret = avformat_open_input(>ctx, pls->segments[0]->url, in_fmt, _format_opts); +av_dict_free(_format_opts); if (ret < 0) goto fail; @@ -2403,6 +2408,8 @@ static const AVOption hls_options[] = { OFFSET(http_multiple), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, FLAGS}, {"http_seekable", "Use HTTP partial requests, 0 = disable, 1 = enable, -1 = auto", OFFSET(http_seekable), AV_OPT_TYPE_BOOL, { .i64 = -1}, -1, 1, FLAGS}, +{"seg_format_options", "Set options for segment demuxer", +OFFSET(seg_format_opts), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0, FLAGS}, {NULL} }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/encoders: update default coder for aac
ffmpeg | branch: master | Gyan Doshi | Sun May 23 13:48:44 2021 +0530| [4c0d6c91f61a754f605c2e82b3cf6a81e8ff29cb] | committer: Gyan Doshi doc/encoders: update default coder for aac Changed in 660d1d8e3b. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c0d6c91f61a754f605c2e82b3cf6a81e8ff29cb --- doc/encoders.texi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index 2ba9938da2..4c38996372 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -53,7 +53,7 @@ Set AAC encoder coding method. Possible values: @table @samp @item twoloop -Two loop searching (TLS) method. +Two loop searching (TLS) method. This is the default method. This method first sets quantizers depending on band thresholds and then tries to find an optimal combination by adding or subtracting a specific value from @@ -75,7 +75,6 @@ Constant quantizer method. Uses a cheaper version of twoloop algorithm that doesn't try to do as many clever adjustments. Worse with low bitrates (less than 64kbps), but is better and much faster at higher bitrates. -This is the default choice for a coder @end table ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: note order of inputs for libvmaf
ffmpeg | branch: master | Gyan Doshi | Wed May 19 15:08:00 2021 +0530| [2261cc6d8ae57de498d0efb6af61ccf4b101790d] | committer: Gyan Doshi doc/filters: note order of inputs for libvmaf > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2261cc6d8ae57de498d0efb6af61ccf4b101790d --- doc/filters.texi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 1a8843fe4f..a8797e5dc3 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -14008,6 +14008,8 @@ ffmpeg -i input.mov -vf lensfun=make=Canon:model="Canon EOS 100D":lens_model="Ca Obtain the VMAF (Video Multi-Method Assessment Fusion) score between two input videos. +The first input is the encoded video, and the second input is the reference video. + The obtained VMAF score is printed through the logging system. It requires Netflix's vmaf library (libvmaf) as a pre-requisite. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/metadata: add intuitive labels for metadata values
ffmpeg | branch: master | Gyan Doshi | Fri May 14 16:08:30 2021 +0530| [f53414a0382701b9bc984f657939d4227c7c568a] | committer: Gyan Doshi avfilter/metadata: add intuitive labels for metadata values > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f53414a0382701b9bc984f657939d4227c7c568a --- doc/filters.texi | 4 ++-- libavfilter/f_metadata.c | 8 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index ed0ffe91fc..1a8843fe4f 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -25296,10 +25296,10 @@ The expression is evaluated through the eval API and can contain the following constants: @table @option -@item VALUE1 +@item VALUE1, FRAMEVAL Float representation of @code{value} from metadata key. -@item VALUE2 +@item VALUE2, USERVAL Float representation of @code{value} as supplied by user in @code{value} option. @end table diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index 5fec7c3c56..e7c7b00118 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -61,12 +61,16 @@ enum MetadataFunction { static const char *const var_names[] = { "VALUE1", "VALUE2", +"FRAMEVAL", +"USERVAL", NULL }; enum var_name { VAR_VALUE1, VAR_VALUE2, +VAR_FRAMEVAL, +VAR_USERVAL, VAR_VARS_NB }; @@ -172,8 +176,8 @@ static int parse_expr(MetadataContext *s, const char *value1, const char *value2 if (sscanf(value1, "%lf", ) + sscanf(value2, "%lf", ) != 2) return 0; -s->var_values[VAR_VALUE1] = f1; -s->var_values[VAR_VALUE2] = f2; +s->var_values[VAR_VALUE1] = s->var_values[VAR_FRAMEVAL] = f1; +s->var_values[VAR_VALUE2] = s->var_values[VAR_USERVAL] = f2; return av_expr_eval(s->expr, s->var_values, NULL); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: Unhedge note for sub option in guided filter
ffmpeg | branch: master | Gyan Doshi | Fri May 14 15:57:47 2021 +0530| [37099f2132fddb89cf5350a84382efd16cb1ee92] | committer: Gyan Doshi doc/filters: Unhedge note for sub option in guided filter > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37099f2132fddb89cf5350a84382efd16cb1ee92 --- doc/filters.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index a218289ddd..ed0ffe91fc 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -12978,7 +12978,7 @@ Default is @code{basic}. @item sub Set subsampling ratio for @code{fast} mode. -Allowed effective range is 2 to 64. Default is 4. +Range is 2 to 64. Default is 4. No subsampling occurs in @code{basic} mode. @item planes ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/guided: reindent after 93ddb9b617
ffmpeg | branch: master | Gyan Doshi | Fri May 14 15:55:45 2021 +0530| [234e71919469dc3bfc3910b58e82d33d495eeb5a] | committer: Gyan Doshi avfilter/guided: reindent after 93ddb9b617 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=234e71919469dc3bfc3910b58e82d33d495eeb5a --- libavfilter/vf_guided.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libavfilter/vf_guided.c b/libavfilter/vf_guided.c index 88bae5ab19..95b2c52f3a 100644 --- a/libavfilter/vf_guided.c +++ b/libavfilter/vf_guided.c @@ -59,13 +59,13 @@ typedef struct GuidedContext { #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM static const AVOption guided_options[] = { -{ "radius", "set the box radius", OFFSET(radius), AV_OPT_TYPE_INT, {.i64 = 3}, 1, 20, FLAGS }, -{ "eps","set the regularization parameter (with square)", OFFSET(eps),AV_OPT_TYPE_FLOAT, {.dbl = 0.01 }, 0.0,1, FLAGS }, +{ "radius", "set the box radius", OFFSET(radius), AV_OPT_TYPE_INT, {.i64 = 3}, 1, 20, FLAGS }, +{ "eps","set the regularization parameter (with square)", OFFSET(eps),AV_OPT_TYPE_FLOAT, {.dbl = 0.01 }, 0.0,1, FLAGS }, { "mode", "set filtering mode (0: basic mode; 1: fast mode)", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = BASIC}, BASIC, NB_MODES - 1, FLAGS, "mode" }, -{ "basic", "basic guided filter", 0, AV_OPT_TYPE_CONST, {.i64 = BASIC}, 0,0, FLAGS, "mode" }, -{ "fast", "fast guided filter", 0, AV_OPT_TYPE_CONST, {.i64 = FAST }, 0,0, FLAGS, "mode" }, -{ "sub","subsampling ratio for fast mode", OFFSET(sub),AV_OPT_TYPE_INT, {.i64 = 4}, 2, 64, FLAGS }, -{ "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=1 }, 0, 0xF, FLAGS }, +{ "basic", "basic guided filter", 0, AV_OPT_TYPE_CONST, {.i64 = BASIC}, 0,0, FLAGS, "mode" }, +{ "fast", "fast guided filter", 0, AV_OPT_TYPE_CONST, {.i64 = FAST }, 0,0, FLAGS, "mode" }, +{ "sub","subsampling ratio for fast mode", OFFSET(sub),AV_OPT_TYPE_INT, {.i64 = 4}, 2, 64, FLAGS }, +{ "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=1 }, 0, 0xF, FLAGS }, { NULL } }; @@ -163,11 +163,11 @@ static int config_input(AVFilterLink *inlink) s->sub = 1; } else if (s->mode == FAST) { - if (s->radius >= s->sub) - s->radius = s->radius / s->sub; - else { - s->radius = 1; - } +if (s->radius >= s->sub) +s->radius = s->radius / s->sub; +else { +s->radius = 1; +} } s->depth = desc->comp[0].depth; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/guided: simplify subsampling assignment.
ffmpeg | branch: master | Gyan Doshi | Fri May 14 09:27:49 2021 +0530| [93ddb9b6177ab668cae92f9b117a91b05cde386f] | committer: Gyan Doshi avfilter/guided: simplify subsampling assignment. Reduce option ranges to effective values. Signed-off-by: Gyan Doshi Reviewed-by: Steven Liu > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93ddb9b6177ab668cae92f9b117a91b05cde386f --- libavfilter/vf_guided.c | 26 -- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/libavfilter/vf_guided.c b/libavfilter/vf_guided.c index e7c689e7be..88bae5ab19 100644 --- a/libavfilter/vf_guided.c +++ b/libavfilter/vf_guided.c @@ -61,10 +61,10 @@ typedef struct GuidedContext { static const AVOption guided_options[] = { { "radius", "set the box radius", OFFSET(radius), AV_OPT_TYPE_INT, {.i64 = 3}, 1, 20, FLAGS }, { "eps","set the regularization parameter (with square)", OFFSET(eps),AV_OPT_TYPE_FLOAT, {.dbl = 0.01 }, 0.0,1, FLAGS }, -{ "mode", "set filtering mode (0: basic mode; 1: fast mode)", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = BASIC}, 0, NB_MODES - 1, FLAGS, "mode" }, +{ "mode", "set filtering mode (0: basic mode; 1: fast mode)", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = BASIC}, BASIC, NB_MODES - 1, FLAGS, "mode" }, { "basic", "basic guided filter", 0, AV_OPT_TYPE_CONST, {.i64 = BASIC}, 0,0, FLAGS, "mode" }, { "fast", "fast guided filter", 0, AV_OPT_TYPE_CONST, {.i64 = FAST }, 0,0, FLAGS, "mode" }, -{ "sub","subsampling ratio", OFFSET(sub),AV_OPT_TYPE_INT, {.i64 = 1}, 1, 64, FLAGS }, +{ "sub","subsampling ratio for fast mode", OFFSET(sub),AV_OPT_TYPE_INT, {.i64 = 4}, 2, 64, FLAGS }, { "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=1 }, 0, 0xF, FLAGS }, { NULL } }; @@ -160,24 +160,14 @@ static int config_input(AVFilterLink *inlink) } if (s->mode == BASIC) { -if (s->sub != 1) { -av_log(ctx, AV_LOG_WARNING, "Subsampling ratio is 1 in basic mode.\n"); -s->sub = 1; -} +s->sub = 1; } else if (s->mode == FAST) { -if (s->sub == 1) { -av_log(ctx, AV_LOG_WARNING, "Subsampling ratio is larger than 1 in fast mode.\n"); -s->sub = 4; -} -if (s->radius >= s->sub) -s->radius = s->radius / s->sub; -else { -s->radius = 1; -} -} -else { -return AVERROR_BUG; + if (s->radius >= s->sub) + s->radius = s->radius / s->sub; + else { + s->radius = 1; + } } s->depth = desc->comp[0].depth; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/filters: correct name for guided filter
ffmpeg | branch: master | Gyan Doshi | Thu May 13 19:23:12 2021 +0530| [c122a6c10dedc05933a8b11a3b82f18afc8ca5b7] | committer: Gyan Doshi doc/filters: correct name for guided filter Note input requirements and reword option sub description. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c122a6c10dedc05933a8b11a3b82f18afc8ca5b7 --- doc/filters.texi | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index b574334bea..a218289ddd 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -12957,8 +12957,10 @@ greyedge=difford=1:minknorm=0:sigma=2 @end itemize -@section guided filter +@section guided Apply guided filter for edge-preserving smoothing, dehazing and so on. +This filter requires two inputs of same resolution and pixel format. +The second input serves as the reference. The filter accepts the following options: @table @option @@ -12975,10 +12977,9 @@ Set filter mode. Can be @code{basic} or @code{fast}. Default is @code{basic}. @item sub -Set subsampling ratio. -Allowed range is 1 to 64. -Default is always 1 for @code{basic} value of @var{mode} option, -and 4 for @code{fast} value of @var{mode} option. +Set subsampling ratio for @code{fast} mode. +Allowed effective range is 2 to 64. Default is 4. +No subsampling occurs in @code{basic} mode. @item planes Set planes to filter. Default is first only. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".