View Full Version : New info items
i'm currently busy adding some extra musicplayer info tags and will put up a patch when i have it working.
adding:
musicplayer.bitrate (kbps, mp3 / paplayer only for now)
musicplayer.playlistposition (current position in the xbmc audio playlist)
musicplayer.playlistlength (length of the xbmc audio playlist)
i don't think these are interesting to have for the videoplayer.
i put up a patch (1203847) for this on sourceforge, i added the following tags:
musicplayer.bitrate returns bitrate + kbps (e.g. 128kbps)
musicplayer.playlistlength returns amounts of items in
playlist (e.g. 200)
musicplayer.playlistposition return current position in
playlist (e.g. 5)
musicplayer.channels returns audio channels + chan
(e.g. 2chan)
musicplayer.bitspersample returns bits per sample + bit
(e.g. 16bit)
musicplayer.samplerate returns samplefrequency + khz
(e.g. 44khz)
musicplayer.codec returns the used codec (e.g. mp3,
mpc, ape etc)
these work for any format currently supported by paplayer.
Nuka1195
2005-05-17, 23:46
nice,
how about a musicplayer.visualizationpreset. returns the name of the preset the current visualization is using? :)
i would like to see stereomode aswell, ie stereo or j-stereo if possible ;)
edit: oh and please keep stuff *like* +chan & +khz (should be khz anyways) skinnable
also 44.1 instead of 44 (it's 44100 after all)
stereomode is rather codec specific (mp3 only) and therefore imho not very interesting.
i removed the chan/kbps stuff, left the samplerate intact as 44 instead of 44.1 as this is how e.g. winamp shows it too (also how would u show 22050 or 11025.. as 22.05 or 11.025?)
also fixed a bug in the bitrate calculation for mp3's, so put up some new files on sourceforge
for me stereomode is very interresting, so if it's not too much trouble, please give me the option :kickass:
i'm changing the mp3 bitrate to showing current frame bitrate (for vbr) if available. you will need the latest in_mp3.dll (v 5.09) for this to work.
patch will be up later (after testing).
concerning stereomode.. the info is not available atm, and altough u like it, i personally find it less interesting to spend time trying to retrieve it:)
concerning visibility preset being used, this info is also not availabe at the moment since it's handled by the visualisation itself and currently not accesible from within xmbc. its also not available for most visualisations.
actual bitrate is working for mp3 files, patched mp3codec.cpp is up on sourceforge.
is the bitrate, samplesrate, channels, etc, only available for mp3's?
i quote myself:)
these work for any format currently supported by paplayer.
i just compiled in this patch so i can commit it into cvs. i modified the playlist items so that it also shows information for temporary (ad hoc) playlists as well. (if you press play on a folder, or have "auto play next item" enabled, a temporary playlist is created.)
it's all working well except for the updated mp3codec.cpp. if i use the original one, everything is ok, and it "guesses" the bitrate of a vbr. the newer one just causes that tag to flash constantly. its unreadable. if i hit pause, it always says 1092, no matter what the actual bitrate of the file may be.
i agree with the flashing. either it should update every 5 secs or show the average bitrate. it would also be nice to know if it's a cbr or vbr encoding in a tag
i just compiled in this patch so i can commit it into cvs. *i modified the playlist items so that it also shows information for temporary (ad hoc) playlists as well. *(if you press play on a folder, or have "auto play next item" enabled, a temporary playlist is created.)
it's all working well except for the updated mp3codec.cpp. if i use the original one, everything is ok, and it "guesses" the bitrate of a vbr. * the newer one just causes that tag to flash constantly. *its unreadable. if i hit pause, it always says 1092, no matter what the actual bitrate of the file may be.
mm.. thats probably cause u use an old in_mp3.dll, the old one doesn't give back proper bitrate info.
but i was guessing it would at least just return zero. obviously not :)
so best is to discard the updated mp3codec.cpp then. then it will just show abr for vbr files instead of current bitrate.
which is ok for me too :)
i didn't know bout the ad-hoc playlist (but do know). probably some of the other info is also availabe from mplayer, didn't check for that, but the interface is in iplayer, so it's just a matter of overriding the virtual.
-edit-
@pike, u can quickly enough see if it's vbr or cbr, cause average bitrates for vbr tend to be not default (e.g. 128,160,192, etc). there is currently no normal way to detect that.
as far as the flashing while showing vbr with the newest in_mp3, it doesn't bother me, winamp does excatly the same. generally it stays in the same bitrate long enough to be readable.
jmarshall
2005-05-22, 01:32
just zero out formatdata[4] before the call to decode() would do the trick.
i haven't tried it to see how often it changes, but it has the potential to change quite quickly. you could smooth it out with a running average over the last 5 frames or so easily enough.
cheers,
jonathan
zero'ing out formatdata[4] before decode works as dantm was expecting it to work when you dont have the latest winamp dll. after installing it, the bitrate jumps around, but its not that bad. even so, i'm going to have a go at smoothing it out over the last five frames as jmarshall suggested to see what the improvement is.
zero'ing out formatdata[4] before decode works as dantm was expecting it to work when you dont have the latest winamp dll. *after installing it, the bitrate jumps around, but its not that bad. *even so, i'm going to have a go at smoothing it out over the last five frames as jmarshall suggested to see what the improvement is.
well personally i wouldn't do that.. u'll only create u'r own abr version. my suggestion is to go for abr (for the whole file) or show current bitrate (for current frame). there is no audio player i know that shows abr for a few frames.
i prefer abr myself, i'm not really interested in knowing the current bitrate, i'd rather see a song average.
a rolling average over the last five frames didnt really help. the rolling average is pretty jumpy. a hard average for every five frames made it less jumpy, but i dont know if a hard average has any value. here are the options, what's the concensus?
- average bitrate of the whole file
- instanteous bitrate as reported directly by in_mp3.dll
- rolling average of the bitrate over n frames
- hard average of the bitrate over n frames
my vote is for the average bitrate of the whole file.
jmarshall
2005-05-22, 20:25
average gives all the info that is needed imo.
i agree. and since i'm paying :) lol
that was easy :)
i'll commit the changes later today.
and dantm, thanks again for the patch.
the pa player went through some significant changes yesterday. the patch needs to be reworked but i wont have time to compare the changes until the weekend.
are you begging for some help? :)
if i was looking for help, i'd ask. i'm meerly setting the expectation level about when the patch may be commited now.
i was just joking :) nyway.. i'm updating the patch myself now.. if its of ny help i'll put it on sourceforge.. otherwise i'll keep it to myself :)
sure. if you put together a new patch, just upload it to sf. i'll check it out on the weekend.
Nuka1195
2005-06-01, 23:13
i was wondering if playlist name is available. if so could that be added?