Bypass max transcode bit-rate

Need help? Post your questions here.

Moderator: moderators

Bypass max transcode bit-rate

Postby DeathCon » Mon Mar 06, 2017 6:06 pm

Hi.

I've been trying to get subsonic to playback FLAC files with replaygain.
After some fiddling with the transcoder settings I was finally able to get subsonic to transcode FLAC files with replaygain to mp3 using the following settings:

Step 1: sox %s --replay-gain album -t wav - Step 2: ffmpeg -i - -map 0:0 -b:a %bk -v 0 -f mp3 -

Now if I remove step 2 from the chain, an external player (tomahawk in this case) will start to play the file, but stop anywhere between 5-60 sec depending on the bit-rate. The log will then contain a bunch of info I'm unable to decipher anything from.

I believe the error is caused by the bit-rate setting used to calculate the amount of data to transcode or send to the client. Fortunately I can back this theory up with some math by using the following example:

A 2-channel .wav file with a samplerate of 44,1kHz and a bit-depth of 16bit has a bit-rate of 1411.2 kbps (2*44100*16). Now let's say the song in the .wav file last for 2 minutes and 55 seconds, resulting in a file size of approx. 30.9 MB (14112000 * (60*2+55)/10^6/8). Attempting to stream this .wav file with bit-rate settings at "No limit" will cause the client to stop playing after approx. 39.5 sec, which can be calculated the following way: 320kbps / 1411kbps * (60*2+55) = 39.69 sec.

This means that the "No limit" bit-rate setting actually has a limit of 320kbps.

My question is as follows: Is there by any means a way to bypass this limit?


The following is the log info from a playback attempt:

Code: Select all
[2017-03-06 18:43:25,663] WARN RESTFilter - Error in REST API: EofException
org.mortbay.jetty.EofException
   at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760)
   at org.mortbay.jetty.AbstractGenerator$Output.blockForOutput(AbstractGenerator.java:546)
   at org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:567)
   at org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:907)
   at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:628)
   at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:575)
   at net.sourceforge.subsonic.controller.StreamController.handleRequest(StreamController.java:256)
   at net.sourceforge.subsonic.controller.RESTController.stream(RESTController.java:1544)
   at sun.reflect.GeneratedMethodAccessor744.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:473)
   at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:410)
   at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
   at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
   at org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:81)
   at org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:148)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   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:166)
   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 net.sourceforge.subsonic.security.RESTRequestParameterProcessingFilter.doFilter(RESTRequestParameterProcessingFilter.java:113)
   at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
   at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
   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.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.RESTFilter.doFilter(RESTFilter.java:60)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:59)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
   at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
   at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
   at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:313)
   at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
   at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
   at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
   at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host
   at sun.nio.ch.SocketDispatcher.write0(Native Method)
   at sun.nio.ch.SocketDispatcher.write(Unknown Source)
   at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
   at sun.nio.ch.IOUtil.write(Unknown Source)
   at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
   at org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:166)
   at org.mortbay.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:208)
   at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:693)
   ... 70 more

[2017-03-06 18:43:25,665] ERROR JAXBWriter - Failed to marshal JAXB
java.lang.IllegalStateException: STREAM
   at org.mortbay.jetty.Response.getWriter(Response.java:583)
   at net.sourceforge.subsonic.controller.JAXBWriter.writeResponse(JAXBWriter.java:140)
   at net.sourceforge.subsonic.controller.JAXBWriter.writeErrorResponse(JAXBWriter.java:154)
   at net.sourceforge.subsonic.filter.RESTFilter.handleException(RESTFilter.java:76)
   at net.sourceforge.subsonic.filter.RESTFilter.doFilter(RESTFilter.java:62)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:59)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
   at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
   at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
   at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:313)
   at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
   at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
   at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
   at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

[2017-03-06 18:43:25,666] ERROR RESTFilter - Failed to write error response.
java.lang.IllegalStateException: STREAM
   at org.mortbay.jetty.Response.getWriter(Response.java:583)
   at net.sourceforge.subsonic.controller.JAXBWriter.writeResponse(JAXBWriter.java:140)
   at net.sourceforge.subsonic.controller.JAXBWriter.writeErrorResponse(JAXBWriter.java:154)
   at net.sourceforge.subsonic.filter.RESTFilter.handleException(RESTFilter.java:76)
   at net.sourceforge.subsonic.filter.RESTFilter.doFilter(RESTFilter.java:62)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:59)
   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
   at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
   at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
   at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:313)
   at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
   at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
   at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
   at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

[2017-03-06 18:43:25,720] INFO TranscodeInputStream - Starting transcoder: c:\subsonic\transcode\sox E:\Music\1990s\2007 - Cookies\02. See You at the Lights.flac --replay-gain album -t wav -
DeathCon
 
Posts: 6
Joined: Sun Jan 15, 2017 1:10 pm

Re: Bypass max transcode bit-rate

Postby DeathCon » Tue Mar 14, 2017 11:28 am

Update and bump.

After migrating the server to a Windows 10 machine, I no longer receive any errors in the log. The playback still stops short from finishing as previously described and can be recreated in the web player.

Thanks for any help in advance.

The log now looks as follows:

