Problems with new release candidate?

106 views
Skip to first unread message

Gandhi

unread,
Sep 6, 2012, 12:17:35 PM9/6/12
to brute...@googlegroups.com
Greetings, fellow brutes,

I'm having problems with this new and exiting, currently unreleased, version of BrutefirDRC and would appreciate some pointers in the right direction. The version is from Sourceforge as of 2012-08-08, with a few simple alterations made by me.

In a nutshell: BrutefirDRC works for me, but not with resampling, neither up nor down.

When I read through the other posts, I get the distinct impression that resampling works for the developers, so maybe I'm doing something stupid? But what?

My system
  • Mini-ITX VIA EPIA EN15000G (sluggish but sufficient).
  • Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-generic i686).
  • Logitech Media Server 7.7.2 - r33893 @ Wed Mar 14 05:46:46 PDT 2012.
  • Transporter and Booms.
  • FLAC files and MP3 radio streams.

My changes to BrutefirDRC
  • To avoid error messages in the LMS plugin page, I've changed all instances of
    Plugins:: to Slim::Plugin:: in install.xml, Plugin.pm and Settings.pm.
  • To avoid warning messages regarding deprecation in the LMS logfile, I've changed:
    • Slim::Web::HTTP::protectName to Slim::Web::HTTP::CSRF->protectName in Settings.pm.
    • Slim::Web::HTTP::protectURI to Slim::Web::HTTP::CSRF->protectURI in Settings.pm.

My problems
Now, two problems occur while using my eq test filter, one benign and one malign:
  • Error message regarding tail file not found, se log excerpt below.
    This only occurs sometimes, perhaps only the first time after restarting LMS, when there for obvious reasons is no tail file to be found.  Anyway, I get audio output and the delay function in the filter works, so everything's probably fine.
  • Error message regarding resampling not working, se log excerpt below.
    I get no audio output.

Excerpts from brutefir.log

When no resampling is required (audio works)

======== brutefirwrapper rev 10 starting at 1346493600 2012-09-01 10:00:00
Traceback (most recent call last):
  File "/usr/share/perl5/Slim/Plugin/BrutefirDrc/Bin/brutefirwrapper", line 437, in read_tail
    age = time.time()-os.stat(tail_filename).st_mtime
OSError: [Errno 2] No such file or directory: '/tmp/.BrutefirDrc-115/tail-00_04_20_1f_68_59.pcm'
Output follows (0.346s)

BruteFIR v1.0k (March 2009)                                   (c) Anders Torger

Internal resolution is 64 bit floating point.
Creating 4 FFTW plans of size 16384...finished.
Loading coefficient set...finished.
Dither table size is 960001 bytes.
Generating random numbers...finished.
Estimated CPU clock rate is 1496.744 MHz. CPU count is 1.
Creating inverse inplace FFTW plan of size 32768 using wisdom...finished
Audio processing starts now
Readahead complete (7.398s)


When resampling is required (no audio)

======== brutefirwrapper rev 10 starting at 1346494037 2012-09-01 10:07:17
Resampling brutefir filter from 48000 to 44100
Traceback (most recent call last):
  File "/usr/share/perl5/Slim/Plugin/BrutefirDrc/Bin/brutefirwrapper", line 550, in <module>
    main()
  File "/usr/share/perl5/Slim/Plugin/BrutefirDrc/Bin/brutefirwrapper", line 119, in main
    filter(in_format,filter_name,detect_out_format(filter_name),client_id,samplerate,opts.stream_format,opts.allow_patching,opts.copy_sample_format,opts.dump_output)
  File "/usr/share/perl5/Slim/Plugin/BrutefirDrc/Bin/brutefirwrapper", line 125, in filter
    cmdline.append(check_filter(brutefir_filter,client_id,samplerate,in_format,copy_sample_format))
  File "/usr/share/perl5/Slim/Plugin/BrutefirDrc/Bin/brutefirwrapper", line 176, in check_filter
    filter_body = patch_samplerate(filter_body,samplerate)
  File "/usr/share/perl5/Slim/Plugin/BrutefirDrc/Bin/brutefirwrapper", line 226, in patch_samplerate
    filter_body,junk = re.subn(r'\bfilename\s*:\s*"(.*)"\s*;',resample_filter,filter_body)
  File "/usr/lib/python2.7/re.py", line 162, in subn
    return _compile(pattern, flags).subn(repl, string, count)
  File "/usr/share/perl5/Slim/Plugin/BrutefirDrc/Bin/brutefirwrapper", line 220, in resample_filter
    'rate','-v',str(samplerate),
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory


