diff options
author | James Almer <jamrial@gmail.com> | 2021-08-27 16:34:06 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-09-01 19:55:30 -0300 |
commit | 8a6beccf0d8f2e6515b0ddbf5c792c2bf799500b (patch) | |
tree | d92421ef5f0b42762d6e902f09538755c14db352 /libavformat | |
parent | 2818b143929d86f6b67695b09bc7483da5cef434 (diff) | |
download | ffmpeg-8a6beccf0d8f2e6515b0ddbf5c792c2bf799500b.tar.gz |
avformat: add an AV1 Low overhead bitstream format muxer
Suggested-by: BBB
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/Makefile | 1 | ||||
-rw-r--r-- | libavformat/allformats.c | 1 | ||||
-rw-r--r-- | libavformat/rawenc.c | 20 | ||||
-rw-r--r-- | libavformat/version.h | 4 |
4 files changed, 24 insertions, 2 deletions
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, \ |