<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello Carl, <div class=""><br class=""></div><div class="">Looks like I have found the solution:</div><div class=""><br class=""></div><div class=""><div style="color: rgb(54, 54, 54); background-color: rgb(255, 255, 255); font-family: Menlo, Monaco, "Courier New", monospace; line-height: 18px; white-space: pre;" class=""><div class="">    <span style="color: rgb(99, 99, 36);" class="">av_dict_set</span>(&<span style="color: rgb(9, 89, 132);" class="">params</span>, <span style="color: rgb(162, 86, 55);" class="">"write_id3v2"</span>, <span style="color: rgb(162, 86, 55);" class="">"1"</span>, <span style="color: rgb(73, 104, 57);" class="">0</span>);</div><div class="">    <span style="color: rgb(99, 99, 36);" class="">av_dict_set</span>(&<span style="color: rgb(9, 89, 132);" class="">params</span>, <span style="color: rgb(162, 86, 55);" class="">"write_apetag"</span>, <span style="color: rgb(162, 86, 55);" class="">"1"</span>, <span style="color: rgb(73, 104, 57);" class="">0</span>);</div></div><div><br class=""></div><div>The above 2 lines did the job. While <span style="caret-color: rgb(162, 86, 55); color: rgb(162, 86, 55); font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">write_id3v2</span> option is something I expected to help, I am not really sure why <span style="caret-color: rgb(162, 86, 55); color: rgb(162, 86, 55); font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">write_apetag</span> is needed?</div><div><br class=""></div><div>Also it seems to be convenient to have additional flag which will enable automatic writing of audio start_time to ID3 tag like described in this page: <a href="https://docs.unified-streaming.com/documentation/vod/id3.html#priv-com-apple-streaming-transportstreamtimestamp" class="">https://docs.unified-streaming.com/documentation/vod/id3.html#priv-com-apple-streaming-transportstreamtimestamp</a>. Actually exactly the same is being done while muxing to mpegts format where format has `start_time` field. As this is quite a requirement of <span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">RFC-8216.</span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class=""></span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class=""></span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Thank you,</span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class=""></span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Kind Regards,</span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br class=""></span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Igor Serganov</span></div><div><br class=""><blockquote type="cite" class=""><div class="">On 1 Dec 2022, at 07:51, Igor Serganov <<a href="mailto:iserganoff@gmail.com" class="">iserganoff@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class="">Hello Carl,</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Just wondering if code provided is enough to reproduce the issue / find what am I doing wrong?</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Thank you,</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Kind regards,</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Igor Serganov </div><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 28 Nov 2022 at 21:51, Igor Serganov <<a href="mailto:iserganoff@gmail.com" class="">iserganoff@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div class=""><div dir="auto" class="">Hello Carl,</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Also worth mentioning, that during runtime ‘ av_dump_format’ displays correctly all changes made to the format container metadata.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Thank you,</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Kind regards,</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Igor Serganov </div></div><div class=""><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 28 Nov 2022 at 18:30, Igor Serganov <<a href="mailto:iserganoff@gmail.com" target="_blank" class="">iserganoff@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div style="line-break:after-white-space" class="">Hello Carl,<div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thank you for your reply. I think now I have realised that I have 2 issues in my scenario:</div><div class=""><br class=""></div><div class="">1. The code attached (metadata.cpp) writes perfectly some static header during mp3 => mp3 transcoding, however if I use ADTS muxer with AAC output stream inside, metadata is not written.</div><div class="">2. Since one of the tags contains start time of the segment, I need to update its value multiple times (as many as I have 10s segments during transcoding) after calling <span style="font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(99,99,36)" class="">avformat_alloc_output_context2</span> and <span style="font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(99,99,36)" class="">avformat_write_header</span> .  That doesn’t work neither for mp3 nor for adts muxer.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""></div></div><div style="line-break:after-white-space" class=""><div class=""></div><div class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 27 Nov 2022, at 17:00, Carl Eugen Hoyos <<a href="mailto:ceffmpeg@gmail.com" target="_blank" class="">ceffmpeg@gmail.com</a>> wrote:</div><br class=""><div class=""><div class="">Am Sa., 26. Nov. 2022 um 19:08 Uhr schrieb Igor Serganov <<a href="mailto:iserganoff@gmail.com" target="_blank" class="">iserganoff@gmail.com</a>>:<br class=""><blockquote type="cite" class=""><br class="">Hello team!<br class=""><br class="">I would appreciate your help on the following issue.<br class=""></blockquote><br class="">I believe you should provide code that can be compiled stand-alone.<br class=""><br class="">It seems very unlikely that you found a bug, much more likely that<br class="">something is missing in your code (assuming it works with ffmpeg,<br class="">the application).<br class=""><br class="">Carl Eugen<br class="">_______________________________________________<br class="">Libav-user mailing list<br class=""><a href="mailto:Libav-user@ffmpeg.org" target="_blank" class="">Libav-user@ffmpeg.org</a><br class=""><a href="https://ffmpeg.org/mailman/listinfo/libav-user" target="_blank" class="">https://ffmpeg.org/mailman/listinfo/libav-user</a><br class=""><br class="">To unsubscribe, visit link above, or email<br class=""><a href="mailto:libav-user-request@ffmpeg.org" target="_blank" class="">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".<br class=""></div></div></blockquote></div><br class=""></div></div></blockquote></div></div>
</div>
</blockquote></div></div>
</div></blockquote></div><br class=""></div></body></html>