Listing of filter names

me@home:/etc/squeezeboxserver/BrutefirDrc$ ll filters
totalt 24
drwxr-xr-x 2 squeezeboxserver nogroup 4096 sep  4 16:50 ./
drwxr-xr-x 4 squeezeboxserver nogroup 4096 aug 26 16:51 ../
-rw-r--r-- 1 squeezeboxserver nogroup 2643 aug 26 12:23 filter_no_EQ_template.txt
-rw-r--r-- 1 squeezeboxserver nogroup 3393 aug 26 12:52 filter_with_EQ_template.txt
-rw-r--r-- 1 squeezeboxserver nogroup 3962 aug 28 18:57 filter_with_EQ_test44100.txt
-rw-r--r-- 1 squeezeboxserver nogroup 3962 sep  1 11:59 filter_with_EQ_test48000.txt

me@home:/etc/squeezeboxserver/BrutefirDrc$ ll settings
totalt 20
drwxr-xr-x 2 squeezeboxserver nogroup 4096 sep  4 16:53 ./
drwxr-xr-x 4 squeezeboxserver nogroup 4096 aug 26 16:51 ../
lrwxrwxrwx 1 squeezeboxserver nogroup   70 sep  4 16:53 filter-00_04_20_1f_68_59 -> /etc/squeezeboxserver/BrutefirDrc/filters/filter_with_EQ_test48000.txt
-rw-r--r-- 1 squeezeboxserver nogroup 4814 sep  4 16:54 wisdom


My eq test filter, a simplified version of filter_with_EQ_template.txt

## DEFAULT GENERAL SETTINGS ##

float_bits: 64;             # internal floating point precision
sampling_rate: 48000;       # sampling rate in Hz of audio interfaces
filter_length: 8192,16;     # length of filters
overflow_warnings: true;    # echo warnings to stderr if overflow occurs
show_progress: false;       # echo filtering progress to stderr
max_dither_table_size: 0;   # maximum size in bytes of precalculated dither
allow_poll_mode: false;     # allow use of input poll mode
modules_path: ".";          # extra path where to find BruteFIR modules
monitor_rate: false;        # monitor sample rate
powersave: true;            # pause filtering when input is zero
lock_memory: false;         # try to lock memory if realtime prio is set
convolver_config: "/etc/squeezeboxserver/BrutefirDrc/settings/wisdom"; # location of convolver config file

logic:
"eq"  {
        {
                coeff: "equalizer";
                bands: "ISO octave";
                magnitude: 31.5/0.0, 63/0.0, 125/0.0, 250/0.0, 500/0.0, 1000/0.0, 2000/0.0, 4000/0.0, 8000/0.0, 16000/0.0;
        };
};

coeff "equalizer" {
        filename: "dirac pulse";
        shared_mem: true;
        blocks: 4;
};

## INPUT DEFAULTS ##

input "l_in","r_in" {
device: "file" {path: "/dev/stdin";}; # module and parameters to get audio
sample: "S24_LE"; # sample format
channels: 2/0,1; # number of open channels / which to use
delay: 0,0; # delay in samples for each channel
maxdelay: -1; # max delay for variable delays
mute: false,false; # mute active on startup for each channel
};

## OUTPUT DEFAULTS ##

output "l_out","r_out" {
device: "file" {path: "/dev/stdout";}; # module and parameters to put audio
sample: "S24_LE"; # sample format
channels: 2/0,1; # number of open channels / which to use
delay: 0,0; # delay in samples for each channel
maxdelay: -1; # max delay for variable delays
mute: false,false; # mute active on startup for each channel
dither: true; # apply dither
};

# Add equalizer

filter "eq_l" {
from_inputs: "l_in"/0.0;
to_outputs: "l_out";
process: -1; # process index to run in (-1 means auto)
coeff: "equalizer";
delay: 7; # predelay, in blocks
crossfade: false; # crossfade when coefficient is changed
};

filter "eq_r" {
from_inputs: "r_in"/0.0;
to_outputs: "r_out";
process: -1; # process index to run in (-1 means auto)
coeff: "equalizer";
delay: 0; # predelay, in blocks
crossfade: false; # crossfade when coefficient is changed
};

I really appreciate your good work with this plugin!

Best Regards,
  Gandhi

Olav Sunde

