so I was using this  patch as guidance

https://github.com/HandBrake/HandBrake/pull/4451/commits/5e86b74d405f63ed020fa09eb076a65b7337bd4e

apparently channels was replaced by ch_layout.nb_channels

and channel_layout
by ch_layout.u.mask

I'll try to put ifdef guards around those changes and make some patches ...