From: VannHarl via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: VannHarl <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PR] fftools/ffprobe: add codec_attr for streams (PR #21412)
Date: Thu, 08 Jan 2026 14:23:48 -0000
Message-ID: <176788222913.25.16535769646811820411@4457048688e7> (raw)
PR #21412 opened by VannHarl
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21412
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21412.patch
Adds the "codec attribute" string to output for stremas.
It is the same codec attributes written into HLS/DASH manifests.
Use: ffprobe -show_streams <input>
or: ffprobe -show_entries stream=codec_attr <input>
>From 7646ea94e76973cd9244418dbf18adf652425d89 Mon Sep 17 00:00:00 2001
From: Vann Harl <vannharl@arcor.de>
Date: Thu, 8 Jan 2026 15:22:10 +0100
Subject: [PATCH] fftools/ffprobe: add codec_attr for streams
Adds the "codec attribute" string to output for stremas.
It is the same codec attributes written into HLS/DASH manifests.
Use: ffprobe -show_streams <input>
or: ffprobe -show_entries stream=codec_attr <input>
---
fftools/Makefile | 2 ++
fftools/ffprobe.c | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/fftools/Makefile b/fftools/Makefile
index 01b16fa8f4..b20a586e2c 100644
--- a/fftools/Makefile
+++ b/fftools/Makefile
@@ -50,6 +50,8 @@ OBJS-ffprobe += \
fftools/textformat/tw_avio.o \
fftools/textformat/tw_buffer.o \
fftools/textformat/tw_stdout.o \
+ libavformat/codecstring.o \
+ libavformat/nal.o \
OBJS-ffmpeg += $(COMPAT_OBJS:%=compat/%)
OBJS-ffplay += fftools/ffplay_renderer.o
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 67111bc31f..f3439ad69c 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -31,6 +31,7 @@
#include "libavformat/avformat.h"
#include "libavformat/version.h"
+#include "libavformat/internal.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/version.h"
#include "libavutil/ambient_viewing_environment.h"
@@ -1796,6 +1797,13 @@ static int show_stream(AVTextFormatContext *tfc, AVFormatContext *fmt_ctx, int s
}
}
+ av_bprint_clear(&pbuf);
+ if (ff_make_codec_str(fmt_ctx, stream->codecpar, &stream->avg_frame_rate, &pbuf) == 0) {
+ print_str("codec_attr", pbuf.str);
+ } else {
+ print_str_opt("codec_attr", "unknown");
+ }
+
if (!do_bitexact && (profile = avcodec_profile_name(par->codec_id, par->profile)))
print_str("profile", profile);
else {
--
2.49.1
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
reply other threads:[~2026-01-08 14:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=176788222913.25.16535769646811820411@4457048688e7 \
--to=ffmpeg-devel@ffmpeg.org \
--cc=code@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git