<div dir="ltr"><div><div><div>bump.<br></div>To be more clear: I need to extract text subtitles from large files, saving them on a database.<br></div>I am currently able to reencode the subtitle itself, but the decoding part ( <a href="http://pastebin.com/WbJwAKFx">http://pastebin.com/WbJwAKFx</a> ) is really damn slow, while "ffmpeg" command line takes just a few seconds.<br>
</div>Is there anything I'm missing? Custom IO? Frames skipping?<br>Thanks<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 1, 2013 at 11:25 AM, Marco Gulino <span dir="ltr"><<a href="mailto:marco.gulino@gmail.com" target="_blank">marco.gulino@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"><div><div><div><div><div><div>Hello<br></div>I'm noticing a huge difference in decoding speed with my own code, and with ffmpeg command line tool, especially with large (> 2GB) files.<br>
</div>This is my current test code: <a href="http://pastebin.com/WbJwAKFx" target="_blank">http://pastebin.com/WbJwAKFx</a><br>
</div>Just looping over the packets, without even reading them, takes 120 seconds.<br></div><br>When I run "ffmpeg -i mylargefile.mp4 /tmp/extractedSubtitle.srt", it takes no more than 10 seconds. Of course, I dropped linux kernel caches first, to force the same file reading speed.<br>
<br></div>I tried looking at ffmpeg.c, but I didn't notice anything in particular.<br></div>Thanks<span class="HOEnZb"><font color="#888888"><br>Marco<br><div><div><div><div><br></div></div></div></div></font></span></div>
</blockquote></div><br></div>