Author Topic: BinExtractor  (Read 6886 times)

ilovefb2k

  • Newbie
  • *
  • Posts: 5
Thank you very very much for your help. without your tool, we can not do anything with fb2k Vu Meter.
But your have just made it more fantastic, we can now extract the BIN file on-the-fly,  it works flawlessly.
I'm curious, what is your end-goal for using this BinExtractor tool?
foobar2000's VU meter plugins are (obviously) working fine using .bin VU meters.
So what is it that you do with the extracted images exactly?
hi @hiccup,
as we can not decode the bin file  (as it is beyond our ability  in terms of coding and bin format) although @oops and @BoringName are very kind to give all necessary information. we, then, found that this tool can extract all images of needle, LED and background of a bin.

out of 1024 needle/LED images, we select randomly 1/5 ~ 1024/5 = 205 images scattered  along the meter range. we then, by converting the RMS/Peak signal (signal can be extracted by FFmpeg) into an index value, then we can get the needle/LED image to paint.

why 205, as our observation, a FB2k VU Meter  is roughly around a  100 degree curve (and it is a curve if diameter length (pivot point x,y) is short enough ) = > 100/205 ~ we may have 2 images  per every 1 degree.
on a small screen, this movement id nice enough.

it is not efficient at all, but that is all we have until we may go further.
regards,
@ilovefb2k 

hiccup

  • Hero Member
  • *****
  • Posts: 9111
as we can not decode the bin file ...
Thanks, but that was not was I was really asking.
I asked what your end-goal is for using this tool.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
The author of the jscript panel plugin that ilovefb2k was using to draw the vumeter has cracked the shits and disabled image drawing in his panel once the script queries audio chunk data so that probably brings that saga to a close.

It's a specific change aimed solely at disabling VU Meters with his plugin. Seems a bit spiteful to be honest but there we go.

sveakul

  • Hero Member
  • *****
  • Posts: 3267
It's a specific change aimed solely at disabling VU Meters with his plugin. Seems a bit spiteful to be honest but there we go.
Yes, seems like just a sadistic move because he was irritated that posts about the script meters were clogging his thread.  I made a separate thread just for the meters to alleviate that, and he destroyed the compatibility the same day.  One sad individual.

The meters will continue to run on versions of his JSP3 plugin released from early summer to the 3.8.5 version released 4 days ago so I'm just holding on to the latter for the foreseeable future.  I know he can't touch foo_vis_vumeter but I found/find it fun experimenting with new meter implementations.   A big thank-you to ilovefb2k for his work nailing the AIMP Analog and LVU meters in any case, you are a smart and decent person.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Yes, seems like just a sadistic move because he was irritated that posts about the script meters were clogging his thread.  I made a separate thread just for the meters to alleviate that, and he destroyed the compatibility the same day.  One sad individual.

I have to admit I can see where he is coming from. Extracting 2000 images just for a vumeter is pretty nuts. Especially when other plugins can display the exact same thing with less overhead. He probably thinks he is protecting people from their own stupidity and it's hard to argue he is incorrect in this particular case. Not just the creators of the plugins but anyone down the line that installs it not understanding what it does in the background.

I have to stop myself dismissing things sometimes just because they don't make sense to me. I didn't agree with ilovefb2k's method but I figured if that's what they wanted to do I didn't mind making the change to facilitate it. Marc obviously went the other direction and took it upon himself to stop what he didn't agree with.

Another update - BinExtractor1.2.zip

Changes
- Added a "Save Bin File" button. This will save the currently loaded bin as a single Bin file using LZMA compression. It will be saved in the same location as the loaded bin with "_new" appended to the file name.

I'd done the work so figured it was worth sharing.

Use cases -
- Repackage a bin using BZip2 compression to use LZMA which loads a lot faster.
- Repackage an uncompressed bin to use LZMA compression and take up less space.
- Repackage bin files stored as separate files for left and right meters into a single bin file. eg) Accuphase A-46 1.bin, Accuphase A-46 2.bin will be saved as a single bin file Accuphase A-46 _new.bin. May be handy for skin creators to deploy a single file instead of 2.

hiccup

  • Hero Member
  • *****
  • Posts: 9111