Code: Select all
[3/14/17 12:20:52 PM CET]   INFO   TranscodeInputStream   Starting transcoder: c:\subsonic\transcode\sox E:\Music\The Radio Dept\2010 - Clinging To A Scheme\03 This Time Aroud.flac --replay-gain album -t wav -
[3/14/17 12:20:53 PM CET]   INFO   AudioScrobblerService   Successfully registered now playing for song 'This Time Aroud' for user deathcon32 at Last.fm: Tue Mar 14 12:20:52 CET 2017
[3/14/17 12:21:26 PM CET]   INFO   AudioScrobblerService   Successfully registered submission for song 'This Time Aroud' for user deathcon32 at Last.fm: Tue Mar 14 12:21:25 CET 2017
[3/14/17 12:21:43 PM CET]   INFO   TranscodeInputStream   Starting transcoder: c:\subsonic\transcode\sox E:\Music\The Radio Dept\2010 - Clinging To A Scheme\04 Never Follow Suit.flac --replay-gain album -t wav -
[3/14/17 12:21:44 PM CET]   INFO   AudioScrobblerService   Successfully registered now playing for song 'Never Follow Suit' for user deathcon32 at Last.fm: Tue Mar 14 12:21:43 CET 2017
[3/14/17 12:22:18 PM CET]   INFO   AudioScrobblerService   Successfully registered submission for song 'Never Follow Suit' for user deathcon32 at Last.fm: Tue Mar 14 12:22:17 CET 2017
[3/14/17 12:22:40 PM CET]   INFO   TranscodeInputStream   Starting transcoder: c:\subsonic\transcode\sox E:\Music\The Radio Dept\2010 - Clinging To A Scheme\05 A Token Of Gratitude.flac --replay-gain album -t wav -
[3/14/17 12:22:41 PM CET]   INFO   AudioScrobblerService   Successfully registered now playing for song 'A Token Of Gratitude' for user deathcon32 at Last.fm: Tue Mar 14 12:22:40 CET 2017
[3/14/17 12:23:14 PM CET]   INFO   AudioScrobblerService   Successfully registered submission for song 'A Token Of Gratitude' for user deathcon32 at Last.fm: Tue Mar 14 12:23:13 CET 2017
[3/14/17 12:23:37 PM CET]   INFO   TranscodeInputStream   Starting transcoder: c:\subsonic\transcode\sox E:\Music\The Radio Dept\2010 - Clinging To A Scheme\06 The Video Dept..flac --replay-gain album -t wav -
[3/14/17 12:23:37 PM CET]   INFO   AudioScrobblerService   Successfully registered now playing for song 'The Video Dept.' for user deathcon32 at Last.fm: Tue Mar 14 12:23:37 CET 2017
[3/14/17 12:24:04 PM CET]   INFO   AudioScrobblerService   Successfully registered submission for song 'The Video Dept.' for user deathcon32 at Last.fm: Tue Mar 14 12:24:03 CET 2017
[3/14/17 12:24:23 PM CET]   INFO   TranscodeInputStream   Starting transcoder: c:\subsonic\transcode\sox E:\Music\The Radio Dept\2010 - Clinging To A Scheme\07 Memory Loss.flac --replay-gain album -t wav -
[3/14/17 12:24:24 PM CET]   INFO   AudioScrobblerService   Successfully registered now playing for song 'Memory Loss' for user deathcon32 at Last.fm: Tue Mar 14 12:24:23 CET 2017
[3/14/17 12:25:03 PM CET]   INFO   AudioScrobblerService   Successfully registered submission for song 'Memory Loss' for user deathcon32 at Last.fm: Tue Mar 14 12:25:02 CET 2017
[3/14/17 12:25:22 PM CET]   INFO   TranscodeInputStream   Starting transcoder: c:\subsonic\transcode\sox E:\Music\The Radio Dept\2010 - Clinging To A Scheme\08 David.flac --replay-gain album -t wav -
[3/14/17 12:25:23 PM CET]   INFO   AudioScrobblerService   Successfully registered now playing for song 'David' for user deathcon32 at Last.fm: Tue Mar 14 12:25:22 CET 2017
[3/14/17 12:25:49 PM CET]   INFO   AudioScrobblerService   Successfully registered submission for song 'David' for user deathcon32 at Last.fm: Tue Mar 14 12:25:49 CET 2017
[3/14/17 12:26:10 PM CET]   INFO   TranscodeInputStream   Starting transcoder: c:\subsonic\transcode\sox E:\Music\The Radio Dept\2010 - Clinging To A Scheme\09 Four Months In The Shade.flac --replay-gain album -t wav -
[3/14/17 12:26:11 PM CET]   INFO   AudioScrobblerService   Successfully registered now playing for song 'Four Months In The Shade' for user deathcon32 at Last.fm: Tue Mar 14 12:26:10 CET 2017
[3/14/17 12:26:13 PM CET]   INFO   AudioScrobblerService   Successfully registered submission for song 'Four Months In The Shade' for user deathcon32 at Last.fm: Tue Mar 14 12:26:12 CET 2017
[3/14/17 12:26:35 PM CET]   INFO   TranscodeInputStream   Starting transcoder: c:\subsonic\transcode\sox E:\Music\The Radio Dept\2010 - Clinging To A Scheme\10 You Stopped Making Sense.flac --replay-gain album -t wav -
[3/14/17 12:26:36 PM CET]   INFO   AudioScrobblerService   Successfully registered now playing for song 'You Stopped Making Sense' for user deathcon32 at Last.fm: Tue Mar 14 12:26:35 CET 2017
[3/14/17 12:27:10 PM CET]   INFO   AudioScrobblerService   Successfully registered submission for song 'You Stopped Making Sense' for user deathcon32 at Last.fm: Tue Mar 14 12:27:09 CET 2017
DeathCon
 
Posts: 6
Joined: Sun Jan 15, 2017 1:10 pm

Re: Bypass max transcode bit-rate

Postby DeathCon » Thu Mar 23, 2017 9:59 am

Bumping again after a week of inactivity
DeathCon
 
Posts: 6
Joined: Sun Jan 15, 2017 1:10 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 14 guests