Error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’

looks like your available ffmpeg is “too new” and they (deprecated and) removed the codec member from AVStream recently, in favor of codecpar.

what version of OpenCV did you do this with? I’m assuming latest.

OpenCV would need a fix for that. feel free to open an issue on OpenCV’s github. don’t worry too much about all the things they ask for in the issue template.

for now you could use an older version of ffmpeg (its libraries). I think that should work.

the deprecated field is still available if #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) so you could choose your ffmpeg based on that information.

I see that you’ve opened an issue. I did as well: