Skip to main content
Topic: foo_wave_seekbar (Read 549497 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: foo_wave_seekbar

Reply #2100
What is the difference between AMR-NB present in .amr container and in .3gp container, which causes the latter to be not displayed
I tried some 3gp files with amr audio and waveform is displayed correctly.

Re: foo_wave_seekbar

Reply #2101
I'll start with a disclaimer that I have no intent to fix the code or make any release. It took me over an hour to set up an environment that could build foo_wave_seekbar at all this time, and it's one that isn't fit for making releases with.

If you look closer at the Westbam track, you'll notice that both the playlist, the builtin seekbar and my seekbar agrees that it's around two seconds long. This information is based on what the decoder says about the song length. If I ask about track information, it tells me "oh 88704 samples at a sample rate of 44100".

As this can be an approximation sometimes, I have logic to either pad with silence or truncate, depending on if it the track decodes shorter or longer than expected. Normally this is fine as the difference is a few hundred samples at most.

A difference between the player and my component is that I need a reasonably accurate track length up-front due to how my analysis works. I split the file into parts that are individually filled as I decode. That information needs to be known before I start. The player can just keep decoding until the file ends, producing up to an infinite amount of bonus audio.

As for recovering interrupted playback, I don't believe in producing bogus waveforms. This component kind of has a base assumption that the source is capable of producing what it promises.

For the undersized file, it might be possible to try to decode a bit further than the promised sample count, just to see if the file seems to be overlong enough to make a difference in the waveform. If so, decode to the true end and use that as the sample count for a completely new run of the file. That would work for your 2s track, but would be extremely amusing on infinite songs like looping tracker modules, so nothing one can naïvely implement.

For files that throw exceptions, I assume all are fatal. I cannot distinguish between error kinds there, unless you're supposed to just try to continue decoding and hope for the best.

As some bloke mentioned in the other thread, consider fixing your files.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

 

Re: foo_wave_seekbar

Reply #2102
@Rollin: well, OK... I can leave with that, still good to know that it is something that possibly can be fixed if I dig deeper.
EDIT:
I see that there are no waveforms from 3gp files recorded only with Sony Ericsson E15i (Android based), also known as Xperia X8 if I am not mistaken. Files recorded with other phones (some Nokia, Sony Ericsson - various models non-Android based, some camera) work fine and indeed display waveforms... LOL...

@Zao : if problem with Westbam Mvid is that file itself is malformed and incorrectly reports its length / ffmpeg can not read it properly and pass it to foobar - OK, I have no pretensions that it can not be fixed - totally bad input = bad output
But for other supposedly broken files from the package I only ask for not discarding data that were calculated for initial blocks and displayed before error occurred. Their length is reported properly so base condition for waveform seekbar component exist. I intentionally added there 1 file or 2 files, that display full wavefom, despite they also throw decoding/playback error at the very end. Also I noticed that incomplete downloads still allow to display not disappearing waveform, despite they are also malformed at the time when they still download and playback decoders throw errors on them.

Of course I don't expect anything to be fixed immediately. Just when next release will be planned for whatever reason, you can consider also not clearing seekbar when certain errors occur, but leaving empty space in it instead - as for incomplete downloads happens now.

Re: foo_wave_seekbar

Reply #2103
Some additional note:
I went to Windows 10 installation, because of Forza Horizon. Additionally I dug through foobar installation on that OS. I cleaned up components in similar manner as under Windows 7, with one exception  - I left there unconfigured foo_input_ffmpeg and I left there working foo_input_ds. I tested there a bunch of old Mvids not remuxed to .mkv , awaiting for final removal.

Observations:
First of all - waveform seekbar works there very well (as it was usually, before I overloaded foobar with DLLs). All waveforms, for all supported video files are displayed and they don't disappear at any circumstances.
Then:
There are some files which are barely seekable (audio is reset to beginning upon any seek operation). But that changes when LAV Filters are re-installed from their separate installer (see below).
There are some files which incorrectly report their length, even after LAV reinstallation - they are cut by 20, 30, 45 seconds. What is specific: when all video files are played in foobar, in notification area I have just LAV Splitter and LAV Audio Decoder icons. But when some of these "broken" files come to its premature end - these icons start quickly appearing and disappearing with LAV Video Decoder showing up 2-3 times for an eye-blink. Waveform seekbar shows their waveform cut, accordingly to length reported on playlist, which is rather proper behavior.
That Westbam - Hard Times mvid reports proper length and is properly seekable, with proper waveform in seekbar displayed... So it is totally different to what is achieved through foo_input_ffmpeg as a data feed for foo_waveform_seekbar.

What I can say - both systems were installed at the same time, so I used the same KLCP installer on both, and used the same settings for installation. So I suppose this is KLCP installer that messes something in system (not the first one, but not all of them are such buggy). It may be also something with recent version of LAV filters, as in both cases (Win 7 & Win 10) installing just LAV Filters taken directly from their source doesn't change situation that much. I suspect it because afaik both KLCP installer and direct LAV installer install LAV in the same version, so that may suggest that it is this exact version of LAV to be blamed.

What is important to note: seems that foo_waveform_seekbar is really reliable here and only wrong data feed causes it to work in an unusual way. However, as noted in my previous message - it would be OK if waveform parts that are successfully calculated were kept, and parts of file where waveform can not be calculated due to errors in data fed to seekbar component, were simply left blank. Instead of blanking full seekbar.
By the way - I got some idea / feature proposal. Maybe if for some reason for certain file waveform creation is completely impossible (CD Audio, infinite loop, .3gp file recorded with SE E15i, whatever else) there could be displayed simple text on the waveform seekbar:
"Waveform unavailabe". Or more detailed way: "Waveform unavailable (unsupported file or location)". Just a small thing to add, when there will be a bigger reason to release newer version :)

