<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 25 Feb 2020 at 17:13, Simon Brown <<a href="mailto:simon.k.brown@gmail.com">simon.k.brown@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'm trying to convert an incoming transport stream to DASH without re-encoding.<div><br></div><div>I've done this using two separate ffmpeg commands and it works, but as each instance of FFMpeg spends time locking onto the stream, finding the first I-frame, etc the resulting latency is unacceptable.  I thought I could streamline this somewhat by writing it using the libav libraries that come with FFmpeg.</div><div><br></div><div>I've taken the demux_decode.c example and receive the stream.  I don't decode it, I just get a packet from the stream using:</div><div><br></div><div>av_read_frame(fmt_ctx, &pkt)<br></div><div><br></div><div>Once read, I try and write it to the stream using:</div><div><br></div><div>   ret = av_interleaved_write_frame(oc, &pkt);<br></div><div><br></div><div>having setup oc as an output context for muxer "dash".</div><div><br></div><div>    avformat_alloc_output_context2(&oc, NULL, "dash", filename);<br></div><div><br></div><div>However, I seem to have missed some vital steps, because the dash muxer responds with:</div><div>Output #0, dash, to 'vid.mpd':<br>    Stream #0:0: Unknown: none<br></div><div><br></div><div>The muxing.c example is all about taking some generated frames and encoding them before sending them out and that sets up a codec context which is added to the dash muxer, but I don't want a codec context, because I don't want to encode an already encoded stream.</div><div><br></div><div>Any help would be greatly appreciated.</div><div><br></div><div>Regards,</div><div>Simon</div></div>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote><div><br></div><div>See the "remuxing.c" example.</div><div>Use avcodec_parameters_copy to copy the codecpar from the demuxer's AVStream to the muxer's one.<br></div></div></div>