[Libav-user] No metadata in adts container using libavformat API

Igor Serganov iserganoff at gmail.com
Thu Dec 8 12:44:05 EET 2022


Hello Carl, 

Looks like I have found the solution:

    av_dict_set(&params, "write_id3v2", "1", 0);
    av_dict_set(&params, "write_apetag", "1", 0);

The above 2 lines did the job. While write_id3v2 option is something I expected to help, I am not really sure why write_apetag is needed?

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: https://docs.unified-streaming.com/documentation/vod/id3.html#priv-com-apple-streaming-transportstreamtimestamp <https://docs.unified-streaming.com/documentation/vod/id3.html#priv-com-apple-streaming-transportstreamtimestamp>. 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 RFC-8216.


Thank you,

Kind Regards,

Igor Serganov

> On 1 Dec 2022, at 07:51, Igor Serganov <iserganoff at gmail.com> wrote:
> 
> Hello Carl,
> 
> Just wondering if code provided is enough to reproduce the issue / find what am I doing wrong?
> 
> Thank you,
> 
> Kind regards,
> 
> Igor Serganov 
> 
> On Mon, 28 Nov 2022 at 21:51, Igor Serganov <iserganoff at gmail.com <mailto:iserganoff at gmail.com>> wrote:
> Hello Carl,
> 
> Also worth mentioning, that during runtime ‘ av_dump_format’ displays correctly all changes made to the format container metadata.
> 
> Thank you,
> 
> Kind regards,
> 
> Igor Serganov 
> 
> On Mon, 28 Nov 2022 at 18:30, Igor Serganov <iserganoff at gmail.com <mailto:iserganoff at gmail.com>> wrote:
> Hello Carl,
> 
> 
> Thank you for your reply. I think now I have realised that I have 2 issues in my scenario:
> 
> 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.
> 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 avformat_alloc_output_context2 and avformat_write_header .  That doesn’t work neither for mp3 nor for adts muxer.
> 
> 
> 
>> On 27 Nov 2022, at 17:00, Carl Eugen Hoyos <ceffmpeg at gmail.com <mailto:ceffmpeg at gmail.com>> wrote:
>> 
>> Am Sa., 26. Nov. 2022 um 19:08 Uhr schrieb Igor Serganov <iserganoff at gmail.com <mailto:iserganoff at gmail.com>>:
>>> 
>>> Hello team!
>>> 
>>> I would appreciate your help on the following issue.
>> 
>> I believe you should provide code that can be compiled stand-alone.
>> 
>> It seems very unlikely that you found a bug, much more likely that
>> something is missing in your code (assuming it works with ffmpeg,
>> the application).
>> 
>> Carl Eugen
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org <mailto:Libav-user at ffmpeg.org>
>> https://ffmpeg.org/mailman/listinfo/libav-user <https://ffmpeg.org/mailman/listinfo/libav-user>
>> 
>> To unsubscribe, visit link above, or email
>> libav-user-request at ffmpeg.org <mailto:libav-user-request at ffmpeg.org> with subject "unsubscribe".
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20221208/ca6f4a9e/attachment.htm>


More information about the Libav-user mailing list