<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>