unread,
Sep 7, 2012, 3:49:06 AM9/7/12
to brute...@googlegroups.com

I have the plugin running with two different installations. One is Vortexbox, a Fedora based distro - currently FE16. Python version here is 2.7.3. The other is a ReadyNas box. Os is Debian based and python is 2.4.4. I run LMS 7.8beta on both, but earlier versions also ran BrutefirDRC just fine. The first log output is normal and can be ignored. I've never seen anything like the second output. Did you have the plugin working properly at any time? The current files at git may not be completely functional together as a new version is worked on. Klaas and Toby are busy elsewhere at the moment so BrutefirDRC progress is rather slow.

Gandhi

unread,
Sep 8, 2012, 4:40:57 AM9/8/12
to brute...@googlegroups.com

Thank you Olav for your answer.

My Python version is also 2.7.3.

I've only had the new version of the plugin working as supposed without resampling. I did however have BrutefirDRC version 1.2.0 working correctly for about a year, but I removed it a few months ago and my system has changed a little bit since. No major changes as far as I know, just the regular daily Ubuntu updates, but of course that might still be the issue here.

Perhaps I'm just too eager. :-) I'll try to pace myself and wait for the official release and see if that helps.

Best Regards,
  Gandhi

Olav Sunde

unread,
Sep 8, 2012, 11:04:13 AM9/8/12
to brute...@googlegroups.com
Hi Gandhi

eagerness is good in my book. Klaas has just said in another thread that he'll have the new release ready in a week or so. In the meantime you have PM. It contains files quite close to the release version. The cleanup you have done to get rid of error messages is interesting. If the cleanup works with the new files, maybe you could mail these to Klaas and me ?

Gandhi

unread,
Sep 8, 2012, 11:31:00 AM9/8/12
to brute...@googlegroups.com
Thanks Olav,

I'll check out the new files and let you know. The cleanup I've done is very modest, but if I can help out I will, of course.

Best Regards,
  Gandhi

Gandhi

unread,
Sep 9, 2012, 3:02:05 AM9/9/12
to brute...@googlegroups.com
Hello Olav and Klaas,

I have sent you both a PM with an attached archive.

As I previously mentioned, I had made a few changes in my own copy of the new release:
  1. To avoid error messages in the LMS plugin page, I had changed all instances of

  1. Plugins:: to Slim::Plugin:: in install.xml, Plugin.pm and Settings.pm.

  1. To avoid warning messages regarding deprecation in the LMS logfile, I had changed:
  • Slim::Web::HTTP::protectName to Slim::Web::HTTP::CSRF->protectName in Settings.pm.
  • Slim::Web::HTTP::protectURI to Slim::Web::HTTP::CSRF->protectURI in Settings.pm.

I believe that 1) only applies to my own installation, as I (for some forgotten reason) have put my plugin files in a non-standard location. Therefore, I have not changed this in the attached archive. (Should the need occur in your installations, I'm happy to do it.)

As for 2), I don't know if the changes are strictly necessary at this time, but since there actually are warnings (or maybe errors) in the LMS log file, it's probably better to fix them sooner than later. Therefore, I have fixed them in the file Settings_Gandhi.pm in the attached archive.

Also, please note that I don't speak Python. I have merely been trying to make the new release candidate work in my system. On the way I stumbled upon the problems above and solved them by making a few simple changes.

Anyway, if I can be of any further assistance, don't hesitate to ask. At least I should be able to test new stuff out. DRC is interesting. I am also hooked on my Squeezeboxes.

Best Regards,
  Gandhi

Olav Sunde

unread,
Sep 9, 2012, 3:57:14 AM9/9/12
to brute...@googlegroups.com
Hi Gandhi

you forgot to tell us if the version I sent you worked in your setup?

Gandhi

unread,
Sep 9, 2012, 6:53:03 AM9/9/12
to brute...@googlegroups.com
Hey Olav,

thank you very much for the new set of files.

This morning, I just wanted to send the small changes to you and Klaas, as I had other things to attend to and because testing a new set of files potentially could be time consuming. But now I have tried them out.

Without resampling BrutefirDrc worked, just like before.

With resampling I got very helpful error messages this time, se below.

After copying the null filters (convolution files) null-65k48-l.pcm and null-65k48-r.pcm to the required file names left.pcm and right.pcm, BrutefirDrc worked perfectly with resampling!

Obviously these filters are needed even when using only using the eq part of the filter, when resampling. My mistake was to think they were only necessary when explicitly using DRC through convolution.

