Help - Search - Members - Calendar
Full Version: Running Foobar in Linux
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Pages: 1, 2, 3, 4, 5
TheTravis
QUOTE

Are the files DRM protected?


No sad.gif
I have only about 10 wma files so I can encode them again to mp3 and the problem is solved. I just wouldn't want to loose any audio quality.

edit. fail
towa
Is there any way I can use my remote control with foobar running in wine? I have installed lirc and it works for my linux applications (mplayer, vlc,...) but I don't know how to get it to work with foobar. In windows I use the winlirc plugin, but i cant get it to work with lirc in ubuntu. I tried connecting it to localhost:8765 which should be the default port for lirc, but the plugin won't connect. Or do I have to use the .lircrc file just like I do for mplayer. If so, then what commands can I use (prog = ? and config = ? in the .lircrc file)
plukin
how does lirc works? does it run a simple bash script, does it sends "keyboard shortcuts" to the desktop environment or through another pipeline to reach the application?
the first option would be the best, just get the script from above and edit the config file for lirc...
with shortcuts it should be no problem, too.
bye
towa
thanks for your suggestions. I can run scripts with my remote control using irexec. In the .lircrc file this looks like this:

CODE
begin
    remote = Philips/SBC-RP
    prog = irexec
    button = blue/play
    config = /path/to/script/foobarscript -play
    repeat = 0
    delay = 0
end


and this works. There's only one small problem. When I'm using mplayer to watch a movie and I touch a button that I would also use in foobar (like the play button) it will start up foobar and music will start to play.

the code for controlling mplayer looks like this:

CODE
begin
    remote = Philips/SBC-RP
    prog = mplayer
    button = blue/play
    config = pause
    repeat = 0
    delay = 0
end


so the play button only affects mplayer if it's already open, but it always affects foobar, even if it's not already running. Is there anyway I can modify the script you posted so it only works if foobar is already running?

thanks
plukin
with the following code snip you can "ask" if fb2k runs already...
if you know a little bash you can easily modify the original script wink.gif
CODE
#!/bin/bash

ps -e | grep foobar2000.exe
if [ $? -eq 0 ]; then
    echo "fb2k runs"
else
    echo "fb2k doesn't run"
fi
towa
QUOTE(plukin @ Jun 16 2008, 23:55) *

with the following code snip you can "ask" if fb2k runs already...
if you know a little bash you can easily modify the original script wink.gif


I did not know a little bash, but it was easy enough to understand your code and modify the script. Thank you for your help. Everything works as it should now (although it might not be the most efficient way of using lirc for foobar). Now I don't have any reason to go back to windows any more smile.gif
towa
QUOTE(janjan @ May 7 2008, 02:50) *

I have a problem with foo_facts: The background color is always white in the facet boxes are always white. Except that, everything works fine so far.

using ubuntu 8.04 and wine 0.9.61


I had the same problem. I don't know how to fix it, but I did find a workaround. If you use a facet with more then one column, you will see that only the first column is white, the other columns behave normally. So I created a duplicate column for every facet (for example: a column named wineartist and one named artist which both have %<album artist>% as pattern). The first column (wineartist) can be hidden by dragging it until it's width is zero.
pozp
I tried some recent wine on ubuntu 8.04 and noticed the following.
  • Default UI: statusbar doesn't update in custom rendering mode.
  • Run service: sending URL to browser works (wine 1.0-rc4 or lower)
kanak
Enabling Font-Smoothing or How to avoid font ugliness
I just discovered that Font Smooting can be enabled for wine apps by making the following change to the user.reg file in your .wine directory:
QUOTE

"FontSmoothing"="0"

to
QUOTE

"FontSmoothing"="1"


Works wonders for the "normal fonts", but not as good as in Windows for Cleartype Fonts (Calbri, Segoe, etc).

micha2
Hi!

I am running foobar 0.9.5.2 in wine 1.0. Most Features I need are working, except of the Equalizer (crashes foobar) and Audio-CD-Support - drives are available in wine, but foobar is not able to open an audio-cd "No CD drives found" appaers, when I try to open one.
Is there a way to get audio-cd-support working? I would really like to rip cds with foobar...Thanx a lot for help!
janjan
QUOTE(towa @ Jun 17 2008, 01:56) *

I had the same problem. I don't know how to fix it, but I did find a workaround. If you use a facet with more then one column, you will see that only the first column is white, the other columns behave normally. So I created a duplicate column for every facet (for example: a column named wineartist and one named artist which both have %<album artist>% as pattern). The first column (wineartist) can be hidden by dragging it until it's width is zero.


