Difference between revisions of "Talk:Madsonic"

From SME Server
Jump to navigationJump to search
Line 1: Line 1:
 
to play as jukebox on the server
 
to play as jukebox on the server
 
first you need to change ffmpeg, it is too recent for our kernel !
 
 
# /var/madsonic/transcode/ffmpeg -i ./01-*
 
FATAL: kernel too old
 
Erreur de segmentation
 
 
I have taken the ffmpeg from the package subsonic for sme it works well
 
 
  mv /var/madsonic/transcode/ffmpeg /var/madsonic/transcode/ffmpeg.old
 
  cp -a /var/subsonic/transcode/ffmpeg /var/madsonic/transcode/
 
 
 
  /var/madsonic/transcode/ffmpeg -i ./01-*
 
ffmpeg version N-31780-gd5d74cf, Copyright (c) 2000-2011 the FFmpeg developers
 
  built on Aug  9 2011 14:18:27 with gcc 4.5.2
 
  configuration: --disable-ffplay --disable-ffprobe --disable-ffserver --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libvpx --enable-libtheora  --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-version3 --enable-bzlib --enable-static --disable-shared --extra- libs=-static --extra-cflags=--static
 
  libavutil    51. 11. 1 / 51. 11. 1
 
  libavcodec  53.  9. 1 / 53.  9. 1
 
  libavformat  53.  6. 0 / 53.  6. 0
 
  libavdevice  53.  2. 0 / 53.  2. 0
 
  libavfilter  2. 28. 1 /  2. 28. 1
 
  libswscale    2.  0. 0 /  2.  0. 0
 
  libpostproc  51.  2. 0 / 51.  2. 0
 
./01-*: No such file or directory
 
 
 
then find your audio device and configure
 
 
  
 
  yum install java-1.7.0-openjdk-devel java-openjdk-devel -y
 
  yum install java-1.7.0-openjdk-devel java-openjdk-devel -y
Line 84: Line 55:
 
that works, but now ALL Java apps on my system output audio to that device - which defeats the purpose of having ONLY music played on that device, avoiding system sounds like incoming mail notifications blowing your ears out at 110 decibels....
 
that works, but now ALL Java apps on my system output audio to that device - which defeats the purpose of having ONLY music played on that device, avoiding system sounds like incoming mail notifications blowing your ears out at 110 decibels....
  
 +
Adding -Djavax.sound.sampled.SourceDataLine="#Audio [plughw:1,0]" to java command line does not work in any combination I could think of, with or without other lines I added to sound.properties file.
  
 
+
Does anyone know how to achieve this for SubSonic only, without using system-wide configuration file?
alternatively :
 
vim /usr/bin/madsonic
 
Adding after -verbose:gc \ line
 
 
 
  '-Djavax.sound.sampled.SourceDataLine=#Intel [plughw:0,0]'\
 
 
 
should work ...
 
 
 
  
  
 +
sources
  
http://forum.subsonic.org/forum/viewtopic.php?t=2038
+
# http://forum.subsonic.org/forum/viewtopic.php?t=2038
http://gravyflex.wordpress.com/2013/10/18/supersonic-subsonic-jukebox-mode-config/
+
# http://gravyflex.wordpress.com/2013/10/18/supersonic-subsonic-jukebox-mode-config/
 +
# http://forum.subsonic.org/forum/viewtopic.php?f=5&t=8374&start=45
 +
# http://mj2p.co.uk/a-raspberry-pi-subsonic-jukebox-using-java-8/
 +
# http://forum.subsonic.org/forum/viewtopic.php?t=2879%29
 +
# http://forum.subsonic.org/forum/viewtopic.php?f=2&t=9303

Revision as of 07:16, 11 February 2014

to play as jukebox on the server

yum install java-1.7.0-openjdk-devel java-openjdk-devel -y


vim audioDevList.java

coder to paste

import java.io.*;
import javax.sound.sampled.*; 

public class audioDevList{
public static void main(String args[]){

//Get and display a list of
// available mixers.

Mixer.Info[] mixerInfo =
AudioSystem.getMixerInfo();
System.out.println("Available mixers:");
for(int cnt = 0; cnt < mixerInfo.length;
cnt++){
System.out.println(mixerInfo[cnt].
getName());
}//end for loop
}
} 

then

javac audioDevList.java
java audioDevList


should return something like

# java audioDevList
Available mixers:
dmix:0 [default]
Intel [plughw:0,0]
Intel [plughw:0,1]
Port Intel [hw:0]

Now edit sound.properties in Java installation used to run SubSonic and add:

javax.sound.sampled.Clip=#Intel [plughw:0,0] javax.sound.sampled.Port=#Port Intel [hw:0] javax.sound.sampled.SourceDataLine=#Intel [plughw:0,0] javax.sound.sampled.TargetDataLine=#Intel [plughw:0,0]

In my case, file was: /

vim /usr/lib/jvm/java-1.7.0/jre/lib/sound.properties
vim /usr/lib/jvm/java-1.6.0/jre/lib/sound.properties 

that works, but now ALL Java apps on my system output audio to that device - which defeats the purpose of having ONLY music played on that device, avoiding system sounds like incoming mail notifications blowing your ears out at 110 decibels....

Adding -Djavax.sound.sampled.SourceDataLine="#Audio [plughw:1,0]" to java command line does not work in any combination I could think of, with or without other lines I added to sound.properties file.

Does anyone know how to achieve this for SubSonic only, without using system-wide configuration file?


sources

  1. http://forum.subsonic.org/forum/viewtopic.php?t=2038
  2. http://gravyflex.wordpress.com/2013/10/18/supersonic-subsonic-jukebox-mode-config/
  3. http://forum.subsonic.org/forum/viewtopic.php?f=5&t=8374&start=45
  4. http://mj2p.co.uk/a-raspberry-pi-subsonic-jukebox-using-java-8/
  5. http://forum.subsonic.org/forum/viewtopic.php?t=2879%29
  6. http://forum.subsonic.org/forum/viewtopic.php?f=2&t=9303