<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>What I have done in the past is put print statements in the
ffmpeg source code and recompile ffmpeg to figure out what is
happening,</p>
<p>Jon<br>
</p>
<div class="moz-cite-prefix">On 2024-12-06 15:54,
<a class="moz-txt-link-abbreviated" href="mailto:martymoose21@gmail.com">martymoose21@gmail.com</a> wrote:<br>
</div>
<blockquote type="cite"
cite="mid:7d4201db4821$1a336ca0$4e9a45e0$@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator"
content="Microsoft Word 15 (filtered medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Aptos;}@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;
mso-fareast-language:EN-US;}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;
mso-fareast-language:EN-US;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Aptos",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
mso-fareast-language:EN-US;}div.WordSection1
{page:WordSection1;}ol
{margin-bottom:0cm;}ul
{margin-bottom:0cm;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:Consolas">To Whom
it may concern,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></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,<o:p></o:p></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:
<o:p></o:p></span></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoListParagraph"
style="margin-left:0cm;mso-list:l0 level1 lfo1"><span
style="font-family:Consolas">open the jpeg file using
avformat_open_input<o:p></o:p></span></li>
<li class="MsoListParagraph"
style="margin-left:0cm;mso-list:l0 level1 lfo1"><span
style="font-family:Consolas">call
avformat_find_stream_info with AVFormatContext param from
step 1<o:p></o:p></span></li>
<li class="MsoListParagraph"
style="margin-left:0cm;mso-list:l0 level1 lfo1"><span
style="font-family:Consolas">create a new stream on the
output AVFormatContext using avformat_new_stream<o:p></o:p></span></li>
<li class="MsoListParagraph"
style="margin-left:0cm;mso-list:l0 level1 lfo1"><span
style="font-family:Consolas">call avcodec_parameters_copy
with the jpeg context as the source and the output as the
destination<o:p></o:p></span></li>
<li class="MsoListParagraph"
style="margin-left:0cm;mso-list:l0 level1 lfo1"><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?)<o:p></o:p></span></li>
<li class="MsoListParagraph"
style="margin-left:0cm;mso-list:l0 level1 lfo1"><span
style="font-family:Consolas">call avformat_write_header
with the output AVFormatContext<o:p></o:p></span></li>
</ol>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">Any help
is greatly appreciated.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><o:p> </o:p></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<o:p></o:p></span></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre wrap="" class="moz-quote-pre">_______________________________________________
Libav-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a>
<a class="moz-txt-link-freetext" href="https://ffmpeg.org/mailman/listinfo/libav-user">https://ffmpeg.org/mailman/listinfo/libav-user</a>
To unsubscribe, visit link above, or email
<a class="moz-txt-link-abbreviated" href="mailto:libav-user-request@ffmpeg.org">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".
</pre>
</blockquote>
</body>
</html>