[Libav-user] muxing.c example with dash format

salsaman salsaman at gmail.com
Wed Feb 14 01:44:47 EET 2018


You may need something like:

  /* Some formats want stream headers to be separate. */
  if (oc->oformat->flags & AVFMT_GLOBALHEADER)
    c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;

where oc is your AvFormatContext * and c is your AvCodecContext.


Gabriel.



http://lives-video.com
https://www.openhub.net/accounts/salsaman

On Tue, Feb 13, 2018 at 11:14 AM, Yuriy Pryyma <priymayuriy at gmail.com>
wrote:

> I have set output format to dash in muxing.c(I have removed audio stream)
> Here:
>     avformat_alloc_output_context2(&oc, NULL, "dash", filename);
> Program generated "chunk-stream0-00001.m4s" "init-stream0.m4s" "main.mpd"
> Looks like everything is good, but video is black when playing using
> MP4Client
> Note that other containers(.avi, .ts) looks good.
> During generation that was warnings
>     [dash @ 0xca1aa0] Codec for stream 0 does not use global headers but
> container format requires global headers
>     [mp4 @ 0x11f9e00] Codec for stream 0 does not use global headers but
> container format requires global headers
> What I`m doing wrong?
>
> Thank you in advance.
>
> Sorry by chance send to "libav-user at ffmpeg.org"
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180213/d63b9556/attachment.html>


More information about the Libav-user mailing list