[FFmpeg-devel] [PATCH v1 6/6] avformat/evc: Small fixes in documentation
Signed-off-by: Dawid Kozinski --- libavformat/evc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/evc.c b/libavformat/evc.c index fabccb054c..2f4c74fe51 100644 --- a/libavformat/evc.c +++ b/libavformat/evc.c @@ -233,7 +233,7 @@ static int evcc_write(AVIOContext *pb, EVCDecoderConfigurationRecord *evcc) /* unsigned int(8) profile_idc */ avio_w8(pb, evcc->profile_idc); -/* unsigned int(8) profile_idc */ +/* unsigned int(8) level_idc */ avio_w8(pb, evcc->level_idc); /* unsigned int(32) toolset_idc_h */ @@ -254,7 +254,7 @@ static int evcc_write(AVIOContext *pb, EVCDecoderConfigurationRecord *evcc) /* unsigned int(16) pic_width_in_luma_samples; */ avio_wb16(pb, evcc->pic_width_in_luma_samples); -/* unsigned int(16) pic_width_in_luma_samples; */ +/* unsigned int(16) pic_height_in_luma_samples; */ avio_wb16(pb, evcc->pic_height_in_luma_samples); /* -- 2.25.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v1 5/6] avcodec/evc: Reference to ISO_IEC_23094-1-2020 document section for EVC_MAX_APS_COUNT enum has been fixed
Signed-off-by: Dawid Kozinski --- libavcodec/evc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/evc.h b/libavcodec/evc.h index e493455a42..d68dc74997 100644 --- a/libavcodec/evc.h +++ b/libavcodec/evc.h @@ -106,15 +106,15 @@ enum EVCSliceType { }; enum { -// 7.4.3.2: aps_video_parameter_set_id is u(4). -EVC_MAX_APS_COUNT = 32, - // 7.4.3.1: sps_seq_parameter_set_id is in [0, 15]. EVC_MAX_SPS_COUNT = 16, // 7.4.3.2: pps_pic_parameter_set_id is in [0, 63]. EVC_MAX_PPS_COUNT = 64, +// 7.4.3.3: adaptional_parameter_set_id is in [0, 31]. +EVC_MAX_APS_COUNT = 32, + // 7.4.5: slice header slice_pic_parameter_set_id in [0, 63] EVC_MAX_SH_COUNT = 64, -- 2.25.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v1 4/6] avformat/avi: Added EVC codec tag to the list of supported codec_id-codec_tag pairs for AVI muxer
Signed-off-by: Dawid Kozinski --- libavformat/riff.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/riff.c b/libavformat/riff.c index 157976583c..306dc3b47a 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -506,6 +506,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { { AV_CODEC_ID_RTV1, MKTAG('R', 'T', 'V', '1') }, { AV_CODEC_ID_VMIX, MKTAG('V', 'M', 'X', '1') }, { AV_CODEC_ID_LEAD, MKTAG('L', 'E', 'A', 'D') }, +{ AV_CODEC_ID_EVC, MKTAG('e', 'v', 'c', '1') }, { AV_CODEC_ID_NONE, 0 } }; -- 2.25.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v1 3/6] avcodec/bitstream_filters: Declaration of the ff_evc_frame_merge_bsf variable has been moved to the appropriate following the alphabetical order
Signed-off-by: Dawid Kozinski --- libavcodec/bitstream_filters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/bitstream_filters.c b/libavcodec/bitstream_filters.c index 12860c332b..138246c50e 100644 --- a/libavcodec/bitstream_filters.c +++ b/libavcodec/bitstream_filters.c @@ -34,6 +34,7 @@ extern const FFBitStreamFilter ff_dca_core_bsf; extern const FFBitStreamFilter ff_dts2pts_bsf; extern const FFBitStreamFilter ff_dv_error_marker_bsf; extern const FFBitStreamFilter ff_eac3_core_bsf; +extern const FFBitStreamFilter ff_evc_frame_merge_bsf; extern const FFBitStreamFilter ff_extract_extradata_bsf; extern const FFBitStreamFilter ff_filter_units_bsf; extern const FFBitStreamFilter ff_h264_metadata_bsf; @@ -67,7 +68,6 @@ extern const FFBitStreamFilter ff_vp9_superframe_bsf; extern const FFBitStreamFilter ff_vp9_superframe_split_bsf; extern const FFBitStreamFilter ff_vvc_metadata_bsf; extern const FFBitStreamFilter ff_vvc_mp4toannexb_bsf; -extern const FFBitStreamFilter ff_evc_frame_merge_bsf; #include "libavcodec/bsf_list.c" -- 2.25.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v1 2/6] avformat/nut: Added EVC codec tag to the list of supported codec_id-codec_tag pairs for NUT muxer
Signed-off-by: Dawid Kozinski --- libavformat/nut.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/nut.c b/libavformat/nut.c index 9692336ece..8c536719b1 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -47,6 +47,7 @@ const AVCodecTag ff_nut_video_tags[] = { { AV_CODEC_ID_VP9, MKTAG('V', 'P', '9', '0') }, { AV_CODEC_ID_HEVC, MKTAG('H', 'E', 'V', 'C') }, { AV_CODEC_ID_CPIA, MKTAG('C', 'P', 'i', 'A') }, +{ AV_CODEC_ID_EVC, MKTAG('e', 'v', 'c', '1') }, { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) }, { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) }, { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 16 ) }, -- 2.25.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v1 1/6] avcodec/evc: Set the AV_FRAME_FLAG_KEY flag for a decoded frame when the decoded packet contains a keyframe
Signed-off-by: Dawid Kozinski --- libavcodec/libxevd.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c index c6c7327e65..e864bd5200 100644 --- a/libavcodec/libxevd.c +++ b/libavcodec/libxevd.c @@ -391,6 +391,11 @@ static int libxevd_receive_frame(AVCodecContext *avctx, AVFrame *frame) if (stat.read != nalu_size) av_log(avctx, AV_LOG_INFO, "Different reading of bitstream (in:%d, read:%d)\n,", nalu_size, stat.read); +if (stat.stype == XEVD_ST_I) { +frame->pict_type = AV_PICTURE_TYPE_I; +frame->flags |= AV_FRAME_FLAG_KEY; +} + // stat.fnum - has negative value if the decoded data is not frame if (stat.fnum >= 0) { -- 2.25.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 8/8] fftools: Fix implicit-const-int-float-conversion warning
From: Zhao Zhili --- fftools/cmdutils.c | 2 +- fftools/ffmpeg_opt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 2120fc7935..a8f5c6d89b 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -311,7 +311,7 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt, *(int *)dst = num; } else if (po->type == OPT_TYPE_INT64) { -ret = parse_number(opt, arg, OPT_TYPE_INT64, INT64_MIN, INT64_MAX, ); +ret = parse_number(opt, arg, OPT_TYPE_INT64, INT64_MIN, (double)INT64_MAX, ); if (ret < 0) goto finish; diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 6526e8e3e8..910e4a336b 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -317,7 +317,7 @@ static int opt_filter_threads(void *optctx, const char *opt, const char *arg) static int opt_abort_on(void *optctx, const char *opt, const char *arg) { static const AVOption opts[] = { -{ "abort_on" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" }, +{ "abort_on" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, (double)INT64_MAX, .unit = "flags" }, { "empty_output" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = ABORT_ON_FLAG_EMPTY_OUTPUT}, .unit = "flags" }, { "empty_output_stream", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM }, .unit = "flags" }, { NULL }, -- 2.25.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 7/8] avcodec/mediacodecenc: add AV_CODEC_CAP_ENCODER_FLUSH support
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/mediacodecenc.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 64816ccf0a..c87a0d86c5 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -705,6 +705,15 @@ static av_cold int mediacodec_close(AVCodecContext *avctx) return 0; } +static av_cold void mediacodec_flush(AVCodecContext *avctx) +{ +MediaCodecEncContext *s = avctx->priv_data; +if (s->bsf) +av_bsf_flush(s->bsf); +av_frame_unref(s->frame); +ff_AMediaCodec_flush(s->codec); +} + static const AVCodecHWConfigInternal *const mediacodec_hw_configs[] = { &(const AVCodecHWConfigInternal) { .public = { @@ -755,13 +764,15 @@ const FFCodec ff_ ## short_name ## _mediacodec_encoder = { \ CODEC_LONG_NAME(long_name " Android MediaCodec encoder"), \ .p.type = AVMEDIA_TYPE_VIDEO, \ .p.id = codec_id, \ -.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY \ -| AV_CODEC_CAP_HARDWARE,\ +.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | \ +AV_CODEC_CAP_HARDWARE | \ +AV_CODEC_CAP_ENCODER_FLUSH, \ .priv_data_size = sizeof(MediaCodecEncContext), \ .p.pix_fmts = avc_pix_fmts, \ .init = mediacodec_init,\ FF_CODEC_RECEIVE_PACKET_CB(mediacodec_encode), \ .close= mediacodec_close, \ +.flush= mediacodec_flush, \ .p.priv_class = _name ## _mediacodec_class, \ .caps_internal= FF_CODEC_CAP_INIT_CLEANUP, \ .p.wrapper_name = "mediacodec", \ -- 2.25.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 6/8] avcodec/mediacodecenc: Add global header support
From: Zhao Zhili The extradata is generated by encoding a dummy frame, then reset the encoder state by mediacodec flush(). It only works for pixel format other than AV_PIX_FMT_MEDIACODEC, since I'm not sure how to create a dummy frame safely with AV_PIX_FMT_MEDIACODEC. Signed-off-by: Zhao Zhili --- configure | 6 +- libavcodec/mediacodecenc.c | 166 + 2 files changed, 155 insertions(+), 17 deletions(-) diff --git a/configure b/configure index d0d0e8430b..4da1c0be35 100755 --- a/configure +++ b/configure @@ -3313,6 +3313,7 @@ ac3_mf_encoder_deps="mediafoundation" av1_cuvid_decoder_deps="cuvid CUVIDAV1PICPARAMS" av1_mediacodec_decoder_deps="mediacodec" av1_mediacodec_encoder_deps="mediacodec" +av1_mediacodec_encoder_select="extract_extradata_bsf" av1_nvenc_encoder_deps="nvenc NV_ENC_PIC_PARAMS_AV1" av1_nvenc_encoder_select="atsc_a53" h263_v4l2m2m_decoder_deps="v4l2_m2m h263_v4l2_m2m" @@ -3323,7 +3324,7 @@ h264_cuvid_decoder_select="h264_mp4toannexb_bsf" h264_mediacodec_decoder_deps="mediacodec" h264_mediacodec_decoder_select="h264_mp4toannexb_bsf h264_parser" h264_mediacodec_encoder_deps="mediacodec" -h264_mediacodec_encoder_select="h264_metadata" +h264_mediacodec_encoder_select="extract_extradata_bsf h264_metadata" h264_mf_encoder_deps="mediafoundation" h264_mmal_decoder_deps="mmal" h264_nvenc_encoder_deps="nvenc" @@ -3343,7 +3344,7 @@ hevc_cuvid_decoder_select="hevc_mp4toannexb_bsf" hevc_mediacodec_decoder_deps="mediacodec" hevc_mediacodec_decoder_select="hevc_mp4toannexb_bsf hevc_parser" hevc_mediacodec_encoder_deps="mediacodec" -hevc_mediacodec_encoder_select="hevc_metadata" +hevc_mediacodec_encoder_select="extract_extradata_bsf hevc_metadata" hevc_mf_encoder_deps="mediafoundation" hevc_nvenc_encoder_deps="nvenc" hevc_nvenc_encoder_select="atsc_a53" @@ -3375,6 +3376,7 @@ mpeg2_v4l2m2m_decoder_deps="v4l2_m2m mpeg2_v4l2_m2m" mpeg4_cuvid_decoder_deps="cuvid" mpeg4_mediacodec_decoder_deps="mediacodec" mpeg4_mediacodec_encoder_deps="mediacodec" +mpeg4_mediacodec_encoder_select="extract_extradata_bsf" mpeg4_mmal_decoder_deps="mmal" mpeg4_omx_encoder_deps="omx" mpeg4_v4l2m2m_decoder_deps="v4l2_m2m mpeg4_v4l2_m2m" diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 8caaad729a..64816ccf0a 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -23,6 +23,7 @@ #include "config_components.h" #include "libavutil/avassert.h" +#include "libavutil/avstring.h" #include "libavutil/hwcontext_mediacodec.h" #include "libavutil/imgutils.h" #include "libavutil/mem.h" @@ -74,6 +75,7 @@ typedef struct MediaCodecEncContext { int bitrate_mode; int level; int pts_as_dts; +int extract_extradata; } MediaCodecEncContext; enum { @@ -112,6 +114,23 @@ static void mediacodec_output_format(AVCodecContext *avctx) ff_AMediaFormat_delete(out_format); } +static int extract_extradata_support(AVCodecContext *avctx) +{ +const AVBitStreamFilter *bsf = av_bsf_get_by_name("extract_extradata"); + +if (!bsf) { +av_log(avctx, AV_LOG_WARNING, "extract_extradata bsf not found\n"); +return 0; +} + +for (int i = 0; bsf->codec_ids[i] != AV_CODEC_ID_NONE; i++) { +if (bsf->codec_ids[i] == avctx->codec_id) +return 1; +} + +return 0; +} + static int mediacodec_init_bsf(AVCodecContext *avctx) { MediaCodecEncContext *s = avctx->priv_data; @@ -120,20 +139,32 @@ static int mediacodec_init_bsf(AVCodecContext *avctx) int crop_right = s->width - avctx->width; int crop_bottom = s->height - avctx->height; -if (!crop_right && !crop_bottom) +/* Nothing can be done for this format now */ +if (avctx->pix_fmt == AV_PIX_FMT_MEDIACODEC) return 0; -if (avctx->codec_id == AV_CODEC_ID_H264) -ret = snprintf(str, sizeof(str), "h264_metadata=crop_right=%d:crop_bottom=%d", - crop_right, crop_bottom); -else if (avctx->codec_id == AV_CODEC_ID_HEVC) -ret = snprintf(str, sizeof(str), "hevc_metadata=crop_right=%d:crop_bottom=%d", - crop_right, crop_bottom); -else +s->extract_extradata = (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) && + extract_extradata_support(avctx); +if (!crop_right && !crop_bottom && !s->extract_extradata) return 0; -if (ret >= sizeof(str)) -return AVERROR_BUFFER_TOO_SMALL; +ret = 0; +if (crop_right || crop_bottom) { +if (avctx->codec_id == AV_CODEC_ID_H264) +ret = snprintf(str, sizeof(str), "h264_metadata=crop_right=%d:crop_bottom=%d", + crop_right, crop_bottom); +else if (avctx->codec_id == AV_CODEC_ID_HEVC) +ret = snprintf(str, sizeof(str), "hevc_metadata=crop_right=%d:crop_bottom=%d", + crop_right, crop_bottom); +if (ret >= sizeof(str)) +return
[FFmpeg-devel] [PATCH 2/8] avcodec/mediacodec_wrapper: link to NDK mediacodec API directly
From: Zhao Zhili Drop support of Android version before 5.0. --- configure | 2 +- libavcodec/mediacodec_wrapper.c | 164 +++- 2 files changed, 36 insertions(+), 130 deletions(-) diff --git a/configure b/configure index 47ec215f8c..d0d0e8430b 100755 --- a/configure +++ b/configure @@ -3131,7 +3131,7 @@ d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext" d3d12va_deps="dxva_h ID3D12Device ID3D12VideoDecoder" dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32" ffnvcodec_deps_any="libdl LoadLibrary" -mediacodec_deps="android" +mediacodec_deps="android mediandk" nvdec_deps="ffnvcodec" vaapi_x11_deps="xlib_x11" videotoolbox_hwaccel_deps="videotoolbox pthreads" diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 306359071e..a9c8b522e0 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@ -1828,25 +1828,8 @@ typedef struct FFAMediaFormatNdk { void *libmedia; AMediaFormat *impl; -AMediaFormat *(*new)(void); -media_status_t (*delete)(AMediaFormat*); - -const char* (*toString)(AMediaFormat*); - -bool (*getInt32)(AMediaFormat*, const char *name, int32_t *out); -bool (*getInt64)(AMediaFormat*, const char *name, int64_t *out); -bool (*getFloat)(AMediaFormat*, const char *name, float *out); -bool (*getSize)(AMediaFormat*, const char *name, size_t *out); -bool (*getBuffer)(AMediaFormat*, const char *name, void** data, size_t *size); -bool (*getString)(AMediaFormat*, const char *name, const char **out); bool (*getRect)(AMediaFormat *, const char *name, int32_t *left, int32_t *top, int32_t *right, int32_t *bottom); - -void (*setInt32)(AMediaFormat*, const char* name, int32_t value); -void (*setInt64)(AMediaFormat*, const char* name, int64_t value); -void (*setFloat)(AMediaFormat*, const char* name, float value); -void (*setString)(AMediaFormat*, const char* name, const char* value); -void (*setBuffer)(AMediaFormat*, const char* name, const void* data, size_t size); void (*setRect)(AMediaFormat *, const char *name, int32_t left, int32_t top, int32_t right, int32_t bottom); } FFAMediaFormatNdk; @@ -1858,34 +1841,6 @@ typedef struct FFAMediaCodecNdk { AMediaCodec *impl; ANativeWindow *window; -AMediaCodec* (*createCodecByName)(const char *name); -AMediaCodec* (*createDecoderByType)(const char *mime_type); -AMediaCodec* (*createEncoderByType)(const char *mime_type); -media_status_t (*delete)(AMediaCodec*); - -media_status_t (*configure)(AMediaCodec *, -const AMediaFormat *format, -ANativeWindow *surface, -AMediaCrypto *crypto, -uint32_t flags); -media_status_t (*start)(AMediaCodec*); -media_status_t (*stop)(AMediaCodec*); -media_status_t (*flush)(AMediaCodec*); - -uint8_t* (*getInputBuffer)(AMediaCodec*, size_t idx, size_t *out_size); -uint8_t* (*getOutputBuffer)(AMediaCodec*, size_t idx, size_t *out_size); - -ssize_t (*dequeueInputBuffer)(AMediaCodec*, int64_t timeoutUs); -media_status_t (*queueInputBuffer)(AMediaCodec*, size_t idx, - long offset, size_t size, - uint64_t time, uint32_t flags); - -ssize_t (*dequeueOutputBuffer)(AMediaCodec*, AMediaCodecBufferInfo *info, int64_t timeoutUs); -AMediaFormat* (*getOutputFormat)(AMediaCodec*); - -media_status_t (*releaseOutputBuffer)(AMediaCodec*, size_t idx, bool render); -media_status_t (*releaseOutputBufferAtTime)(AMediaCodec *mData, size_t idx, int64_t timestampNs); - // Available since API level 28. media_status_t (*getName)(AMediaCodec*, char** out_name); void (*releaseName)(AMediaCodec*, char* name); @@ -1925,38 +1880,15 @@ static FFAMediaFormat *mediaformat_ndk_create(AMediaFormat *impl) #define GET_OPTIONAL_SYMBOL(sym) \ format->sym = dlsym(format->libmedia, "AMediaFormat_" #sym); -#define GET_SYMBOL(sym) \ -GET_OPTIONAL_SYMBOL(sym)\ -if (!format->sym) \ -goto error; - -GET_SYMBOL(new) -GET_SYMBOL(delete) - -GET_SYMBOL(toString) - -GET_SYMBOL(getInt32) -GET_SYMBOL(getInt64) -GET_SYMBOL(getFloat) -GET_SYMBOL(getSize) -GET_SYMBOL(getBuffer) -GET_SYMBOL(getString) GET_OPTIONAL_SYMBOL(getRect) - -GET_SYMBOL(setInt32) -GET_SYMBOL(setInt64) -GET_SYMBOL(setFloat) -GET_SYMBOL(setString) -GET_SYMBOL(setBuffer) GET_OPTIONAL_SYMBOL(setRect) -#undef GET_SYMBOL #undef GET_OPTIONAL_SYMBOL if (impl) { format->impl = impl; } else { -format->impl = format->new(); +format->impl = AMediaFormat_new(); if (!format->impl) goto error; } @@ -1984,7 +1916,7 @@
[FFmpeg-devel] [PATCH 1/8] configure: Lower Android API level requirement of mediandk
From: Zhao Zhili AImage_delete is introduced in API level 24, while AMediaFormat_new is introduced in API level 21. We only need API level 21 to support NDK mediacodec. This change doesn't break or change of android_camera_indev since camera2ndk still needs API level 24. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 55f1fc354d..47ec215f8c 100755 --- a/configure +++ b/configure @@ -6640,7 +6640,7 @@ check_lib shell32 "windows.h shellapi.h" CommandLineToArgvW -lshell32 check_lib psapi"windows.h psapi.h"GetProcessMemoryInfo -lpsapi check_lib android android/native_window.h ANativeWindow_acquire -landroid -check_lib mediandk "stdint.h media/NdkImage.h" AImage_delete -lmediandk +check_lib mediandk "stdint.h media/NdkMediaFormat.h" AMediaFormat_new -lmediandk check_lib camera2ndk "stdbool.h stdint.h camera/NdkCameraManager.h" ACameraManager_create -lcamera2ndk enabled appkit && check_apple_framework AppKit -- 2.25.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 5/8] avcodec/mediacodecenc: Remove write only variable
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/mediacodecenc.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index e562181120..8caaad729a 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -352,9 +352,7 @@ bailout: return ret; } -static int mediacodec_receive(AVCodecContext *avctx, - AVPacket *pkt, - int *got_packet) +static int mediacodec_receive(AVCodecContext *avctx, AVPacket *pkt) { MediaCodecEncContext *s = avctx->priv_data; FFAMediaCodec *codec = s->codec; @@ -400,7 +398,7 @@ static int mediacodec_receive(AVCodecContext *avctx, memcpy(s->extradata, out_buf + out_info.offset, out_info.size); ff_AMediaCodec_releaseOutputBuffer(codec, index, false); // try immediately -return mediacodec_receive(avctx, pkt, got_packet); +return mediacodec_receive(avctx, pkt); } ret = ff_get_encode_buffer(avctx, pkt, out_info.size + s->extradata_size, 0); @@ -419,7 +417,6 @@ static int mediacodec_receive(AVCodecContext *avctx, if (out_info.flags & ff_AMediaCodec_getBufferFlagKeyFrame(codec)) pkt->flags |= AV_PKT_FLAG_KEY; ret = 0; -*got_packet = 1; av_log(avctx, AV_LOG_TRACE, "receive packet pts %" PRId64 " dts %" PRId64 " flags %d extradata %d\n", @@ -510,7 +507,6 @@ static int mediacodec_encode(AVCodecContext *avctx, AVPacket *pkt) { MediaCodecEncContext *s = avctx->priv_data; int ret; -int got_packet = 0; // Return on three case: // 1. Serious error @@ -525,7 +521,7 @@ static int mediacodec_encode(AVCodecContext *avctx, AVPacket *pkt) return ret; } -ret = mediacodec_receive(avctx, pkt, _packet); +ret = mediacodec_receive(avctx, pkt); if (s->bsf) { if (!ret || ret == AVERROR_EOF) ret = av_bsf_send_packet(s->bsf, pkt); -- 2.25.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 4/8] avcodec/mediacodecenc: Fix return empty packet when bsf is used
From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/mediacodecenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index b59de75b9b..e562181120 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -534,7 +534,7 @@ static int mediacodec_encode(AVCodecContext *avctx, AVPacket *pkt) return 0; } -if (ret != AVERROR(EAGAIN)) +if (ret < 0 && ret != AVERROR(EAGAIN)) return ret; if (!s->frame->buf[0]) { -- 2.25.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 3/8] avcodec/mediacodec_wrapper: Fix unused variable warning
From: Zhao Zhili --- libavcodec/mediacodec_wrapper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index a9c8b522e0..96c88a 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@ -365,6 +365,7 @@ int ff_AMediaCodecProfile_getProfileFromAVCodecContext(AVCodecContext *avctx) (void)VP9Profile3HDR; (void)VP9Profile2HDR10Plus; (void)VP9Profile3HDR10Plus; +(void)MPEG4ProfileSimpleFace; (void)AV1ProfileMain10; (void)AV1ProfileMain10HDR10; (void)AV1ProfileMain10HDR10Plus; -- 2.25.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [RFC] Anyone using 6.0, 4.1, 3.4 ?
On 4/15/2024 5:07 AM, Michael Niedermayer wrote: On Sun, Apr 14, 2024 at 09:15:07PM -0300, James Almer wrote: On 4/14/2024 8:55 PM, Michael Niedermayer wrote: Hi I see nothing using 6.0 and 4.1 on our downstreams page, so i suggest to move 6.0 to the archieve page after 6.0.2 and 4.1 probably without new releases 4.1 is used by debian old-old-stable, so one last point release would not be unwelcome. debian old stable lists 4.3 on our https://trac.ffmpeg.org/wiki/Downstreams Old-old stable. It uses 4.1, see https://tracker.debian.org/pkg/ffmpeg thx [...] ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] FFmpeg table at NAB
Hello all, I wasn't looking to start trouble, but I didn't see any discussion of this on the mailing list so wanted to bring it to the developer community's attention. I attended the NAB conference and went by the "ffmpeg" booth on Sunday. What I found was a single table with the official ffmpeg banner hanging right next to a banner for the GPAC project, and two salespeople from GPAC handing out marketing literature and trying to educate me on why I should use their framework for my next project. I'm not saying that GPAC shouldn't be able to have a table at the conference, but it feels pretty misleading to have an "ffmpeg" booth listed in the conference materials, with a table prominently displaying the ffmpeg logo, with zero people from ffmpeg and people pushing users to use an alternative framework that some might actually considered to be a competitor to ffmpeg. Devin -- Devin Heitmueller, Senior Software Engineer LTN Global Communications o: +1 (301) 363-1001 w: https://ltnglobal.com e: devin.heitmuel...@ltnglobal.com ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v2] lavc/aarch64/fdct: add neon-optimized fdct for aarch64
The code is imported from libjpeg-turbo-3.0.1. The neon registers used have been changed to avoid modifying v8-v15. --- libavcodec/aarch64/Makefile | 2 + libavcodec/aarch64/fdct.h | 26 ++ libavcodec/aarch64/fdctdsp_init_aarch64.c | 39 +++ libavcodec/aarch64/fdctdsp_neon.S | 368 ++ libavcodec/avcodec.h | 1 + libavcodec/fdctdsp.c | 4 +- libavcodec/fdctdsp.h | 2 + libavcodec/options_table.h| 1 + libavcodec/tests/aarch64/dct.c| 2 + tests/checkasm/Makefile | 1 + tests/checkasm/checkasm.c | 3 + tests/checkasm/checkasm.h | 1 + tests/checkasm/fdctdsp.c | 68 tests/fate/checkasm.mak | 1 + 14 files changed, 518 insertions(+), 1 deletion(-) create mode 100644 libavcodec/aarch64/fdct.h create mode 100644 libavcodec/aarch64/fdctdsp_init_aarch64.c create mode 100644 libavcodec/aarch64/fdctdsp_neon.S create mode 100644 tests/checkasm/fdctdsp.c diff --git a/libavcodec/aarch64/Makefile b/libavcodec/aarch64/Makefile index 95ad4dd202..a3256bb1cc 100644 --- a/libavcodec/aarch64/Makefile +++ b/libavcodec/aarch64/Makefile @@ -1,5 +1,6 @@ # subsystems OBJS-$(CONFIG_AC3DSP) += aarch64/ac3dsp_init_aarch64.o +OBJS-$(CONFIG_FDCTDSP) += aarch64/fdctdsp_init_aarch64.o OBJS-$(CONFIG_FMTCONVERT) += aarch64/fmtconvert_init.o OBJS-$(CONFIG_H264CHROMA) += aarch64/h264chroma_init_aarch64.o OBJS-$(CONFIG_H264DSP) += aarch64/h264dsp_init_aarch64.o @@ -37,6 +38,7 @@ ARMV8-OBJS-$(CONFIG_VIDEODSP) += aarch64/videodsp.o # subsystems NEON-OBJS-$(CONFIG_AAC_DECODER) += aarch64/sbrdsp_neon.o NEON-OBJS-$(CONFIG_AC3DSP) += aarch64/ac3dsp_neon.o +NEON-OBJS-$(CONFIG_FDCTDSP) += aarch64/fdctdsp_neon.o NEON-OBJS-$(CONFIG_FMTCONVERT) += aarch64/fmtconvert_neon.o NEON-OBJS-$(CONFIG_H264CHROMA) += aarch64/h264cmc_neon.o NEON-OBJS-$(CONFIG_H264DSP) += aarch64/h264dsp_neon.o \ diff --git a/libavcodec/aarch64/fdct.h b/libavcodec/aarch64/fdct.h new file mode 100644 index 00..0901b53a83 --- /dev/null +++ b/libavcodec/aarch64/fdct.h @@ -0,0 +1,26 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AARCH64_FDCT_H +#define AVCODEC_AARCH64_FDCT_H + +#include + +void ff_fdct_neon(int16_t *block); + +#endif /* AVCODEC_AARCH64_FDCT_H */ diff --git a/libavcodec/aarch64/fdctdsp_init_aarch64.c b/libavcodec/aarch64/fdctdsp_init_aarch64.c new file mode 100644 index 00..59d91bc8fc --- /dev/null +++ b/libavcodec/aarch64/fdctdsp_init_aarch64.c @@ -0,0 +1,39 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/attributes.h" +#include "libavutil/cpu.h" +#include "libavutil/aarch64/cpu.h" +#include "libavcodec/avcodec.h" +#include "libavcodec/fdctdsp.h" +#include "fdct.h" + +av_cold void ff_fdctdsp_init_aarch64(FDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth) +{ +int cpu_flags = av_get_cpu_flags(); + +if (have_neon(cpu_flags)) { +if (!high_bit_depth) { +if (avctx->dct_algo == FF_DCT_AUTO || +avctx->dct_algo == FF_DCT_NEON) { +c->fdct = ff_fdct_neon; +} +} +} +} diff --git
Re: [FFmpeg-devel] [PATCH] lavc/aarch64/fdct: add neon-optimized fdct for aarch64
Hi, On Wed, Feb 14, 2024 at 10:42 AM Martin Storsjö wrote: > On Sun, 4 Feb 2024, Ramiro Polla wrote: > > > The code is imported from libjpeg-turbo-3.0.1. The neon registers used > > have been changed to avoid modifying v8-v15. > > --- > > I don't remember if we have any extra routines we need to do if importing > foreign code with a differing license. The license here seems fine in any > case though. I think the license should be ok (based on the "Patches/Committing" section in developer.texi). > This seems to work fine in all my test environments. And thanks for making > sure it doesn't use v8-v15! > > I'm not so familiar with these DSP functions, whether it is norm to add a > new constant like FF_DCT_NEON, but I guess it seems to match the pattern > of the existing code. I don't know either, so I just tried to match the existing code :) > I presume the main case that tests this is "make fate-dct8x8", which > builds and executes libavcodec/tests/dct? How much work would it be to > integrate testing of these routines into checkasm? That way we could rest > assured that the assembly passes all such ABI checks that we do there, > including what registers must not be clobbered. I added checkasm for fdct. It's especially useful to make sure there is no overflow in the DC coefficient. > The assembly uses a different indentation width than the rest of our > assembly. I recently spent some effort on cleaning that up so that our > code is mostly consistent, so I'd prefer not to add new code that deviates > from it. It primarily looks like you'd need to add 4 spaces at the start > of each line. > > I've used a script for mostly automatically reindenting our arm assembly, > you can grab it at https://martin.st/temp/ffmpeg-asm-indent.pl, run it as > "cat file.S | ./ffmpeg-asm-indent.pl > tmp; mv tmp file.S". It's not 100% > accurate, but mostly gets you there, but it's good to manually check it > afterwards as well. I fixed the indentation and tweaked a few more cosmetics in the comments. Thank you for the review and the help on IRC! I'll send v2 shortly. Ramiro ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] opusdsp: add ability to modify deemphasis constant
On Mon, Apr 15, 2024 at 08:28:30AM +0200, Lynne wrote: > xHE-AAC relies on the same postfilter mechanism > that Opus uses to improve clarity (albeit with a steeper > deemphasis filter, using a z=0.64). > > The code to apply it is identical, it's still just a > simple IIR low-pass filter. This commit makes it possible > to use alternative constants. > > Patch attached. > > aarch64/opusdsp_init.c |2 +- > aarch64/opusdsp_neon.S | 28 +--- > opusdec_celt.c |4 +++- > opusdsp.c | 28 ++-- > opusdsp.h |2 +- > x86/opusdsp.asm|9 +++-- > x86/opusdsp_init.c |2 +- > 7 files changed, 40 insertions(+), 35 deletions(-) > 4a533c8a664bd6f0d0dac3775e4bd94050bd0532 > 0001-opusdsp-add-ability-to-modify-deemphasis-constant.patch > From c4ad107076970a555ed838a75c0343dffe0cad36 Mon Sep 17 00:00:00 2001 > From: Lynne > Date: Mon, 29 Jan 2024 04:31:43 +0100 > Subject: [PATCH] opusdsp: add ability to modify deemphasis constant seems missing some header entry or other patch libavcodec/opusdec_celt.c: In function ‘ff_celt_decode_frame’: libavcodec/opusdec_celt.c:464:51: error: ‘ff_deemph_opus_weights’ undeclared (first use in this function) 464 | ff_deemph_opus_weights, | ^~ libavcodec/opusdec_celt.c:464:51: note: each undeclared identifier is reported only once for each function it appears in make: *** [ffbuild/common.mak:81: libavcodec/opusdec_celt.o] Error 1 thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 4/6] doc/muxers: add mkvtimestamp_v2
Stefano Sabatini: > On date Tuesday 2024-04-16 12:50:19 +0200, Andreas Rheinhardt wrote: >> Stefano Sabatini: >>> --- >>> doc/muxers.texi | 8 >>> 1 file changed, 8 insertions(+) >>> >>> diff --git a/doc/muxers.texi b/doc/muxers.texi >>> index f94513527d..490d5557bf 100644 >>> --- a/doc/muxers.texi >>> +++ b/doc/muxers.texi >>> @@ -2933,6 +2933,14 @@ MicroDVD subtitle format muxer. >>> >>> This muxer accepts a single @samp{microdvd} subtitles stream. >>> >>> +@section mkvtimestamp_v2 >>> +mkvtoolnix v2 timecode format muxer. >>> + >>> +Write the PTS rawvideo frame to the output, as supported by the >>> +@command{mkvextact} tool from the @command{mkvtoolnix} suite. >>> + >>> +This muxer accepts a single @samp{rawvideo} stream. >>> + >>> @section mp3 >>> >>> The MP3 muxer writes a raw MP3 stream with the following optional features: >> > >> This is wrong: MKVToolNix switched to "# timestamp format v2" a long >> time ago (we still write the old "# timecode format v2" header); >> furthermore, MKVToolNix actually uses pts (which it reorders to be >> ascending), not dts like our muxer. Furthermore MKVToolNix does not >> force a 1ms precision on timestamps. > > Correct. > > I compared the output of the muxer and of mkvtoolnix extract > timestamp_v2 and I'm not yet clear about the timestamp differences I'm > observing (the muxer output maps with the timestamps, the mkvtoolnix > timestamps differ by a few ms). But I think also mkvtoolnix use a 1ms > timebase. The accuracy of the timestamps output by mkvextract is determined by the TimestampScale of the file in question; it is most often 1ms when the file has video. You need to provide more details if you want these discrepancies to be analyzed. > > Also, IIRC there is no generic way to reorder PTSs, so this might > account for another difference which might be difficult to implement > generically. Write them into a buffer and reorder them at the end? (No, I have no intention to actually implement this. I am rather leaning to "this muxer should not exist".) - Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 4/6] doc/muxers: add mkvtimestamp_v2
On date Tuesday 2024-04-16 12:50:19 +0200, Andreas Rheinhardt wrote: > Stefano Sabatini: > > --- > > doc/muxers.texi | 8 > > 1 file changed, 8 insertions(+) > > > > diff --git a/doc/muxers.texi b/doc/muxers.texi > > index f94513527d..490d5557bf 100644 > > --- a/doc/muxers.texi > > +++ b/doc/muxers.texi > > @@ -2933,6 +2933,14 @@ MicroDVD subtitle format muxer. > > > > This muxer accepts a single @samp{microdvd} subtitles stream. > > > > +@section mkvtimestamp_v2 > > +mkvtoolnix v2 timecode format muxer. > > + > > +Write the PTS rawvideo frame to the output, as supported by the > > +@command{mkvextact} tool from the @command{mkvtoolnix} suite. > > + > > +This muxer accepts a single @samp{rawvideo} stream. > > + > > @section mp3 > > > > The MP3 muxer writes a raw MP3 stream with the following optional features: > > This is wrong: MKVToolNix switched to "# timestamp format v2" a long > time ago (we still write the old "# timecode format v2" header); > furthermore, MKVToolNix actually uses pts (which it reorders to be > ascending), not dts like our muxer. Furthermore MKVToolNix does not > force a 1ms precision on timestamps. Correct. I compared the output of the muxer and of mkvtoolnix extract timestamp_v2 and I'm not yet clear about the timestamp differences I'm observing (the muxer output maps with the timestamps, the mkvtoolnix timestamps differ by a few ms). But I think also mkvtoolnix use a 1ms timebase. Also, IIRC there is no generic way to reorder PTSs, so this might account for another difference which might be difficult to implement generically. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/lc3: Only allow AV_CODEC_ID_LC3 in muxer
On date Tuesday 2024-04-16 19:23:27 +0200, Andreas Rheinhardt wrote: > Also check for the number of streams and the AVCodecID generically > using FF_OFMT_FLAGs. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/lc3.c | 14 +++--- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/libavformat/lc3.c b/libavformat/lc3.c > index 93ce720af3..16c12a98d7 100644 > --- a/libavformat/lc3.c > +++ b/libavformat/lc3.c > @@ -186,16 +186,6 @@ const FFInputFormat ff_lc3_demuxer = { > > #if CONFIG_LC3_MUXER > > -static av_cold int lc3_muxer_init(AVFormatContext *s) > -{ > -if (s->nb_streams != 1) { > -av_log(s, AV_LOG_ERROR, "This muxer only supports a single > stream.\n"); > -return AVERROR(EINVAL); > -} > - > -return 0; > -} > - > static int lc3_write_header(AVFormatContext *s) > { > AVStream *st = s->streams[0]; > @@ -243,8 +233,10 @@ const FFOutputFormat ff_lc3_muxer = { > .p.extensions = "lc3", > .p.audio_codec = AV_CODEC_ID_LC3, > .p.video_codec = AV_CODEC_ID_NONE, > +.p.subtitle_codec = AV_CODEC_ID_NONE, > .p.flags = AVFMT_NOTIMESTAMPS, > -.init = lc3_muxer_init, > +.flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | > +FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, > .write_header = lc3_write_header, > .write_packet = lc3_write_packet, > }; LGTM, thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/lc3: Only allow AV_CODEC_ID_LC3 in muxer
Also check for the number of streams and the AVCodecID generically using FF_OFMT_FLAGs. Signed-off-by: Andreas Rheinhardt --- libavformat/lc3.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libavformat/lc3.c b/libavformat/lc3.c index 93ce720af3..16c12a98d7 100644 --- a/libavformat/lc3.c +++ b/libavformat/lc3.c @@ -186,16 +186,6 @@ const FFInputFormat ff_lc3_demuxer = { #if CONFIG_LC3_MUXER -static av_cold int lc3_muxer_init(AVFormatContext *s) -{ -if (s->nb_streams != 1) { -av_log(s, AV_LOG_ERROR, "This muxer only supports a single stream.\n"); -return AVERROR(EINVAL); -} - -return 0; -} - static int lc3_write_header(AVFormatContext *s) { AVStream *st = s->streams[0]; @@ -243,8 +233,10 @@ const FFOutputFormat ff_lc3_muxer = { .p.extensions = "lc3", .p.audio_codec = AV_CODEC_ID_LC3, .p.video_codec = AV_CODEC_ID_NONE, +.p.subtitle_codec = AV_CODEC_ID_NONE, .p.flags = AVFMT_NOTIMESTAMPS, -.init = lc3_muxer_init, +.flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | +FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, .write_header = lc3_write_header, .write_packet = lc3_write_packet, }; -- 2.40.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 8/6] doc/protocols: Fill in missing HTTP options
On date Tuesday 2024-04-16 14:55:55 +0100, Derek Buitenhuis wrote: > Signed-off-by: Derek Buitenhuis > --- > doc/protocols.texi | 30 ++ > 1 file changed, 30 insertions(+) > > diff --git a/doc/protocols.texi b/doc/protocols.texi > index 5ce1ddc8f4..60c6d831dd 100644 > --- a/doc/protocols.texi > +++ b/doc/protocols.texi > @@ -492,6 +492,10 @@ contains the last non-empty metadata packet sent by the > server. It should be > polled in regular intervals by applications interested in mid-stream metadata > updates. > > +@item metadata > +An exported dictionary containing Icecast metadata from the bitstream, if > present. > +Only useful with the C API. Probably best to use impersonal verbal mode: Set an exported ... > + > @item auth_type > > Set HTTP authentication type. No option for Digest, since this method > requires > @@ -519,6 +523,10 @@ Send an Expect: 100-continue header for POST. If set to > 1 it will send, if set > to 0 it won't, if set to -1 it will try to send if it is applicable. Default > value is -1. > > +@item location > +An exported dictionary containing the content location. Only useful with the > C > +API. Ditto > + > @item offset > Set initial byte offset. > > @@ -535,6 +543,9 @@ be given a Bad Request response. > When unset the HTTP method is not checked for now. This will be replaced by > autodetection in the future. > > +@item reconnect > +Reconnect automatically when disconnected before EOF is hit. > + > @item reconnect_at_eof > If set then eof is treated like an error and causes reconnection, this is > useful > for live / endless streams. > @@ -552,6 +563,14 @@ If set then even streamed/non seekable streams will be > reconnected on errors. > @item reconnect_delay_max > Sets the maximum delay in seconds after which to give up reconnecting > > +@item reconnect_max_retries > +Sets the maximum number of times to retry a connection. Default unset. Set the ... > + > +@item respect_retry_after > +If enabled, and a Retry-After header is encountered, its requested > reconnection > +delay will be honored, rather than using exponential backoff. Useful for 429 > and > +503 errors. Default enabled. > + > @item listen > If set to 1 enables experimental HTTP server. This can be used to send data > when > used as an output option, or read data from a client with HTTP POST when > used as > @@ -578,6 +597,17 @@ ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg > http://@var{server}:@var{p > wget --post-file=somefile.ogg http://@var{server}:@var{port} > @end example > > +@item resource > +The resource requested by a client, when the experimental HTTP server is in > use. Set the ... also this might be more explicit (what is a resource in this context?) > + > +@item reply_code > +The HTTP code returned to the client, when the experimental HTTP server is > in use. > + > +@item short_seek_size > +The threshold, in bytes, for when a readahead should be prefered over a seek > and > +new HTTP request. This is useful, for example, to make sure the same > connection > +is used for reading large video packets with small audio packets in between. Set the ... for consistency reasons [...] Should be good otherwise, thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 7/6] doc/protocols: Re-order HTTP options to match http.c order
On date Tuesday 2024-04-16 14:55:54 +0100, Derek Buitenhuis wrote: > This makes the list easier to maintain. > > Signed-off-by: Derek Buitenhuis > --- > doc/protocols.texi | 112 ++--- > 1 file changed, 56 insertions(+), 56 deletions(-) Sure, thank you. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffmpeg: Carry streamid as metadata key 'id'
tis 2024-04-16 klockan 09:52 -0300 skrev James Almer: > On Tue, Apr 16, 2024 at 9:38 AM Anton Khirnov > wrote: > > > Quoting Tomas Härdin (2024-04-12 11:40:47) > > > This idea could be extended to other fields not presently > > > considered to > > > be metadata, that would be handy to treat as such. > > > > > > I use the key "id" because ffprobe outputs id= for streamid. > > > Another > > > option could be to collect these types of metadata that go into > > > AVStream fields under a namespace like FFMPEG: or AVSTREAM: or > > > something, then delete all of them using AV_DICT_IGNORE_SUFFIX > > > near the > > > end of of_open() since they're for internal ffmpeg use. > > > > > > The FATE change is just because av_dict() changes the order of > > > things > > > when elements are deleted. > > > > > > /Tomas > > > > > > From 7799f1b2eb8ab02e58118565f3e889fbe0d568a7 Mon Sep 17 00:00:00 > > > 2001 > > > From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= > > > Date: Fri, 12 Apr 2024 10:34:12 +0200 > > > Subject: [PATCH] ffmpeg: Carry streamid as metadata key 'id' > > > > > > This allows using -map_metadata and -metadata to copy/set > > > streamids > > (PIDs). > > > > I dislike this patch, metadata is the wrong place for such > > information. Seems like a matter of taste to me, but maybe I'm missing something In the very common case where users want to copy PIDs from inputs to outputs, implementing -map_streamid seems a bit silly. Consider also the case where the user wants to copy codec and bitrate from some source stream, such as when filtering audio. It would be nice if such operations were handled by a common mechanism. Call it -map_params perhaps > > Can it be propagated within the InputStream? This is what my earlier patch ([PATCH] ffmpeg: Add -copystreamid) did, grabbing them from ist->st->id /Tomas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffmpeg: Carry streamid as metadata key 'id'
mån 2024-04-15 klockan 21:33 -0300 skrev James Almer: > On 4/15/2024 9:30 PM, Michael Niedermayer wrote: > > On Mon, Apr 15, 2024 at 10:35:44AM +0200, Tomas Härdin wrote: > > > lör 2024-04-13 klockan 01:25 +0200 skrev Michael Niedermayer: > > > > On Fri, Apr 12, 2024 at 11:40:47AM +0200, Tomas Härdin wrote: > > > > > This idea could be extended to other fields not presently > > > > > considered to > > > > > be metadata, that would be handy to treat as such. > > > > > > > > > > I use the key "id" because ffprobe outputs id= for streamid. > > > > > Another > > > > > option could be to collect these types of metadata that go > > > > > into > > > > > AVStream fields under a namespace like FFMPEG: or AVSTREAM: > > > > > or > > > > > something, then delete all of them using > > > > > AV_DICT_IGNORE_SUFFIX near > > > > > the > > > > > end of of_open() since they're for internal ffmpeg use. > > > > > > > > > > The FATE change is just because av_dict() changes the order > > > > > of > > > > > things > > > > > when elements are deleted. > > > > > > > > > > /Tomas > > > > > > > > > fftools/ffmpeg_demux.c | 5 +++ > > > > > fftools/ffmpeg_mux_init.c | 56 > > > > > ++-- > > > > > tests/ref/fate/matroska-stereo_mode | 6 +-- > > > > > 3 files changed, 49 insertions(+), 18 deletions(-) > > > > > cd526b2292b6d7e3fb5739a04cf17fbe5f207f16 0001-ffmpeg-Carry- > > > > > streamid-as-metadata-key-id.patch > > > > > From 7799f1b2eb8ab02e58118565f3e889fbe0d568a7 Mon Sep 17 > > > > > 00:00:00 > > > > > 2001 > > > > > From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= > > > > > Date: Fri, 12 Apr 2024 10:34:12 +0200 > > > > > Subject: [PATCH] ffmpeg: Carry streamid as metadata key 'id' > > > > > > > > > > This allows using -map_metadata and -metadata to copy/set > > > > > streamids > > > > > (PIDs). > > > > > --- > > > > > fftools/ffmpeg_demux.c | 5 +++ > > > > > fftools/ffmpeg_mux_init.c | 56 > > > > > + > > > > > > > > > > tests/ref/fate/matroska-stereo_mode | 6 ++-- > > > > > 3 files changed, 49 insertions(+), 18 deletions(-) > > > > > > > > breaks: > > > > > > > > ./ffmpeg -i ~/videos/mm-short.mpg -vstats_file /tmp/vstats - > > > > bitexact > > > > -map 0:1 -map 0:1 -map 0:2 -threads 6 -vcodec libx264 -vcodec > > > > libx264 > > > > -pass 1 -b:v:0 300k -b:v:1 900k -passlogfile:v:1 /tmp/video2 - > > > > passlogfile:v:0 /tmp/video1 -t 1 -y -ab 128k /tmp/x.ts > > > > > > > > [mpegts @ 0x558d5e3b2140] Duplicate stream id 480 > > > > > > It's hardly strange if you map the same stream to the output > > > twice that > > > you get duplicate streamids > > > > ok but asking for a stream to be mapped twice is a valid case. > > Ideally FFmpeg should not fail, it should resolve all parameters > > within what is valid. > > It could fail if the user explcicitly asks for invalid parameters > > ... > > mpegts muxer could change the duplicate id for a free one. Afaik the > field is documented as being modifiable by muxers. It could also do > it > internally. That sounds like business logic that belongs further up than in a muxer. That way more muxers that depend on st->id benefit from it. ffmpeg_mux_init.c could warn about it and make up unique id's. Default values could be passed upward via AVOptions /Tomas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 4/6 v2] avformat/http: Add support for Retry-After header
On 4/15/2024 6:33 PM, Stefano Sabatini wrote: > missing doc/protocols.texi update Sent patch 7 and 8 to address this. - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 8/6] doc/protocols: Fill in missing HTTP options
Signed-off-by: Derek Buitenhuis --- doc/protocols.texi | 30 ++ 1 file changed, 30 insertions(+) diff --git a/doc/protocols.texi b/doc/protocols.texi index 5ce1ddc8f4..60c6d831dd 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -492,6 +492,10 @@ contains the last non-empty metadata packet sent by the server. It should be polled in regular intervals by applications interested in mid-stream metadata updates. +@item metadata +An exported dictionary containing Icecast metadata from the bitstream, if present. +Only useful with the C API. + @item auth_type Set HTTP authentication type. No option for Digest, since this method requires @@ -519,6 +523,10 @@ Send an Expect: 100-continue header for POST. If set to 1 it will send, if set to 0 it won't, if set to -1 it will try to send if it is applicable. Default value is -1. +@item location +An exported dictionary containing the content location. Only useful with the C +API. + @item offset Set initial byte offset. @@ -535,6 +543,9 @@ be given a Bad Request response. When unset the HTTP method is not checked for now. This will be replaced by autodetection in the future. +@item reconnect +Reconnect automatically when disconnected before EOF is hit. + @item reconnect_at_eof If set then eof is treated like an error and causes reconnection, this is useful for live / endless streams. @@ -552,6 +563,14 @@ If set then even streamed/non seekable streams will be reconnected on errors. @item reconnect_delay_max Sets the maximum delay in seconds after which to give up reconnecting +@item reconnect_max_retries +Sets the maximum number of times to retry a connection. Default unset. + +@item respect_retry_after +If enabled, and a Retry-After header is encountered, its requested reconnection +delay will be honored, rather than using exponential backoff. Useful for 429 and +503 errors. Default enabled. + @item listen If set to 1 enables experimental HTTP server. This can be used to send data when used as an output option, or read data from a client with HTTP POST when used as @@ -578,6 +597,17 @@ ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://@var{server}:@var{p wget --post-file=somefile.ogg http://@var{server}:@var{port} @end example +@item resource +The resource requested by a client, when the experimental HTTP server is in use. + +@item reply_code +The HTTP code returned to the client, when the experimental HTTP server is in use. + +@item short_seek_size +The threshold, in bytes, for when a readahead should be prefered over a seek and +new HTTP request. This is useful, for example, to make sure the same connection +is used for reading large video packets with small audio packets in between. + @end table @subsection HTTP Cookies -- 2.43.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 7/6] doc/protocols: Re-order HTTP options to match http.c order
This makes the list easier to maintain. Signed-off-by: Derek Buitenhuis --- doc/protocols.texi | 112 ++--- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index f54600b846..5ce1ddc8f4 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -442,9 +442,6 @@ value is -1. @item chunked_post If set to 1 use chunked Transfer-Encoding for posts, default is 1. -@item content_type -Set a specific content type for the POST messages or for listen mode. - @item http_proxy set HTTP proxy to tunnel through e.g. http://example.com:1234 @@ -452,35 +449,21 @@ set HTTP proxy to tunnel through e.g. http://example.com:1234 Set custom HTTP headers, can override built in default headers. The value must be a string encoding the headers. -@item multiple_requests -Use persistent connections if set to 1, default is 0. - -@item post_data -Set custom HTTP post data. - -@item referer -Set the Referer header. Include 'Referer: URL' header in HTTP request. +@item content_type +Set a specific content type for the POST messages or for listen mode. @item user_agent Override the User-Agent header. If not specified the protocol will use a string describing the libavformat build. ("Lavf/") -@item reconnect_at_eof -If set then eof is treated like an error and causes reconnection, this is useful -for live / endless streams. - -@item reconnect_streamed -If set then even streamed/non seekable streams will be reconnected on errors. - -@item reconnect_on_network_error -Reconnect automatically in case of TCP/TLS errors during connect. +@item referer +Set the Referer header. Include 'Referer: URL' header in HTTP request. -@item reconnect_on_http_error -A comma separated list of HTTP status codes to reconnect on. The list can -include specific status codes (e.g. '503') or the strings '4xx' / '5xx'. +@item multiple_requests +Use persistent connections if set to 1, default is 0. -@item reconnect_delay_max -Sets the maximum delay in seconds after which to give up reconnecting +@item post_data +Set custom HTTP post data. @item mime_type Export the MIME type. @@ -488,6 +471,11 @@ Export the MIME type. @item http_version Exports the HTTP response version number. Usually "1.0" or "1.1". +@item cookies +Set the cookies to be sent in future requests. The format of each cookie is the +same as the value of a Set-Cookie HTTP response field. Multiple cookies can be +delimited by a newline character. + @item icy If set to 1 request ICY (SHOUTcast) metadata from the server. If the server supports this, the metadata has to be retrieved by the application by reading @@ -504,10 +492,32 @@ contains the last non-empty metadata packet sent by the server. It should be polled in regular intervals by applications interested in mid-stream metadata updates. -@item cookies -Set the cookies to be sent in future requests. The format of each cookie is the -same as the value of a Set-Cookie HTTP response field. Multiple cookies can be -delimited by a newline character. +@item auth_type + +Set HTTP authentication type. No option for Digest, since this method requires +getting nonce parameters from the server first and can't be used straight away like +Basic. + +@table @option +@item none +Choose the HTTP authentication type automatically. This is the default. +@item basic + +Choose the HTTP basic authentication. + +Basic authentication sends a Base64-encoded string that contains a user name and password +for the client. Base64 is not a form of encryption and should be considered the same as +sending the user name and password in clear text (Base64 is a reversible encoding). +If a resource needs to be protected, strongly consider using an authentication scheme +other than basic authentication. HTTPS/TLS should be used with basic authentication. +Without these additional security enhancements, basic authentication should not be used +to protect sensitive or valuable information. +@end table + +@item send_expect_100 +Send an Expect: 100-continue header for POST. If set to 1 it will send, if set +to 0 it won't, if set to -1 it will try to send if it is applicable. Default +value is -1. @item offset Set initial byte offset. @@ -525,6 +535,23 @@ be given a Bad Request response. When unset the HTTP method is not checked for now. This will be replaced by autodetection in the future. +@item reconnect_at_eof +If set then eof is treated like an error and causes reconnection, this is useful +for live / endless streams. + +@item reconnect_on_network_error +Reconnect automatically in case of TCP/TLS errors during connect. + +@item reconnect_on_http_error +A comma separated list of HTTP status codes to reconnect on. The list can +include specific status codes (e.g. '503') or the strings '4xx' / '5xx'. + +@item reconnect_streamed +If set then even streamed/non seekable streams will be reconnected on errors. + +@item reconnect_delay_max
Re: [FFmpeg-devel] [PATCH] ffmpeg: Carry streamid as metadata key 'id'
On Tue, Apr 16, 2024 at 9:38 AM Anton Khirnov wrote: > Quoting Tomas Härdin (2024-04-12 11:40:47) > > This idea could be extended to other fields not presently considered to > > be metadata, that would be handy to treat as such. > > > > I use the key "id" because ffprobe outputs id= for streamid. Another > > option could be to collect these types of metadata that go into > > AVStream fields under a namespace like FFMPEG: or AVSTREAM: or > > something, then delete all of them using AV_DICT_IGNORE_SUFFIX near the > > end of of_open() since they're for internal ffmpeg use. > > > > The FATE change is just because av_dict() changes the order of things > > when elements are deleted. > > > > /Tomas > > > > From 7799f1b2eb8ab02e58118565f3e889fbe0d568a7 Mon Sep 17 00:00:00 2001 > > From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= > > Date: Fri, 12 Apr 2024 10:34:12 +0200 > > Subject: [PATCH] ffmpeg: Carry streamid as metadata key 'id' > > > > This allows using -map_metadata and -metadata to copy/set streamids > (PIDs). > > I dislike this patch, metadata is the wrong place for such information. > Can it be propagated within the InputStream? > > -- > Anton Khirnov > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] cannot compile the ffmpeg latest on local
On 16/04/2024 11:09, B-2014 Ariyan Kashyap wrote: > Getting this err while running ./configure --enable-shared > > ./configure --enable-shared > nasm/yasm not found or too old. Use --disable-x86asm for a crippled build. > > If you think configure made a mistake, make sure you are using the latest > version from Git. If the latest version fails, report the problem to the > ffmpeg-u...@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat. > Include the log file "ffbuild/config.log" produced by configure as this > will help > solve the problem. Please do not direct your usage questions to this, the ffmpeg-devel, mailing list. Instead, as this message says, use the #ffmpeg channel on liberachat. -- Frank ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffmpeg: Carry streamid as metadata key 'id'
Quoting Tomas Härdin (2024-04-12 11:40:47) > This idea could be extended to other fields not presently considered to > be metadata, that would be handy to treat as such. > > I use the key "id" because ffprobe outputs id= for streamid. Another > option could be to collect these types of metadata that go into > AVStream fields under a namespace like FFMPEG: or AVSTREAM: or > something, then delete all of them using AV_DICT_IGNORE_SUFFIX near the > end of of_open() since they're for internal ffmpeg use. > > The FATE change is just because av_dict() changes the order of things > when elements are deleted. > > /Tomas > > From 7799f1b2eb8ab02e58118565f3e889fbe0d568a7 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= > Date: Fri, 12 Apr 2024 10:34:12 +0200 > Subject: [PATCH] ffmpeg: Carry streamid as metadata key 'id' > > This allows using -map_metadata and -metadata to copy/set streamids (PIDs). I dislike this patch, metadata is the wrong place for such information. -- Anton Khirnov ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 4/6] doc/muxers: add mkvtimestamp_v2
Stefano Sabatini: > --- > doc/muxers.texi | 8 > 1 file changed, 8 insertions(+) > > diff --git a/doc/muxers.texi b/doc/muxers.texi > index f94513527d..490d5557bf 100644 > --- a/doc/muxers.texi > +++ b/doc/muxers.texi > @@ -2933,6 +2933,14 @@ MicroDVD subtitle format muxer. > > This muxer accepts a single @samp{microdvd} subtitles stream. > > +@section mkvtimestamp_v2 > +mkvtoolnix v2 timecode format muxer. > + > +Write the PTS rawvideo frame to the output, as supported by the > +@command{mkvextact} tool from the @command{mkvtoolnix} suite. > + > +This muxer accepts a single @samp{rawvideo} stream. > + > @section mp3 > > The MP3 muxer writes a raw MP3 stream with the following optional features: This is wrong: MKVToolNix switched to "# timestamp format v2" a long time ago (we still write the old "# timecode format v2" header); furthermore, MKVToolNix actually uses pts (which it reorders to be ascending), not dts like our muxer. Furthermore MKVToolNix does not force a 1ms precision on timestamps. - Andreas PS: mkvextract, not mkvextact. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] not able to install dependencies for ffmpeg using msys2 pacman
Not able to install these packages : 1. pacman -S mingw-w64-x86_64-automake 2. pacman -S mingw-w64-x86_64-autoconf 3. pacman -S mingw-w64-x86_64-theora err : pacman -S mingw-w64-x86_64-theora ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] cannot compile the ffmpeg latest on local
Getting this err while running ./configure --enable-shared ./configure --enable-shared nasm/yasm not found or too old. Use --disable-x86asm for a crippled build. If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-u...@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 6/6] doc/muxers: add mmf
--- doc/muxers.texi | 9 + 1 file changed, 9 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index 490d5557bf..43c4865292 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -2941,6 +2941,15 @@ Write the PTS rawvideo frame to the output, as supported by the This muxer accepts a single @samp{rawvideo} stream. +@section mmf +Synthetic music Mobile Application Format (SMAF) format muxer. + +SMAF is a music data format specified by Yamaha for portable +electronic devices, such as cell phones and PDAs. It is common as +ringtones for mobile phones with one of five sound chips. + +This muxer accepts a single @samp{adpcm_yamaha} audio stream. + @section mp3 The MP3 muxer writes a raw MP3 stream with the following optional features: -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 5/6] lavf/mkvtimestamp_v2: use name in place of description in long name
--- libavformat/mkvtimestamp_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mkvtimestamp_v2.c b/libavformat/mkvtimestamp_v2.c index dde431ab7d..1eb2daf10a 100644 --- a/libavformat/mkvtimestamp_v2.c +++ b/libavformat/mkvtimestamp_v2.c @@ -43,7 +43,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) const FFOutputFormat ff_mkvtimestamp_v2_muxer = { .p.name= "mkvtimestamp_v2", -.p.long_name = NULL_IF_CONFIG_SMALL("extract pts as timecode v2 format, as defined by mkvtoolnix"), +.p.long_name = NULL_IF_CONFIG_SMALL("mkvtoolnix v2 timecode format"), .p.audio_codec = AV_CODEC_ID_NONE, .p.video_codec = AV_CODEC_ID_RAWVIDEO, .write_header = write_header, -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 4/6] doc/muxers: add mkvtimestamp_v2
--- doc/muxers.texi | 8 1 file changed, 8 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index f94513527d..490d5557bf 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -2933,6 +2933,14 @@ MicroDVD subtitle format muxer. This muxer accepts a single @samp{microdvd} subtitles stream. +@section mkvtimestamp_v2 +mkvtoolnix v2 timecode format muxer. + +Write the PTS rawvideo frame to the output, as supported by the +@command{mkvextact} tool from the @command{mkvtoolnix} suite. + +This muxer accepts a single @samp{rawvideo} stream. + @section mp3 The MP3 muxer writes a raw MP3 stream with the following optional features: -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/6] doc/muxers/matroskaenc: add missing options, apply misc style fixes
--- doc/muxers.texi | 44 +--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index a77472ef1b..a162ab4075 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -2846,8 +2846,44 @@ the initially reserved space turns out to be insufficient. This option is ignored if the output is unseekable. +@item cluster_size_limit @var{size} +Store at most the provided amount of bytes in a cluster. + +If not specified, the limit is set automatically to a sensible +hardcoded fixed value. + +@item cluster_time_limit @var{duration} +Store at most the provided number of milliseconds in a cluster. + +If not specified, the limit is set automatically to a sensible +hardcoded fixed value. + +@item dash @var{bool} +Create a WebM file conforming to WebM DASH specification. By default +it is set to @code{false}. + +@item dash_track_number @var{index} +Track number for the DASH stream. By default it is set to @code{1}. + +@item live @var{bool} +Write files assuming it is a live stream. By default it is set to +@code{false}. + +@item allow_raw_vfw @var{bool} +Allow raw VFW mode. By default it is set to @code{false}. + +@item flipped_raw_rgb @var{bool} +If set to @code{true}, store positive height for raw RGB bitmaps, which indicates +bitmap is stored bottom-up. Note that this option does not flip the bitmap +which has to be done manually beforehand, e.g. by using the @samp{vflip} filter. +Default is @code{false} and indicates bitmap is stored top down. + +@item write_crc32 @var{bool} +Write a CRC32 element inside every Level 1 element. By default it is +set to @code{true}. + @item default_mode @var{mode} -This option controls how the FlagDefault of the output tracks will be set. +Control how the FlagDefault of the output tracks will be set. It influences which tracks players should play by default. The default mode is @samp{passthrough}. @table @samp @@ -2865,12 +2901,6 @@ disposition default exists, no subtitle track will be marked as default. In this mode the FlagDefault is set if and only if the AV_DISPOSITION_DEFAULT flag is set in the disposition of the corresponding stream. @end table - -@item flipped_raw_rgb @var{bool} -If set to true, store positive height for raw RGB bitmaps, which indicates -bitmap is stored bottom-up. Note that this option does not flip the bitmap -which has to be done manually beforehand, e.g. by using the vflip filter. -Default is @var{false} and indicates bitmap is stored top down. @end table @anchor{md5} -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] Apply misc doc/muxers fixes and extensions
Apply misc doc/muxers fixes and extensions. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 3/6] doc/muxers: add microdvd
--- doc/muxers.texi | 5 + 1 file changed, 5 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index 710fc27eec..f94513527d 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -2928,6 +2928,11 @@ ffmpeg -i INPUT -f md5 - @end example @end itemize +@section microdvd +MicroDVD subtitle format muxer. + +This muxer accepts a single @samp{microdvd} subtitles stream. + @section mp3 The MP3 muxer writes a raw MP3 stream with the following optional features: -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/6] doc/muxers/md5: apply misc consistency fixes
--- doc/muxers.texi | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index a162ab4075..710fc27eec 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -2905,26 +2905,28 @@ flag is set in the disposition of the corresponding stream. @anchor{md5} @section md5 - MD5 testing format. This is a variant of the @ref{hash} muxer. Unlike that muxer, it defaults to using the MD5 hash function. -@subsection Examples +See also the @ref{hash} and @ref{framemd5} muxers. +@subsection Examples +@itemize +@item To compute the MD5 hash of the input converted to raw audio and video, and store it in the file @file{out.md5}: @example ffmpeg -i INPUT -f md5 out.md5 @end example -You can print the MD5 to stdout with the command: +@item +To print the MD5 to stdout: @example ffmpeg -i INPUT -f md5 - @end example - -See also the @ref{hash} and @ref{framemd5} muxers. +@end itemize @section mp3 -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avutil/opt: add AV_OPT_FLAG_FORCE_CONST
On 16/04/2024 02:07, Michael Niedermayer wrote: On Sun, Apr 14, 2024 at 10:35:57PM +0200, Timo Rothenpieler wrote: On 14.04.2024 22:30, Marton Balint wrote: On Sun, 14 Apr 2024, Timo Rothenpieler wrote: --- doc/APIchanges | 3 +++ libavutil/opt.c | 14 ++ libavutil/opt.h | 5 + libavutil/version.h | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) Where do you intend to use this flag? So some justification or description of your plans is missing from the commit message. Some options in nvenc could be greatly simplified with it, where right now there's multiple if/switch-trees in the code, just to weed out invalid values. This doesnt feel right. The code would need to validate the actual value the same way it checks min/max at least avoptions allows the user to obtain a parameters address and set it directly as well as set it without any AVOption iam still not sure thats a good idea. Why are the values not in a continous sequence of integers that can be checked with min/max ? Cause they're simply not, gotta ask Nvidia for details. They started having enums with holes in them all over the place. This flag obviously cannot be used for pre-existing options where users got accustomed to using various values. And there also needs to be validation of valid values nevertheless, due to the possibility of API clients setting the values directly. But this behaviour of only accepting the named constants from users, and no arbitrary values, is exactly what I'd like to achieve. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".