From: Zhao Zhili <quinkblack@foxmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [RFC]x264 avcc and related issue Date: Wed, 6 Mar 2024 02:13:13 +0800 Message-ID: <tencent_AF812634E33EDF57A39D36E0AA5A34349D09@qq.com> (raw) In-Reply-To: <AS8P250MB0744C0EB681E0A641B5E0AA48F222@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> > 在 2024年3月6日,上午1:58,Andreas Rheinhardt <andreas.rheinhardt@outlook.com> 写道: > > Zhao Zhili: >> 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? >> > > If we support a new packetization (even if it only affects extradata), > we would need to support it everywhere -- decoders and muxers, too. I > don't see an advantage or a need for a new packetization, as AFAIK all > containers with ISOBMFF packetization also use the ISOMBFF configuration > box. So I am against 1. and 2. > Implementing this inside lavc seems like the best approach; I don't know > whether a common helper for this will be useful: While these lists > certainly have a common pattern, there are subtle changes between them > which will probably make a common helper unsuitable. You mean separated implementations just inside libx264/libx265? > > - 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 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".
next prev parent reply other threads:[~2024-03-05 18:13 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-05 17:34 Zhao Zhili 2024-03-05 17:58 ` Andreas Rheinhardt 2024-03-05 18:13 ` Zhao Zhili [this message] 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_AF812634E33EDF57A39D36E0AA5A34349D09@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