Checked into GIT to prepare for future upgrade to FFmpeg 9.0.x:

(1) modded fileac3.C, fileffmpeg.C, ffmpeg.C in preparation for ffmpeg 9.0.2 which finally deleted the deprecated access to #->sample_fmts, pix_fmts, samplerates, and frame_rate; replaced with avcodec_get_supported_config
VIP these changes work at FFmpeg 8.1 so are in effect now - please report any strange issues.
(2) using the 12 ffmpeg 9.0.2 patches as provided by Andrew, checked in as our standard methodology for testing a new version of ffmpeg as ffmpeg.git.patch#
(3) a fix in 0001-guicastBC_DisplayInfo::gl_fb_config() for one particular problem which frees gl fb cgs on destruction instead
(4) removed old versions of thirdparty libraries

On Sat, Sep 26, 2026 at 6:25 AM Andrew Randrianasulu <randrianasulu@gmail.com> wrote:
So, with this set of patches (+ those 3 by Phyllis) and ffmpeg 9.0.2
edited into configure.ac build compiles BUT I think I am having
problems with vaapi encoding.

bash-5.1$ bin/cin
Cinelerra Infinity - built: Sep 26 2026 03:34:11
git://git.cinelerra-gg.org/goodguy/cinelerra.git
(c) 2006-2019 Heroine Virtual Ltd. by Adam Williams
2007-2020 mods for Cinelerra-GG by W.P.Morrow aka goodguy
2003-2017 mods for Cinelerra-CV by CinelerraCV team
2015-2026 mods for Cinelerra-GG by Cinelerra-GG team

Libav version: Lavc62.28.100

Cinelerra is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. There is absolutely no warranty for Cinelerra.

BC_DisplayInfo::gl_fb_config failed
RenderFarmClient::main_loop: client started
[AVHWFramesContext @ 0xafddc0c0] Unsupported format: vaapi.
Failed to initialize HW frame context.
  err: Invalid argument
[h264_vaapi @ 0xa7ddaf00] A hardware frames reference is required to
associate the encoding device.
FFMPEG::open_encoder  err: Invalid argument
int FFMPEG::open_encoder(const char*, const char*):
open failed h264_vaapi:/dev/shm/dnxhd.mkv
Render::render_single: Session finished.
Render::render_single: Session finished.
** rendered 1 frames in 2.310 secs, 0.433 fps
FFMPEG::open_decoder: some stream times estimated: /dev/shm/dnxhd.mkv
FFMPEG::open_decoder: some stream times estimated: /dev/shm/dnxhd.mkv
FFMPEG::open_decoder: some stream times estimated: /dev/shm/dnxhd.mkv
FFMPEG::open_decoder: some stream times estimated: /dev/shm/dnxhd.mkv
Total excess of backups: -50
Session time: 0:02:09
Cpu time: user: 0:00:48.828 sys: 0:00:03.530


Hopefully something simple to fix.


