Skip to main content

Topic: foo_wave_seekbar (Read 539612 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Rollin
  • [*][*][*][*]
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.

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
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.

  • EpicForever
  • [*][*][*][*][*]
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.
  • Last Edit: 19 November, 2017, 04:22:45 PM by EpicForever

  • EpicForever
  • [*][*][*][*][*]
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 :)
  • Last Edit: 21 November, 2017, 03:45:24 PM by EpicForever

  • EpicForever
  • [*][*][*][*][*]
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!
  • Last Edit: 23 November, 2017, 04:31:11 PM by EpicForever

  • Case
  • [*][*][*][*][*]
  • Developer (Donating)
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

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
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.

  • Case
  • [*][*][*][*][*]
  • Developer (Donating)
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.