<div dir="ltr">There is an example within the FFmpeg examples, IIRC.  I used this example, however:<div><br></div><div><a href="https://www.codeproject.com/Tips/489450/Creating-Custom-FFmpeg-IO-Context">https://www.codeproject.com/Tips/489450/Creating-Custom-FFmpeg-IO-Context</a><br></div><div><br></div><div>And cross referenced it with multiple other implementations I found on Google, and they all seemed to do the same things.  I had a problem, however, in that whenever I supply a seek function it takes a long, long time for the file to load (seems to take a long time to read the file's headers).  The problem doesn't exist when I omit the seek function, however seeking takes a long time as FFmpeg will keep reading the file until it gets to the seek point, which makes sense. </div><div><br></div><div>So, I'm stuck getting the seek function to work.  I posted a question about this exact problem a couple of weeks ago, but didn't get a response, so I hope you don't have the same issue.  My next step is to debug through ffplay to see what it's doing that's different, since it doesn't have this problem when playing the same file.  I haven't had time to do that yet.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 12, 2016 at 7:19 PM, Sida Li <span dir="ltr"><<a href="mailto:lisida46@gmail.com" target="_blank">lisida46@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi everyone,<div><br></div><div>I've been trying to stream MPEG-DASH videos using libdash and decode using ffmpeg.</div><div>I got the sample player from <a href="https://github.com/bitmovin/libdash/tree/master/libdash/qtsampleplayer" target="_blank">libdash</a> working. It can do playback but not seeking.</div><div><br></div><div>The sample uses a custom AVIOContext allocated by <a href="https://www.ffmpeg.org/doxygen/trunk/avio_8h.html#a853f5149136a27ffba3207d8520172a5" target="_blank">avio_alloc_context</a>, which takes in function pointers to custom read_packet and seek functions. </div><div>The <a href="https://github.com/bitmovin/libdash/blob/2aff091c1947e3dc6ade84bb1b03b8414ee4e442/libdash/qtsampleplayer/Decoder/LibavDecoder.cpp#L19" target="_blank">read_packet function</a> has been implemented but not the seek function.</div><div>I couldn't find any documentation regarding the seek function used by AVIOContext other than the function signature.</div><div>So I was wondering if there is documentation or sample code such as <a href="https://www.ffmpeg.org/doxygen/trunk/avio_reading_8c-example.html#a20" target="_blank">avio_reading.c</a> indicating how the custom seek function should be implemented?</div><div><br></div><div>Thank you so much for your time.</div><div><br></div><div>Best,</div><div>Sida Li</div></div>
<br>______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/<wbr>listinfo/libav-user</a><br>
<br></blockquote></div><br></div>