Re: foo_wave_seekbar

Reply #2104
Our forum friend Rollin has found working solution for all these files that have bugs when decoded through foo_input_ffmpeg:
https://hydrogenaud.io/index.php/topic,114855.msg948011.html#msg948011
Quote
you can add -loglevel 0 to Additional arguments. This should fix disappearing of waveform for files from your archive when decoding with foo_input_ffmpeg.
Rollin - once again thank you :)


EDIT:
WOW. After adding that -loglevel 0 switch to 3GP config I also have waveform seekbar available for those "faulty" .3gp files from SE E15i mobile phone... So that is really a huge thing!

Re: foo_wave_seekbar

Reply #2105
Is there any way to set waveform to be displayed when track is selected in playlist?
Before track is actually started.
You could give a try to my modified version of zao's Waveform Minibar. It allows configuring whether to show the waveform for playing track or for selected track. All configuration currently lives in Preferences -> Advanced -> Display -> Waveform Minibar (mod).
The component doesn't require SSE instructions and works on Windows XP.
Download link: http://www.saunalahti.fi/~cse/foobar2000/foo_wave_minibar_mod.fb2k-component

Re: foo_wave_seekbar

Reply #2106
Is there any way to set waveform to be displayed when track is selected in playlist?
Before track is actually started.
You could give a try to my modified version of zao's Waveform Minibar. It allows configuring whether to show the waveform for playing track or for selected track. All configuration currently lives in Preferences -> Advanced -> Display -> Waveform Minibar (mod).
The component doesn't require SSE instructions and works on Windows XP.
Download link: http://www.saunalahti.fi/~cse/foobar2000/foo_wave_minibar_mod.fb2k-component

Please note that this is his fork/mod of my minibar component. It has different unique identifiers against foobar2000, a different database name, and has been audited by Case to build and work on XP without SSE. That's not the case with my own components, it's extra work that Case has performed.

If it breaks, blame him. 8)
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

Re: foo_wave_seekbar

Reply #2107
I released a new version of the modified minibar component. It's now available on the component repository.

Configuration is now moved away from the advanced preferences and can be found in Tools section of the preferences window. Colors are now by default based on the player's user interface theme.

Re: foo_wave_seekbar

Reply #2108
Hello Case!
I just wanted you to know that my antivirus (Bitdefender), thinks that your component is a virus.


Re: foo_wave_seekbar

Reply #2109
Looking at the claimed "threat" name, this is most probably a false positive based on overly generous heuristics. More often than not, particularly if you go out of your way to target older platforms or build in different ways than normal, they'll think you're doing something fishy. Why would anyone legitimate ever bother to run without a CRT runtime, for example? :)

If you're still concerned, you may want to throw the component at some online service that tests with a horde of different AV products, to see if there's actual consensus or just an false positive.

You can give say virustotal.com an URL to have it scan it without you having to download it to your machine.

Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

Re: foo_wave_seekbar

Reply #2110
Thanks for the notification, TuNk77. It's a false positive, all the VirusTotal detections apart from MAX are using the same BitDefender's engine. I have reported the false positive and expect it to be fixed soon.

Re: foo_wave_seekbar

Reply #2111
Got email this morning that the file was found to be clean and databases are fixed.

Re: foo_wave_seekbar

Reply #2112
Maybe it is bit off topic, but... Why when I came here to see today's last answer (given by Case) I see this above quick reply window and below last message in thread:
Quote
Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
?? Is there something broken within the forum engine?

EDIT:
And it disappeared after I posted above message.

Re: foo_wave_seekbar

Reply #2113
@EpicForever It was probably confused when a recent spam message was removed.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

Re: foo_wave_seekbar

Reply #2114
Question: is there possibility to cancel analysis queue? Accidentally I messed something when trying to type something for search purposes, which ended up in selecting whole playlist (long one...) and ordering to analyze waveform signatures of all these files...
If there is no such possibility now - could this be added somewhere (in Preferences/Tools or in Advanced Preferences / tools, or when right clicking on waveform seekbar itself)?

Re: foo_wave_seekbar

Reply #2115
@EpicForever There is (as far as I remember) no built-in way of purging the scan queue.
It is stored in the wavecache.db database when the player is not running, and resumed from there when launching again.

You can "simply" download the sqlite3.exe command line client (or some other SQLite database interface), run « sqlite3.exe wavecache.db » and type (without the quotes, but with the semicolon) « DELETE FROM job; »

The download site for sqlite3 is at https://www.sqlite.org/download.html and the executable is in the sqlite-tools-win32-x86-3210000.zip package.

As mentioned earlier, don't have any hopes of a feature update of that component.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

Re: foo_wave_seekbar

Reply #2116
Hi,
Windows XP and SSE aside, how can the average user choose between Zao's original seekbar and case's minibar ?
Are there any benefits in choosing one or the other ? (besides the fact that Case's looks simpler and with less options)
Are the databases the same size for the same number of sampled songs ?
Etc.
Thanks !

Re: foo_wave_seekbar

Reply #2117
It's funny that you say "Case's minibar", considering that I wrote both original components. Case altered the minibar adding a bit of configuration and features into "minibar mod".  :))

The origin of the minibar component was a bit of annoyance about how cumbersome and legacy-laden the seekbar had become, so I wrote a new one from scratch that satisfied the requirements of the primary user (Case) and existed as a private component for quite a while. It only appeared in public when it appeared to be suitable for other users, first in the IRC channel and eventually linked in this thread.

As such, it's made in a way simpler way. It doesn't do any D3D or D2D acceleration of visuals, doesn't have any shader/effect customization, and it downmixes multi-channel content. Until Case's work, all the minibar configuration was via "advanced preferences" and expected that you knew what you were doing.

Feature-wise, there's some compatibility breaks I were able to make and some quality improvements. The scanning process itself is pretty much the same, as that's just calling into decoders and handling when they return garbage.

Minibar's stored waveforms are 4096 samples of three 16-bit integers, instead of the 2048 samples of three 32-bit floats of the seekbar. Minibar doesn't compress them, but compression didn't really save much space anyway. Minibar uses lighter compression, but as compression doesn't have too much of an effect, it's fine.

As mentioned, minibar draws the visuals with GDI in software, but uses a way better resampling algorithm to fit the datapoints to the width of the window. The seekbar just did point sampling or trilinear interpolation, while the minibar does a high quality image-based resize of the source data to better reflect the source data.

In short, there's way less features and complexity in the minibar, but if it does what you want, I'd strongly recommend using that as that has a chance of getting updates, unlike the seekbar.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

Re: foo_wave_seekbar

Reply #2118
I also said Zao's ORIGINAL seekbar. I couldn't just say "Zao's original seekbar and Zao's minibar", could I ? Ah... developer's ego... ^^
Relax man. I love your seekbar and I've praised YOUR work more than once in this thread already.
So thanks AGAIN for all that. ;)