On Fri, Sep 25, 2026 at 8:54 AM Andrew Randrianasulu
<randrianasulu@gmail.com> wrote:
>
>
>
> пт, 25 сент. 2026 г., 04:46 Phyllis Smith <phylsmith2017@gmail.com>:
>>
>> Andrew,
>> Attached are the "mechanical" patches for ffmpeg 9.0.1 and with these I have successfully built Cinelerra. I still have not learned how to code in C/C++ so I referenced other user's patches - mechanically like you suggested.
>> 1) Could you verify?
>
>
> I think I'll add some conditional #ifdefs around so we still can  compile cingg with older external ffmpeg ...
>
> I think you accidently removed one conditional if  test in ffmpeg patches but need to verify (I only wake up, downloaded patches and looked at them in mcedit  on relatively narrow Termux window)
>
>>
>> 2) fileac3.C, fileffmpeg.C, and ffmpeg.C all compiled without error with these patches but how do I test?
>
>
> As always -   make sure you set FFMpeg first as probe order, load few a/v files, playback them, single-step them, randomly seek to random points  in timeline, add filter or two (ffmpeg and native, audio and/or video), play forward/backward/at random speed/singlestep with filters on, render tracks to few output formats and check those outputs load back into cingg  and play/seek correctly in external players.
>
>
>> If verified, I can check them in at ffmpeg 8.1 for early usage.  I will update the ffmpeg.git.patch# to reflect 9.0.1 in the next couple of days too.  Thanks, Phyllis
>
>
> I wish you good luck there - I think mpegts muxer in ffmpeg was updated, so one of our biggest patches for bluray muxing  may not apply cleanly anymore ..
>
>>
>> On Sat, Sep 12, 2026 at 2:55 PM Andrew Randrianasulu <randrianasulu@gmail.com> wrote:
>>>
>>>
>>>
>>> сб, 12 сент. 2026 г., 22:46 Phyllis Smith <phylsmith2017@gmail.com>:
>>>>
>>>> Oh no. Not sure why they consider this to be an improvement.
>>>
>>>
>>> Change itself fairly mechanical just it looks like we will need to apply it to 6-7 places
>>>
>>> grep sample_fmts -r cinelerra/*.C
>>>
>>>
>>> ~/cinelerra/cinelerra-5.1 $ grep sample_fmts -r cinelerra/*.C
>>> cinelerra/ffmpeg.C:             const AVSampleFormat *sample_fmts, AVSampleFormat src_fmt)
>>> cinelerra/ffmpeg.C:     for( int i=0; sample_fmts[i] >= 0; ++i ) {
>>> cinelerra/ffmpeg.C:             AVSampleFormat sample_fmt = sample_fmts[i];
>>> cinelerra/ffmpeg.C:             if( av_codec && av_codec->sample_fmts )
>>> cinelerra/ffmpeg.C:                     cin_fmt = find_best_sample_fmt_of_list(av_codec->sample_fmts, AV_SAMPLE_FMT_FLT);
>>> cinelerra/ffmpeg.C:                             sample_fmt = codec->sample_fmts ? codec->sample_fmts[0] : AV_SAMPLE_FMT_S16;
>>> cinelerra/ffmpeg.C:             ret = av_opt_set_bin(buffersink_ctx, "sample_fmts",
>>> cinelerra/fileac3.C:                    codec_context->sample_fmt = codec->sample_fmts[0];
>>> cinelerra/fileffmpeg.C: const AVSampleFormat *sample_fmts = av_codec ? av_codec->sample_fmts : 0;
>>> cinelerra/fileffmpeg.C: if( sample_fmts ) {
>>> cinelerra/fileffmpeg.C:         for( int i=0; sample_fmts[i]>=0; ++i ) {
>>> cinelerra/fileffmpeg.C:                 const char *name = av_get_sample_fmt_name(sample_fmts[i]);
>>> cinelerra/pluginfclient.C:              ret = av_opt_set_bin(fsink, "sample_fmts",
>>>
>>>
>>> ~/cinelerra/cinelerra-5.1 $ grep pix_fmts -r cinelerra/*.C
>>> cinelerra/ffmpeg.C:static AVPixelFormat get_hw_##fn(AVCodecContext *ctx, const enum AVPixelFormat *pix_fmts) { \
>>> cinelerra/ffmpeg.C:                     const enum AVPixelFormat *pix_fmts)
>>> cinelerra/ffmpeg.C:     for( const enum AVPixelFormat *p=pix_fmts; *p!=AV_PIX_FMT_NONE; ++p ) {
>>> cinelerra/ffmpeg.C:             if( av_codec && av_codec->pix_fmts ) {
>>> cinelerra/ffmpeg.C:                             cin_fmt = avcodec_find_best_pix_fmt_of_list(av_codec->pix_fmts,
>>> cinelerra/ffmpeg.C:                             cin_fmt = av_codec->pix_fmts[0];
>>> cinelerra/ffmpeg.C:                             pix_fmt = codec->pix_fmts ? codec->pix_fmts[0] : AV_PIX_FMT_YUV420P;
>>> cinelerra/ffmpeg.C:             ret = av_opt_set_bin(buffersink_ctx, "pix_fmts",
>>> cinelerra/fileffmpeg.C: const AVPixelFormat *pix_fmts = av_codec ? av_codec->pix_fmts : 0;
>>> cinelerra/fileffmpeg.C: if( pix_fmts ) {
>>> cinelerra/fileffmpeg.C:         for( int i=0; pix_fmts[i]>=0; ++i ) {
>>> cinelerra/fileffmpeg.C:                 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmts[i]);
>>> cinelerra/pluginfclient.C:              ret = av_opt_set_bin(fsink, "pix_fmts",
>>> ~/cinelerra/cinelerra-5.1 $
>>>
>>> Patch for mplayer was already in Arch:
>>>
>>> https://gitlab.archlinux.org/archlinux/packaging/packages/mplayer/-/blob/main/ffmpeg-9.patch?ref_type=heads
>>>
>>>
>>>>
>>>> On Sat, Sep 12, 2026, 13:34 Andrew Randrianasulu <randrianasulu@gmail.com> wrote:
>>>>>
>>>>> https://github.com/mltframework/mlt/pull/1281/changes/68bceba12a3c3278ce69033c3e7dadaa13d45811
>>>>>
>>>>> of course ffmpeg devs invented yet another way to get supported sample/pixel formats out of  codec internals ....
>>>>>
>>>>> Will try to make mplayer work first, then may be cinelerra.