I let ChatGPT write my first ever FFmpeg code and I can't understand all its parts (if they're really needed or something is missing).
In particular it started as a single chunk of code inside main, then I put it aside in init and a next_frame but it looks ugly especially next_frame with that double error handling. Why not all requested "frames" are proper frames, what are they? Are audio files and metadata interleaved?
Also there where 2 functions (one in init, one in next_frame) to convert YUV to RGB which I removed, and already did some stuff with YUV totally fine, but now I noticed that sws_getContext() is called with AV_PIX_FMT_RGB24... Shouldn't this have resulted in some mismatching?
#FFmpeg basic, demuxing a video frame by frame
1 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
I know, it looked like a bit too much
you asked a guessing machine to write correct code, now complain to us it guessed wrongly.. sigh