Talk:Madsonic

From SME Server
Revision as of 05:59, 11 February 2014 by Unnilennium (talk | contribs)
Jump to navigation Jump to search

to play as jukebox on the server

first you need to change ffmpeg, it is too recent for our kernel !

  1. /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


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....


alternatively :

vim /usr/bin/madsonic

Adding after -verbose:gc \ line

 '-Djavax.sound.sampled.SourceDataLine=#Intel [plughw:0,0]'\

should work ...



http://forum.subsonic.org/forum/viewtopic.php?t=2038 http://gravyflex.wordpress.com/2013/10/18/supersonic-subsonic-jukebox-mode-config/