That's awesome, thank you for this idea smile.gif

edit: nevertheless I will post a report about this on wine bugzilla
qwazi7
QUOTE(janjan @ Jun 29 2008, 08:01) *

QUOTE(towa @ Jun 17 2008, 01:56) *

I had the same problem. I don't know how to fix it, but I did find a workaround. If you use a facet with more then one column, you will see that only the first column is white, the other columns behave normally. So I created a duplicate column for every facet (for example: a column named wineartist and one named artist which both have %<album artist>% as pattern). The first column (wineartist) can be hidden by dragging it until it's width is zero.


That's awesome, thank you for this idea smile.gif

edit: nevertheless I will post a report about this on wine bugzilla


I'm not sure why, but for me ALL of my facet columns have this issue. I'm using nvidia 173 drivers on ubuntu with compiz-fusion. Anyone else share this problem with all the facet columns?
Neasden
Is it possible to establish the very used set of Win32/DLLs to enable the native DLLs foobar2000 uses, inside WINE? How much stable would foobar2000 be after that? That's a very good idea to consider!!!

Cheers
CannibalZerg
Hi all!

Couple words about Foobar&WINE. It's works quite well, but I don't like WINE limitation about 8 or 16 bps.
I have EMU0404 USB soundcard (yes, Alsa support is still quite buggy) and default sound stream, sending to hardware is 24bps.
I found this document: http://www.nabble.com/winealsa:-Use-S24_3L...td13191677.html
It seems, that WINE Alsa plugin support more than 16pbs sound stream. So I decide to change DefaultBitsPerSample in user.reg
Well, it works (using "file" plugin for alsa you can see what exactly WINE sends to Alsa) BUT: with 24bps Foobar hangs after playback pause or stop; 32bps - volume control in Foobar has no effect, volume is 100% and doesn't matter in wat position volume slider is blink.gif I don't realy understand WHY????? Replay Gain and Equalizer works well.
I thougt, that volume control in Foobar is simple ''software attenuator', like ReplayGain, for example, am I wrong?
metamorphoise
thanks to everyone who worked on this script! it was just the thing to tie foobar2000 into fluxbox using the keys file biggrin.gif

is there any way to make the script seek backwards and forwards in a song? i suspect you can do it with the -command= or -playing_command= arguments, but i have not figured it out yet....


QUOTE(jason_taverner @ Apr 20 2008, 03:58) *

Funny how these things go ... an hour of typing stuff into emacs later, I've "tuned" that script a little.

Now it handles spaces correctly, and will canonicalise file paths.

You can find it here: http://jyujin.de/~creidiki/foobar2000.bash

metamorphoise
QUOTE(jason_taverner @ Apr 20 2008, 03:58) *

Funny how these things go ... an hour of typing stuff into emacs later, I've "tuned" that script a little.

Now it handles spaces correctly, and will canonicalise file paths.

You can find it here: http://jyujin.de/~creidiki/foobar2000.bash


my first try at bash scripting - i have modified this script slightly to include a recursive -adddir argument

i also tried to have the -add argument detect if it was given a directory and behave accordingly; but it's not necessary and it didn't work first try so i gave up tongue.gif
i have left my thoughts if the file (### commented out) so if anyone would to fix it, please let me know!


another thing....has anyone got foobars context:"open containing folder" to work? like open it up in thunar or xterm or whatever...

CODE

#!/bin/bash

# set this to what's needed to run foobar.
# for example, if you have binfmt_misc setup
# for wine, something like this will work.
# otherwise, "wine path-to-foobar" is what you want.
fb2k="/home/t/.foobar2000"

direc () {
cd canonicalise$1
pwd
}
canonicalise () {
filename="${1}"
# prefix replacement
case "${1}" in
/*)
# absolute, nothing to do.
;;
~*)
# home-relative and for some odd reason calling shell
# didnt expand this already (for ex. it was quoted).
filename="${HOME}/${filename}"
;;
*/)
# directory,
;;
*)
# relative path.
filename="$(pwd)/${filename}"
;;
esac
# strip './' elements
filename=$(echo "${filename}" | sed -e 's:/\./:/:g')
# strip 'foo/../' elements
filename=$(echo "${filename}" | sed -e 's:/[^/]\+/\.\./:/:g')
# protect real backslashes
filename=$(echo "${filename}" | sed -e 's/\\/\\\\/g')
file="${filename}"
unset filename
}

