A possibly useless remark, but have you tried asking your favourite AI model to generate this code for you?
On Fri, Dec 6, 2024 at 10:55 PM <[email protected]> wrote: > To Whom it may concern, > > > > I’m trying to implement this cli command into c that calls the libav API, > however I am stuck as this is my first > time using the libav libraries. I can’t get it to write the ‘covr’ tag > like the cli command does and I don’t > really know where I’m going wrong. It seems to write the jpeg data but not > in a compliant format and therefore, > > only VLC can recognize the attached_pic. > > From what I understand here is what roughly needs to happen: > > 1. open the jpeg file using avformat_open_input > 2. call avformat_find_stream_info with AVFormatContext param from step > 1 > 3. create a new stream on the output AVFormatContext using > avformat_new_stream > 4. call avcodec_parameters_copy with the jpeg context as the source > and the output as the destination > 5. OR the created output stream’s ‘disposition’ member with > AV_DISPOSITION_ATTACHED_PIC (from what I understand the library fills > ‘attached_pic’ automatically?) > 6. call avformat_write_header with the output AVFormatContext > > > > > > As I said previously, it’s my first time using the lib and I am unsure if > I missed a step or made an error executing the steps such as being out of > order and/or misinterpreting what needed to occur. > > > > Any help is greatly appreciated. > > > > ffmpeg -i file_audio.m4a -i file.jpg -map 0 -map 1 -c copy > -disposition:v:0 attached_pic file_audio_with_pic.m4a > _______________________________________________ > Libav-user mailing list > [email protected] > https://ffmpeg.org/mailman/listinfo/libav-user > > To unsubscribe, visit link above, or email > [email protected] with subject "unsubscribe". >
_______________________________________________ Libav-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
