-
-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dr_flac: Slow Seeking With Ogg Container #231
Comments
Yes, Ogg seeking runs in linear time. The most efficient way to do it is to use Ogg's framing system to do a binary search, but I just haven't prioritized refactoring it because Ogg encapsulation is so uncommon and dr_flac's encapsulation system is not implemented very well at all which makes maintenance difficult (Ogg support was sort of hacked in without much thought put into it). I need to do a full refactor of the encapsulation system. |
Is it possible to do the encapsulation through libogg? I'm thinking of that
because we already have libogg for Vorbis and Theora.
Pada tanggal Min, 8 Mei 2022 09.03, David Reid ***@***.***>
menulis:
… Yes, Ogg seeking runs in linear time. The most efficient way to do it is
to use Ogg's framing system to do a binary search, but I just haven't
prioritized refactoring it because Ogg encapsulation is so uncommon and
dr_flac's encapsulation system is not implemented very well at all which
makes maintenance difficult (Ogg support was sort of hacked in without much
thought put into it). I need to do a full refactor of the encapsulation
system.
—
Reply to this email directly, view it on GitHub
<#231 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZHFFXAUA7VHMKRW5BW6U3VI4HHPANCNFSM5VJ2HC2Q>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
No, that wouldn't work. I won't add support for libogg integration into the library itself because it's supposed to not have any dependencies. And unfortunately the public API doesn't have any kind of abstraction where you could plug in a custom encapsulation. It's just an unfortunate situation where the library wasn't designed properly for it and it just needs refactoring. In my WIP dr_vorbis project I have proper support for custom encapsulations at the public API level, so depending on how that works out I may update dr_flac to use the same kind of system. That will be ages away before I get to that though. |
Seeking with native container is fast, but with Ogg container it's slow. The slowdown seems to be linear, the further I seek, the slower it becomes.
To test, first encode a file using FFmpeg to native FLAC.
Then perform remux to Ogg. This is important to preserve the
totalPCMFrameCount
in the STREAMINFO block, otherwisetotalPCMFrameCount
is 0 and seeking is not possible. (probably FFmpeg defect)Then load
output.ogg
and perform seek. If you testoutput.flac
, seeking is fast.dr_flac 0.12.38.
The text was updated successfully, but these errors were encountered: