Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Waveform Minibar (mod) (Read 109735 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Waveform Minibar (mod)

Reply #225
I have seen slow scanning with at least DTS in Matroska when using FFmpeg input to handle the format. The first subsong doesn't require seeking and thus scans fast but all the others are slow. Blank minibar could be explained by the decoder hanging or the optional slow decode check giving up the scan job.
You probably can't share your problem file but it might be helpful to know which audio format it uses.
Could you verify with Process Explorer's Threads view that minibar threads are the cause for the player hanging on exit? I recall I have pretty extensive error checking and abort features everywhere.

Re: Waveform Minibar (mod)

Reply #226
After playing around I think it is just caused by any file that is very large, choosing a chapter far into the file. The hang time depends on the distance into the file and the slowness of the drive it's on. Looking at ProcMon, foobar is slowly reading the whole file when it's hung. I can reproduce this using the default MKV decoder or ffmpeg input wrapper on the same files. The audio codec in the file doesn't seem to matter, two examples were PCM and AAC.

Shouldn't seeking into the file be quite fast though? Foobar is able to seek to where it needs to start decoding almost instantly so why would the scanning need to seek any other way?

I tried looking at the threads in process explorer, there is always one thread using ~0.3% CPU while foobar is unresponsive, but it's in ntdll.dll and the stack seems to be different every time because it's doing something or other, so I'm not sure what's going on. The only stacks with anything interesting I got from this thread were ones with foo_input_std like:

0x0000000000000000
foobar2000.exe+0x2fc38
0x0000000000000000
foo_input_std.dll!foobar2000_get_interface+0x42164
0x0000000000000000

My only reason for thinking it's something to do with this component is because I tried on a clean portable install and 10/10 times with it enabled it will happen, and 0/10 times without.

Re: Waveform Minibar (mod)

Reply #227
I can't replicate player hanging but I could replicate slow scanning. Minibar didn't specify input_flag_allow_inaccurate_seeking and apparently Matroska can't be sample-accurately seeked without parsing the entire file. New version released where decoder is allowed to use inaccurate seeking.

Re: Waveform Minibar (mod)

Reply #228
Thank you very much, that seems to have fixed it

Re: Waveform Minibar (mod)

Reply #229
Case
When using the minibar with CUI, you can add it to the toolbars area. Is it possible to make this work for DUI as well?
“We are not stuff that abides, but patterns that perpetuate themselves.” – Norbert Wiener

Re: Waveform Minibar (mod)

Reply #230
Unfortunately Default UI doesn't support that.

Re: Waveform Minibar (mod)

Reply #231
I am noticing some more weird behaviours with chaptered MKVs. With normal separate audio files and nothing playing, if I select one file and then another, each time the wavebar will clear whatever it was showing and start generating the waveform for that file and displaying it as it's generated, even if it interrupted the generation of the previous file, as expected.

If I select different tracks from within the same chaptered MKV file with a cleared minibar.db, the first chapter I select will start generating visually and correctly from the beginning, and then if I interrupt it by selecting a new track, the waveform will stop updating but will not clear. Then only once the waveform for the new track is generated just beyond the point (% in the track) that the previous track was interrupted at will the waveform refresh with the new track's waveform. ie. the new waveform data only replaces the old one in the bar once it is longer (in %) than the previously showing waveform. Once a waveform for a track is generated completely, it won't be replacable, so whatever track you select in the MKV, the waveform won't change until you select a different file completely.

Sorry this explanation is so verbose  :-X

Re: Waveform Minibar (mod)

Reply #232
I have tried my best to reproduce this issue but switching subsongs in slow-to-decode MKV file doesn't trigger such problems here. I see the scan progress for each subsong in realtime when I switch between the parts.

Re: Waveform Minibar (mod)

Reply #233
Hmm, thank you for investigating. I just tried on a clean install and I couldn't reproduce it either, so I tried just deleting the *.cfg file for the component and now it works, even after restoring my settings. Strange!

Re: Waveform Minibar (mod)

Reply #234
Feature request made in another topic and confirmed by Case as a possibility (I'm leaving this here just as a reminder) :

Minibar is blocked by foo_spotify, it doesn't allow opening decoders for any other purpose but realtime playback. I could circumvent that but as Spotify only allows a single decoder at a time it would break actual playback.
Building the waveform afterwards from data that has been played is a possibility. I may consider looking into it if I ever get too much spare time.

Re: Waveform Minibar (mod)

Reply #235
Thanks to the developer for this really nice plugin mod.
Suggestion: it would be nice to have an option in the context menu, as in original:
  • Extract waveform signature, if missing

Re: Waveform Minibar (mod)

Reply #236
Unexpected behaviour : using Affix Silence DSP component to insert a n seconds silence at the beginning of a track, when clicking on Play, Minibar cursor immediately starts travelling through the waveform. Then when it reaches n seconds (when the music starts to play), it stops for n seconds (the time for the music to catch up), then resumes normal operation. I don't think that's to be expected. Expected would be for the Minibar cursor not to show up until n seconds, then start travelling. What do you think @Case ?

Re: Waveform Minibar (mod)

Reply #237
The position is reported by the core. If you enable standard seekbar you'll see it behaves identically. DSPs that manipulate playback length can cause such small glitches.

Re: Waveform Minibar (mod)

Reply #238
Sounds great. It's not an important issue in any way. I still believe the core should be modified to report the correct position, but it won't keep me from sleeping.

Re: Waveform Minibar (mod)

Reply #239
Suggestion: it would be nice to have an option in the context menu, as in original:
  • Extract waveform signature, if missing
New version out with added context menu command for generating waveform only for new tracks. Also added Columns UI button state support for the "Halt minibar processing" option.

Re: Waveform Minibar (mod)

Reply #240
Sorry, i was not able to send a private letter.

Thank you for so rapid implementation. Unfortunately, using it gives me a constant error:

failure_00000001.txt

Re: Waveform Minibar (mod)

Reply #241
__

Re: Waveform Minibar (mod)

Reply #242
It looks like you didn't submit a crash. Could you share the minidump that crash creates?
Edit: Actually it's probably not needed. I could replicate the crash when testing the feature on a larger set.

Re: Waveform Minibar (mod)

Reply #243
Sorry about that, very silly bug. Fixed version uploaded.

 

Re: Waveform Minibar (mod)

Reply #245
Maybe this is not intended behavior.
I noticed that cursor movement is not smooth (there is some stuttering) when scrolling through playlist only if smooth scrolling is enabled at advanced DUI display settings.

foobar2000 1.6.2
waveform minibar 1.0.40
Somewhere, there's someone dying in a foreign land
Meanwhile, the world is crying stupidity of man
Tell me why, tell me why

Re: Waveform Minibar (mod)

Reply #246
That is certainly not a bug in the component and I'm not sure if it can be circumvented. All other motion in foobar2000 seems to be halted while the smooth scroll event is being processed. Built-in seekbar stops, toolbar visualizations stop, visualization components stop, playback time display in status bar stops...

Re: Waveform Minibar (mod)

Reply #247
I see. Thanks for clarification.
Somewhere, there's someone dying in a foreign land
Meanwhile, the world is crying stupidity of man
Tell me why, tell me why

Re: Waveform Minibar (mod)

Reply #248
I found a somewhat decent workaround for those who need to see stereo waveform from time to time (see attachment).
1. Enter layout editing mode
2. Replace waveform element with splitter (top/bottom)
3. Add foo_wave_seekbar (old component) and foo_wave_minibar_mod (this component) to newly created splitter.
4. Exit layout editing mode

Now you can drag splitter's middle line up and down to "switch" between foo_wave_seekbar and foo_wave_minibar_mod
Some additional tips:
1. Lock splitter's height so you don't accidentally change whole element's height when switching between waveforms
2. Disable writing to DB for waveform component you use less. For foo_wave_minibar_mod there's a setting, for foo_wave_seekbar you need to change wavecache.db file to read-only

Re: Waveform Minibar (mod)

Reply #249
Awesome! This minibar is so much optimized compared to the old one in term of speed and size of the db file generated.
I've a demand on multichannel browsing. Would it be possible to add an option of multichannel support to cater this need?
Please consider as I believe this feature would be very useful for many users. Thanks.