case "${1}" in
-add)
### case "${1}" in
### */)
### echo "ADDING DIRECTORY"
### canonicalise "${2}"
### cd "$file"
### fb -addfiles *
### echo "Result: added $2 to foobar2000"
### ;;
### *)
[[ -n ${2} ]] && canonicalise "${2}"
${fb2k}/foobar2000.exe /add "z:$file" & &>/dev/null
echo "Action: adding Directory or Files \"${file}\" to foobar2000"
### ;;
### esac
;;
-addfiles)
files=( "${@}" )
for (( i = 1 ; i < ${#} ; ++i )); do
canonicalise "${files[$i]}"
${fb2k}/foobar2000.exe /add "z:${file}" & &>/dev/null
echo "Action: adding $(echo ${file})"
done
echo "Result: added "$(( ${#}-1 ))" files to foobar2000"
;;
-adddir)
canonicalise "${2}"
cd "$file"
fb -addfiles *
echo "Result: added $2 to foobar2000"
;;
-play)
${fb2k}/foobar2000.exe /play & &>/dev/null
echo "Action: play Song in foobar2000"
;;
-pause)
${fb2k}/foobar2000.exe /pause & &>/dev/null
echo "Action: pause Song in foobar2000"
;;
-playpause)
${fb2k}/foobar2000.exe /playpause & &>/dev/null
echo "Action: play or pause Song in foobar2000"
;;
-prev)
${fb2k}/foobar2000.exe /prev & &>/dev/null
echo "Action: play previous Song in foobar2000"
;;
-next)
${fb2k}/foobar2000.exe /next & &>/dev/null
echo "Action: play next Song in foobar2000"
;;
-rand)
${fb2k}/foobar2000.exe /rand & &>/dev/null
echo "Action: play random Song in foobar2000"
;;
-stop)
${fb2k}/foobar2000.exe /stop & &>/dev/null
echo "Action: stop playing a Song in foobar2000"
;;
-mute)
${fb2k}/foobar2000.exe /command:Volume\ mute & &>/dev/null
echo "Action: mute foobar2000"
;;
-volup)
${fb2k}/foobar2000.exe /command:Volume\ up & &>/dev/null
echo "Action: raise Volume in foobar2000"
;;
-voldown)
${fb2k}/foobar2000.exe /command:Volume\ down & &>/dev/null
echo "Action: decrease Volume in foobar2000"
;;
-hide)
${fb2k}/foobar2000.exe /hide & &>/dev/null
echo "Action: hide foobar2000 window"
;;
-show)
${fb2k}/foobar2000.exe /show & &>/dev/null
echo "Action: show foobar2000 window"
;;
-exit)
${fb2k}/foobar2000.exe /exit & &>/dev/null
echo "Action: exit foobar2000"
;;
-rescan)
${fb2k}/foobar2000.exe /command:"Rescan Media Library" & &>/dev/null
echo "Action: Rescan foobar2000 Media Library"
;;
-command-*)
[[ -n ${1} ]] && command=${1##*command-}
${fb2k}/foobar2000.exe /command:"${command}" & &>/dev/null
echo "Action: call foobar2000 with command \"$command\""
;;
-playlist_command-*)
[[ -n ${1} ]] && command=${1##*command-}
${fb2k}/foobar2000.exe /playlist_command:"${command}" & &>/dev/null
echo "Action: call foobar2000 with playlist command \"$command\""
;;
-playing_command-*)
[[ -n ${1} ]] && command=${1##*command-}
${fb2k}/foobar2000.exe /playing_command:"${command}" & &>/dev/null
echo "Action: call foobar2000 with playing command \"$command\""
;;
-help)
echo "Using: foobar2000 [Command]

Where Command can be on of these:
-add -adddir -addfiles -play -pause -playpause -stop -next -prev -rand -mute -volup -voldown -hide -show -rescan -command-[fb2k command] -playlist_command-[fb2k playlist command] -playing_command-[fb2k playing command] -help"
;;
*)
if [[ -n ${1} ]]; then
canonicalise "${1}"
${fb2k}/foobar2000.exe "z:${file}" & &>/dev/null
echo "Action: start foobar2000 with file ${file}"
else
${fb2k}/foobar2000.exe & &>/dev/null
echo "Action: start foobar2000"
fi
;;
esac
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.