[FFmpeg-cvslog] avformat: add an AV1 Low overhead bitstream format muxer
James Almer
git at videolan.org
Thu Sep 2 18:30:25 EEST 2021
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Aug 27 16:34:06 2021 -0300| [8a6beccf0d8f2e6515b0ddbf5c792c2bf799500b] | committer: James Almer
avformat: add an AV1 Low overhead bitstream format muxer
Suggested-by: BBB
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8a6beccf0d8f2e6515b0ddbf5c792c2bf799500b
---
Changelog | 1 +
configure | 1 +
doc/general_contents.texi | 1 +
libavformat/Makefile | 1 +
libavformat/allformats.c | 1 +
libavformat/rawenc.c | 20 ++++++++++++++++++++
libavformat/version.h | 4 ++--
7 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/Changelog b/Changelog
index 933ef9e080..5b58401183 100644
--- a/Changelog
+++ b/Changelog
@@ -15,6 +15,7 @@ version <next>:
- adecorrelate audio filter
- atilt audio filter
- grayworld video filter
+- AV1 Low overhead bitstream format muxer
version 4.4:
diff --git a/configure b/configure
index 9249254b70..af410a9d11 100755
--- a/configure
+++ b/configure
@@ -3388,6 +3388,7 @@ mxf_opatom_muxer_select="mxf_muxer"
nut_muxer_select="riffenc"
nuv_demuxer_select="riffdec"
obu_demuxer_select="av1_frame_merge_bsf av1_parser"
+obu_muxer_select="av1_metadata_bsf"
oga_muxer_select="ogg_muxer"
ogg_demuxer_select="dirac_parse"
ogv_muxer_select="ogg_muxer"
diff --git a/doc/general_contents.texi b/doc/general_contents.texi
index edc047e539..ce5fd4639d 100644
--- a/doc/general_contents.texi
+++ b/doc/general_contents.texi
@@ -599,6 +599,7 @@ library:
@item raw NULL @tab X @tab
@item raw video @tab X @tab X
@item raw id RoQ @tab X @tab
+ at item raw OBU @tab X @tab X
@item raw SBC @tab X @tab X
@item raw Shorten @tab @tab X
@item raw TAK @tab @tab X
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 7e0f587b41..f7e47563da 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -379,6 +379,7 @@ OBJS-$(CONFIG_NUT_MUXER) += nutenc.o nut.o
OBJS-$(CONFIG_NUV_DEMUXER) += nuv.o
OBJS-$(CONFIG_AV1_DEMUXER) += av1dec.o
OBJS-$(CONFIG_OBU_DEMUXER) += av1dec.o
+OBJS-$(CONFIG_OBU_MUXER) += rawenc.o
OBJS-$(CONFIG_OGG_DEMUXER) += oggdec.o \
oggparsecelt.o \
oggparsedirac.o \
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 111ca3cbf0..5471f7c16f 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -305,6 +305,7 @@ extern const AVInputFormat ff_nut_demuxer;
extern const AVOutputFormat ff_nut_muxer;
extern const AVInputFormat ff_nuv_demuxer;
extern const AVInputFormat ff_obu_demuxer;
+extern const AVOutputFormat ff_obu_muxer;
extern const AVOutputFormat ff_oga_muxer;
extern const AVInputFormat ff_ogg_demuxer;
extern const AVOutputFormat ff_ogg_muxer;
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index 088b62f369..ad29e71099 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -453,6 +453,26 @@ const AVOutputFormat ff_mpeg2video_muxer = {
};
#endif
+#if CONFIG_OBU_MUXER
+static int obu_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt)
+{
+ AVStream *st = s->streams[0];
+ return ff_stream_add_bitstream_filter(st, "av1_metadata", "td=insert");
+}
+
+const AVOutputFormat ff_obu_muxer = {
+ .name = "obu",
+ .long_name = NULL_IF_CONFIG_SMALL("AV1 low overhead OBU"),
+ .extensions = "obu",
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_AV1,
+ .init = force_one_stream,
+ .write_packet = ff_raw_write_packet,
+ .check_bitstream = obu_check_bitstream,
+ .flags = AVFMT_NOTIMESTAMPS,
+};
+#endif
+
#if CONFIG_RAWVIDEO_MUXER
const AVOutputFormat ff_rawvideo_muxer = {
.name = "rawvideo",
diff --git a/libavformat/version.h b/libavformat/version.h
index fc8170a3b1..13df244d97 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -32,8 +32,8 @@
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 59
-#define LIBAVFORMAT_VERSION_MINOR 4
-#define LIBAVFORMAT_VERSION_MICRO 102
+#define LIBAVFORMAT_VERSION_MINOR 5
+#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
More information about the ffmpeg-cvslog
mailing list