I'm still not sure what ilovefb2k's end-goal for this is/was.
Is it to make it possible to use AIMP skins in foobar2000?
Last Edit: November 24, 2024, 10:25:15 AM by hiccup

sveakul

  • Hero Member
  • *****
  • Posts: 3267
I'm still not sure what the end-goal for this is/was.
Is it to make it possible to use AIMP skins in foobar2000?
No, ilovefb2k wanted to use it to experiment with making BIN meters usable in his JSP3 script meter for foobar2000, after doing a great job already with AIMP Analog and LVU skins.  Yes the plugin foo_vis_vumeter by oops already handles all three with ease, but experimenting with a new display technique was pretty cool even if it didn't conquer the BIN.  Below is a shot of the original hiccup AIMP-version DejaVu Compact LED Calibrated Elemental-mod2 being run in his skin.  The latest version successfully added the "Show Peak with LEDs" selectable option.


BoringName

  • Sr. Member
  • ****
  • Posts: 916
I'm still not sure what ilovefb2k's end-goal for this is/was.
Is it to make it possible to use AIMP skins in foobar2000?

They were using it to implement bin file skins in the jscript plugin for Foobar. I believe they struggled with the code to support it natively so they were extracting the images so they could use their AIMP code instead. It was essentially a very messy work around. Their AIMP implementation probably needs work as well. I can't be too critical, plenty of times I've shoehorned something together in a horrible way just to get it working and then figured out a better way later on.

I'm not really sure what the very end goal was considering oops' plugin already supports them natively which probably has all the configuration options you would need.

hiccup

  • Hero Member
  • *****
  • Posts: 9111
I'm not really sure what the very end goal was considering oops' plugin already supports them natively which probably has all the configuration options you would need.
That's pretty much what I was figuring. So it is/was more of an interesting experiment, possibly for them learning and understanding how to do or not to do things. Without it resulting in anything that can't already be achieved easier and better.

I'm thinking perhaps one thing it might have brought was CUI support for a VU meter, which oops seems reluctant/unwilling to provide or support?
(some rather weird easter-egg stuff having been mentioned regarding that)

It seems that some developers over there can get annoyed about things pretty easily, and have no problem with lashing out to other users, or obstructing them in doing things that they kind-of don't want them to be doing.
Makes me appreciate developers like you even more.
Last Edit: November 24, 2024, 11:37:52 AM by hiccup

sveakul

  • Hero Member
  • *****
  • Posts: 3267
I didn't agree with ilovefb2k's method but I figured if that's what they wanted to do I didn't mind making the change to facilitate it. Marc obviously went the other direction and took it upon himself to stop what he didn't agree with.
With marc2k3 I don't think it went as far as him disagreeing with a method as it was just a surface reaction to his annoyance at the preponderance of the posting level.  He's thrown similar "hissy fits" in the past and didn't hesitate in calling people obscene names when they requested help on modifying a JSP3 project that didn't interest him.

Quote
Another update - BinExtractor1.2.zip

THANKS for this, the ability to convert dual BINs into one and changing compression to a speedy format is great and something even an end-user should feel comfortable with.  Can it change ALL the other compression options to LZMA, or only BZip2 and uncompressed?

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Can it change ALL the other compression options to LZMA, or only BZip2 and uncompressed?

Bin files only come with 3 types of compression. BZip2, LZMA or none.
Last Edit: November 24, 2024, 10:12:06 PM by BoringName

sveakul

  • Hero Member
  • *****
  • Posts: 3267
Can it change ALL the other compression options to LZMA, or only BZip2 and uncompressed?

Bin files only come with 3 types of compression. BZip2, LZMA or none.
OK was asking as I read this AI statement on Google "BIN files often contain critical binary data where preserving the exact information is essential; popular methods include gzip, bzip2, LZMA (LZMA), and XZ depending on the desired compression level and platform compatibility."

BoringName

  • Sr. Member
  • ****
  • Posts: 916
OK was asking as I read this AI statement on Google

Two things for a happier life
1. Don't watch the news.
2. Don't ask AI questions. Especially when it's not even AI. It's just a text predictor using the whole garbage pit of the internet as a source.


phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10268
Two things for a happier life
1. Don't watch the news.
I haven't watched, listened to, or read the news since November 5 and I have found that ignorance is bliss.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here