<div dir="ltr">A possibly useless remark, but have you tried asking your favourite AI model to generate this code for you?</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Dec 6, 2024 at 10:55 PM <<a href="mailto:martymoose21@gmail.com">martymoose21@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-2787823830892409574"><div lang="EN-CA" style="overflow-wrap: break-word;"><div class="m_-2787823830892409574WordSection1"><p class="MsoNormal"><span style="font-family:Consolas">To Whom it may concern,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas">I’m trying to implement this cli command into c that calls the libav API, however I am stuck as this is my first<br>time using the libav libraries. I can’t get it to write the ‘covr’ tag like the cli command does and I don’t <br>really know where I’m going wrong. It seems to write the jpeg data but not in a compliant format and therefore,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas">only VLC can recognize the attached_pic. <br><br>From what I understand here is what roughly needs to happen: <u></u><u></u></span></p><ol style="margin-top:0cm" start="1" type="1"><li class="m_-2787823830892409574MsoListParagraph" style="margin-left:0cm"><span style="font-family:Consolas">open the jpeg file using avformat_open_input<u></u><u></u></span></li><li class="m_-2787823830892409574MsoListParagraph" style="margin-left:0cm"><span style="font-family:Consolas">call avformat_find_stream_info with AVFormatContext param from step 1<u></u><u></u></span></li><li class="m_-2787823830892409574MsoListParagraph" style="margin-left:0cm"><span style="font-family:Consolas">create a new stream on the output AVFormatContext using avformat_new_stream<u></u><u></u></span></li><li class="m_-2787823830892409574MsoListParagraph" style="margin-left:0cm"><span style="font-family:Consolas">call avcodec_parameters_copy with the jpeg context as the source and the output as the destination<u></u><u></u></span></li><li class="m_-2787823830892409574MsoListParagraph" style="margin-left:0cm"><span style="font-family:Consolas">OR the created output stream’s ‘disposition’ member with AV_DISPOSITION_ATTACHED_PIC (from what I understand the library fills ‘attached_pic’ automatically?)<u></u><u></u></span></li><li class="m_-2787823830892409574MsoListParagraph" style="margin-left:0cm"><span style="font-family:Consolas">call avformat_write_header with the output AVFormatContext<u></u><u></u></span></li></ol><p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas">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.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas">Any help is greatly appreciated.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas">ffmpeg -i file_audio.m4a -i file.jpg -map 0 -map 1 -c copy -disposition:v:0 attached_pic file_audio_with_pic.m4a<u></u><u></u></span></p></div></div>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".<br>
</div></blockquote></div>