[mythtv] Perl expertise wanted
jim at jtan.com
Wed Jul 9 11:42:25 EDT 2003
> It is impressively fast to index, which leads me to suspect
> it's cheating (don't sample at all, just multilpy bitrate by size -
> Unfortunately, I don't know Perl. It would be very useful if
> someone (I've copied this back to the mailing list) who does know
> Perl code look at this code and give some hints as to what it's
Yep, they cheat, but they're smarter than us. Currently, MythMusic
only cheats if it thinks the file looks like it's not VBR (by
examining the bitrates of the first few frames). Turns out there's
this magic Xing VBR header that gives you, among other things, a
frame count that you can use with other info to compute the song
There's also a newer incompatible format from Fraunhofer ("VBRI
Header") that gives the same information. The webplay code (which
uses MP3::Info) does not support this, but we can.
I believe supporting both of these formats will cover all VBR files.
We could always fall back to the check-the-first-few-frames method if
neither header exists, although it would be much quicker to just
assume it's CBR if these headers are not present.
I'll code this up sometime this week.
More information about the mythtv-dev