======== brutefirwrapper rev 10 starting at 1347184305 2012-09-09 09:51:45
Resampling brutefir filter from 44100 to 48000
sox FAIL formats: can't open input file `/etc/squeezeboxserver/BrutefirDrc/filters/left.pcm': No such file or directory

Traceback (most recent call last):
  File "/usr/share/squeezeboxserver/Plugins/BrutefirDrc/Bin/brutefirwrapper", line 550, in <module>
    main()
  File "/usr/share/squeezeboxserver/Plugins/BrutefirDrc/Bin/brutefirwrapper", line 119, in main
    filter(in_format,filter_name,detect_out_format

(filter_name),client_id,samplerate,opts.stream_format,opts.allow_patching,opts.copy_sample_format,opts.dump_output)
  File "/usr/share/squeezeboxserver/Plugins/BrutefirDrc/Bin/brutefirwrapper", line 125, in filter
    cmdline.append(check_filter(brutefir_filter,client_id,samplerate,in_format,copy_sample_format))
  File "/usr/share/squeezeboxserver/Plugins/BrutefirDrc/Bin/brutefirwrapper", line 176, in check_filter
    filter_body = patch_samplerate(filter_body,samplerate)
  File "/usr/share/squeezeboxserver/Plugins/BrutefirDrc/Bin/brutefirwrapper", line 226, in patch_samplerate

    filter_body,junk = re.subn(r'\bfilename\s*:\s*"(.*)"\s*;',resample_filter,filter_body)
  File "/usr/lib/python2.7/re.py", line 162, in subn
    return _compile(pattern, flags).subn(repl, string, count)
  File "/usr/share/squeezeboxserver/Plugins/BrutefirDrc/Bin/brutefirwrapper", line 224, in resample_filter
    filter_lengths.append(os.stat(output_pcm_filename).st_size//4)
OSError: [Errno 2] No such file or directory: '/tmp/.BrutefirDrc-115/left.pcm-48000'

The world is now a happier place!

Best Regards,
  Gandhi

Olav Sunde

unread,
Sep 9, 2012, 8:17:37 AM9/9/12
to brute...@googlegroups.com

Good to hear!
The three sample filter files should all work. I have tested this extensively. sample_eq.txt contains no reference to the filter .pcm files. It's just an equalizer and should work for you provided paths are correct. Just replace with your own EQ settings.
I'll leave it to Klaas to decide on including the fixes you have provided. He wrote the plugin except for brutefirwrapper so If he can find time I am sure he will look at it.

Arthur Cheng

unread,
Sep 18, 2012, 12:38:47 PM9/18/12
to brute...@googlegroups.com
Any news for the possible release date?

Ackcheng

Olav Sunde

unread,
Sep 23, 2012, 9:24:15 AM9/23/12
to brute...@googlegroups.com
Hi Arthur, a new release is not far away, but I can not give a date. I was hoping Klaas would respond here as he is the maintainer. Maybe he has found something that needs attention before posting the new release.

Mervin Beng

unread,
Oct 31, 2012, 9:12:33 AM10/31/12
to brute...@googlegroups.com

Hi all,

Where can I get the latest version of brutefirwrapper? Mine is working fine, but I'd like to see what has changed.

I moved my server from ubuntu natty to precise, and FYI there was quite a lot of difficulty getting brutefirDRC going again. What happened is that the "-s" format option in sox has been removed, so sox failed completely. It has to be replaced with "-e signed-integer". Also it's worth changing "-3" to "-b 24".

Best regards,
Mervin

Olav Sunde

unread,
Nov 3, 2012, 7:35:35 AM11/3/12
to brute...@googlegroups.com
Hi Mervin,
I'll send the same set of files to you as I sent to Gandhi. The newest version of brutefirwrapper is there. The sox versions I have is 14.3.2 on my Vortexbox (Fedora 16) and 14.3.0 on my Readynas. The sox version that comes with LMS 7.8beta is 14.3.0. One work around could be to use this with brutefirwrapper, but I agree that updating brutefirwrapper to use new syntax is preferred.

I am still waiting for Klaas to have time to create a new version of BrutefirDRC.

Olav

Klaas Reineke

unread,
Nov 26, 2012, 4:37:40 PM11/26/12
to brute...@googlegroups.com
I posted it in the wrong thread, so here again. The new release is out. Please test it! I did not test the new conversion files with the fix for the new sox syntax.

Regards Klaas

Reply all
Reply to author
Forward
0 new messages