Difference between revisions of "Talk:Madsonic"

From SME Server
Jump to navigationJump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
you might get this error trying to play music as jukebox (using internal soundcard) :
 +
 +
you should rather do:
 +
 +
https://bugs.contribs.org/show_bug.cgi?id=10700
 +
 +
 +
<code>
 +
tail -f /var/madsonic/madsonic.log
 +
[2020-01-26 10:44:08,478] DEBUG TranscodeInputStream - Starting transcoder: [/var/madsonic/transcode/ffmpeg] [-ss] [0] [-i] [/home/e-smith/files/ibays/musique/files/emon.mp3] [-v] [0] [-f] [au] [-]
 +
[2020-01-26 10:44:08,850] ERROR JukeboxService - Error in jukebox: java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, big-endian is supported.
 +
java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, big-endian is supported.
 +
at javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:479)
 +
at javax.sound.sampled.AudioSystem.getSourceDataLine(AudioSystem.java:606)
 +
at net.sourceforge.subsonic.service.jukebox.AudioPlayer.<init>(AudioPlayer.java:60)
 +
at net.sourceforge.subsonic.service.JukeboxService.play(JukeboxService.java:110)
 +
at net.sourceforge.subsonic.service.JukeboxService.updateJukebox(JukeboxService.java:78)
 +
at net.sourceforge.subsonic.ajax.PlayQueueService.convert(PlayQueueService.java:529)
 +
at net.sourceforge.subsonic.ajax.PlayQueueService.doSkip(PlayQueueService.java:123)
 +
at net.sourceforge.subsonic.ajax.PlayQueueService.skip(PlayQueueService.java:116)
 +
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 +
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 +
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 +
at java.lang.reflect.Method.invoke(Method.java:498)
 +
at org.directwebremoting.impl.CreatorModule$1.doFilter(CreatorModule.java:230)
 +
at org.directwebremoting.impl.CreatorModule.executeMethod(CreatorModule.java:242)
 +
at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:358)
 +
at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:311)
 +
at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:105)
 +
at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:126)
 +
at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:144)
 +
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
 +
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
 +
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
 +
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
 +
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
 +
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
 +
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
 +
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
 +
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
 +
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
 +
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
 +
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
 +
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
 +
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
 +
at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
 +
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
 +
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
 +
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
 +
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
 +
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
 +
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
 +
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
 +
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
 +
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
 +
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
 +
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
 +
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
 +
at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)
 +
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
 +
at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
 +
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
 +
at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:54)
 +
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
 +
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
 +
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
 +
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
 +
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
 +
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
 +
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
 +
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
 +
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
 +
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
 +
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
 +
at org.eclipse.jetty.server.Server.handle(Server.java:370)
 +
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
 +
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
 +
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
 +
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
 +
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
 +
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
 +
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
 +
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
 +
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
 +
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
 +
at java.lang.Thread.run(Thread.java:748)
 +
 +
</code>
 +
 
to play as jukebox on the server
 
to play as jukebox on the server
  
  yum install java-1.7.0-openjdk-devel java-openjdk-devel -y
+
  yum install java-1.8.0-openjdk-devel java-openjdk-devel -y
  
  
Line 49: Line 138:
 
  javax.sound.sampled.TargetDataLine=#Intel [plughw:0,0]
 
  javax.sound.sampled.TargetDataLine=#Intel [plughw:0,0]
  
In my case, file was: /
+
In my case, files were in one of these: /
 +
vim /usr/lib/jvm/java-1.8.0/jre/lib/sound.properties
 
  vim /usr/lib/jvm/java-1.7.0/jre/lib/sound.properties
 
  vim /usr/lib/jvm/java-1.7.0/jre/lib/sound.properties
 
  vim /usr/lib/jvm/java-1.6.0/jre/lib/sound.properties  
 
  vim /usr/lib/jvm/java-1.6.0/jre/lib/sound.properties  
Line 62: Line 152:
 
sources
 
sources
  
http://forum.subsonic.org/forum/viewtopic.php?t=2038
+
 
http://gravyflex.wordpress.com/2013/10/18/supersonic-subsonic-jukebox-mode-config/
+
# http://forum.subsonic.org/forum/viewtopic.php?t=2038
 +
# 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
 +
 
 +
== opensource alternatives ==
 +
 
 +
# https://github.com/airsonic-advanced/airsonic-advanced
 +
# armpache
 +
# nextcloud

Latest revision as of 21:56, 23 July 2022

you might get this error trying to play music as jukebox (using internal soundcard) :

you should rather do:

https://bugs.contribs.org/show_bug.cgi?id=10700


tail -f /var/madsonic/madsonic.log [2020-01-26 10:44:08,478] DEBUG TranscodeInputStream - Starting transcoder: [/var/madsonic/transcode/ffmpeg] [-ss] [0] [-i] [/home/e-smith/files/ibays/musique/files/emon.mp3] [-v] [0] [-f] [au] [-] [2020-01-26 10:44:08,850] ERROR JukeboxService - Error in jukebox: java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, big-endian is supported. java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, big-endian is supported. at javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:479) at javax.sound.sampled.AudioSystem.getSourceDataLine(AudioSystem.java:606) at net.sourceforge.subsonic.service.jukebox.AudioPlayer.<init>(AudioPlayer.java:60) at net.sourceforge.subsonic.service.JukeboxService.play(JukeboxService.java:110) at net.sourceforge.subsonic.service.JukeboxService.updateJukebox(JukeboxService.java:78) at net.sourceforge.subsonic.ajax.PlayQueueService.convert(PlayQueueService.java:529) at net.sourceforge.subsonic.ajax.PlayQueueService.doSkip(PlayQueueService.java:123) at net.sourceforge.subsonic.ajax.PlayQueueService.skip(PlayQueueService.java:116) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.directwebremoting.impl.CreatorModule$1.doFilter(CreatorModule.java:230) at org.directwebremoting.impl.CreatorModule.executeMethod(CreatorModule.java:242) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:358) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:311) at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:105) at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:126) at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:144) at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:54) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:748)

to play as jukebox on the server

yum install java-1.8.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, files were in one of these: /

vim /usr/lib/jvm/java-1.8.0/jre/lib/sound.properties
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

opensource alternatives

  1. https://github.com/airsonic-advanced/airsonic-advanced
  2. armpache
  3. nextcloud