Writing against the ffmpeg c API is very very unpleasant. The official guidance you'll get is to read the source code of the command line app and copy what it does. This is not at all the normal use case. I would guess GPT will give you horrible advice here because it generally can't help with obscure APIs.
I've found the opposite to be true; the FFmpeg C API is pretty straightforward, although it tends to change a bit since the developers are deprecation-happy. The ffmpeg(1) CLI, though… that's crazy! I've mostly understood its model by now, but a lot of things are completely nonstandard and unexpected. (Like: ffmpeg a.mp4 b.mp4 means two output files, not an input and an output. Lots of arguments mean different things depending on whether they come before an input and an output argument; and yes, that's before and not after. And so on.)