[Libav-user] Converting ts to DASH using libavformat
Simon Brown
simon.k.brown at gmail.com
Wed Feb 26 18:20:48 EET 2020
On Wed, 26 Feb 2020 at 11:28, Simon Brown <simon.k.brown at gmail.com> wrote:
>
> See the "remuxing.c" example.
>> Use avcodec_parameters_copy to copy the codecpar from the demuxer's
>> AVStream to the muxer's one.
>>
>> Thanks James - that's exactly what I needed. Now I just need to pass all
> the parameters I need into the dash muxer and I'll be sorted.
>
> Cheers,
> Simon
>
Ok, next problem - I have parsed all the command line parameters and
assigned them to the output context using:
ret = avformat_write_header(ofmt_ctx, &opt);
where opt contains the options dictionary. I know it is accepting this
because the returned dictionary is empty. Also, I know because it is
clearing out older .m4s segment files so that my disk doesn't fill up, so
it's accepting the window_size parameter. What it's not doing though, when
it runs, is outputting continuously updated manifest.mpd data - which if I
run ffmpeg with the same command line options I do get. So ultimately my
manifest.mpd file has a single segment in it, and my dash player never
plays anything.
Looking through dashenc.c it would appear that the manifest should be
updated whenever write_packet is called, and I'm assuming this is called
because otherwise I wouldn't get the .m4s files being output. But
something must be failing here. Is there anyway I can see what options the
dash mux is using and why it wouldn't be outputting manifest updates?
To write the frames out I am using the same line as in remuxing.c, namely:
ret = av_interleaved_write_frame(ofmt_ctx, &pkt);
should I just use av_write_frame?
Regards,
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200226/343d6d08/attachment.html>
More information about the Libav-user
mailing list