Re: foo_wave_seekbar

Reply #2119
I think Zao's reaction was pretty relaxed (did you even saw the smiley, wcs13?). And thanks Zoa for clearing this up.
In theory, there is no difference between theory and practice. In practice there is.

Re: foo_wave_seekbar

Reply #2120
Mine was relaxed too. Did you even see my "^^" ? ;)
And thanks to Zao (yes, again, lol) for all his explanations. Everything's clearer now.

For the record, there is only one thing I find weird about minibar :
With Zao's original seekbar, AFAIK when foobar starts, we don't see a waveform until a song is played. We see only a central horizontal line, which is nice.
With minibar, when foobar starts, we see the waveform of the song that was selected last in previous foobar session before closing foobar, even though that song isn't selected anymore when foobar starts, and even though that song wasn't played. EVER.
And NO, the "show waveform for selected track instead of playing track" preference wasn't selected. Ever either.
Because of that, I don't think it's an intended behaviour, so maybe it's a glitch ?
I'd prefer minibar to behave like waveform seekbar when foobar starts. Thanks in advance @Case !

Re: foo_wave_seekbar

Reply #2121
It shows the waveform of current track. It's the track foobar2000 has its internal cursor at and it's the track that will play if you hit Play. I see no sense in artifically making the component more stupid by showing nothingness instead. Also blank UI elements aren't pretty.

Did you know that it's not only a seekbar that you use to seek in a track while playing? You can also click anywhere on the waveform while stopped and playback will start from that position.

With that said if seeing the waveform of current track after player start is a showstopper feature for you I can add an option to disable it. But it really makes no sense in my head. But it wouldn't be a line because line means silent track. It would be blank.

Re: foo_wave_seekbar

Reply #2122
Thanks for your reply. Well, here's what disturbs me : since my minibar is configured to show the waveform from playing track, I don't see why it would ever show the waveform from a track that I have never ever played (let me emphasize that even if I selected it from previous session, I never played it). Makes no sense to me. ;)

I see three solutions to that :
- Either display a blank (you say blank UI elements aren't pretty, but for example I wouldn't like the Text Display component to display something if there's no track selected - it's not about being pretty but about making sense ;) )
- Or display something instead (a "[no selection]" or "[no playing track]" message (depending on the selected option in minibar preferences), a picture of a flying cat, whatever you want  :P  )
- Or have foobar visually highlight the last selected track from last session at startup, so it matches the displayed waveform

But the third solution would only make sense if minibar was configured to show waveform for selected track instead of playing track. So in my case it wouldn't make sense.
So yes, very honestly, an option to display a blank would be better for me. Sorry for bothering you and thanks for your understanding. :)

Re: foo_wave_seekbar

Reply #2123
Posted a new version with option to not show the waveform on player start.

Re: foo_wave_seekbar

Reply #2124
I just tried the Minibar version of the seekbar and I quite like it more than the original one, but one thing that bothers me is that the seekbar itself is causing some minor stuttering with games and while dragging any windows in main screen when the foobar window with Minibar seekbar enabled is on my other monitor. Windows 10 task manager also shows elevated GPU usage when the window is active, and it goes down the instant I minimize foobar.

EDIT: I think the main cause of this is that the Minibar seekbar is constantly rendering and updating its view even when the playback is paused. Zao's seekbar also seems to cause some stuttering when D3D9 or D3D2 frontend is selected, but GDI is stutter free. Would it be possible to add some kind of setting to limit how often the seekbar is being updated to avoid this?

 
SimplePortal 1.0.0 RC1 © 2008-2018