Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Zhao Zhili <quinkblack@foxmail.com>
To: 'FFmpeg development discussions and patches' <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] [RFC]x264 avcc and related issue
Date: Wed, 6 Mar 2024 01:34:12 +0800
Message-ID: <tencent_BC9ADB40559A949F4DAB7C4E5270222D4A08@qq.com> (raw)

There are multiple encoders which can output bitstream in avcc/hvcc format,
e.g, x264, x265 and videotoolbox. This can improve performance depends on
container format (no more ff_avc_parse_nal_units_buf).

The problem is these encoders output parameter sets directly, not contained
in a complete AVC/HEVC configuration box. But muxers only expect 
extradata in
annexb format, or a complete AVC/HEVC configuration box, not support such
length+sps+length+pps format. The following command will output a broken 
file:

./ffmpeg -i input.mp4 -an -c:v libx264 -x264-params annexb=0 broken.mp4

I want to fix this issue and improve the performance at the same time.

There are multiple options that I don't know how to make a choice.

1. At the muxer level? It's easy and ugly. And there are corner case
like 00 00 01 xx can be start code of annexb and size of avcc at the
same time.

2. A new bsf? It looks less useful outside of libavcodec. And encoder
can't enable a bsf automatically.

3. A specific helper like h26x_vcc.h? Can it be more general?

Any more suggestions?

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

             reply	other threads:[~2024-03-05 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05 17:34 Zhao Zhili [this message]
2024-03-05 17:58 ` Andreas Rheinhardt
2024-03-05 18:13   ` Zhao Zhili
2024-03-05 18:15     ` Andreas Rheinhardt

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=tencent_BC9ADB40559A949F4DAB7C4E5270222D4A08@qq.com \
    --to=quinkblack@foxmail.com \
    --cc=ffmpeg-devel@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