Subsonic transcoding fails during playback

Need help? Post your questions here.

Moderator: moderators

Subsonic transcoding fails during playback

Postby jpspyro » Mon Dec 13, 2010 6:17 pm

I have subsonic 4.2 running on an Ubuntu 10.10 system under tomcat6. My problem is that 80% of the time, when streaming mp3 (vbr or cbr), flac, aac, etc...) the transcoding process seems to die or freeze up some time during the process of transcoding the song and streaming it.

I am using the default lame pkg in Ubuntu, and have created a symlink to the /var/subsonic/transcode directory.

This only seems to occur while using the web-based player, when I use my android phone everything works just fine. (Granted I'm not standing in a dead zone, Sprint coverage around here is quite weak :roll:)

I've tested the web player on many computers and many different networks.

I don't think it's a bandwidth issue, I have 18MB down, 2MB up. And I know it's not a hardware issue either. (Dedicated Quad-core, 4GB ram)


Any help would be much appreciated.
jpspyro
 
Posts: 5
Joined: Mon Dec 13, 2010 6:07 pm

Postby stozher » Mon Dec 13, 2010 7:43 pm

Install latest FFmpeg from Debian Multimedia repository: http://debian-multimedia.org/

Check with this settings (read also my second post):
http://forum.subsonic.org/forum/viewtop ... 8197#18197

Check also with this settings (* > mp3):
ffmpeg -i %s -f mp3 -acodec libmp3lame -ar 44100 -ab 320k -ac 2 -map_meta_data 0:0 -

Step 2 is a blank on first and second transcodings... Increase memory for SS my be help too!
User avatar
stozher
 
Posts: 313
Joined: Tue Nov 16, 2010 10:56 am
Location: Sofia, Bulgaria

Postby jpspyro » Mon Dec 13, 2010 11:25 pm

I am really only interested in:
mp3 (vbr/cbr) > mp3
flac > mp3
wav > mp3

I am assuming by * > mp3, you mean all the default/existing transcoding options?

And by Step 2 is blank on first and second transcodings, you mean wav and flac?

Attached is what my Settings > Transcoding looks like.

Image

Also, what about Settings > Advanced > Downspample command? Is this the mp3 > mp3 streaming command?

In essence, what I am getting from your post, is that I should use ffmpeg for mp3 transcoding instead of lame. Correct me if I am wrong.


Thanks for the help. That post about ffmpeg was very informative.
jpspyro
 
Posts: 5
Joined: Mon Dec 13, 2010 6:07 pm

Postby stozher » Tue Dec 14, 2010 10:25 am

http://forum.subsonic.org/forum/viewtopic.php?t=4841

7. Then press i to insert and type the following. [inserted JAVA_OPTS: "256m" is a 256MB - increase if needed]
Code: Select all
# Tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
export JAVA_OPTS="-Xmx256m"

case $1 in
start)
        sh /usr/local/tomcat6/bin/startup.sh
        ;;
stop)   
        sh /usr/local/tomcat6/bin/shutdown.sh
        ;;
restart)
        sh /usr/local/tomcat6/bin/shutdown.sh
        sh /usr/local/tomcat6/bin/startup.sh
        ;;
esac   
exit 0


Install latest FFmpeg and create "ffmpeg" link in "/var/subsonic/transcoding" directory to point "/usr/bin/ffmpeg"...

I use fixed bitrate for transcoding. Users not allowed to change bitrate. If you don't like this I write workaround. The main problem is a SS 4.2 version (don't parse correctly %b option - http://forum.subsonic.org/forum/viewtopic.php?p=17205#17205). [bold is a bitrate - change if needed]

Downsample command: ffmpeg -i %s -f mp3 -acodec libmp3lame -ar 44100 -ab 320k -ac 2 -map_meta_data 0:0 -

Name | Convert from | Convert to | Step 1 | Step 2 [blank, none]

flac > mp3 | flac | mp3 | ffmpeg -i %s -f mp3 -acodec libmp3lame -ar 44100 -ab 320k -ac 2 -map_meta_data 0:0 - |

wav > mp3 | wav | mp3 | ffmpeg -i %s -f mp3 -acodec libmp3lame -ar 44100 -ab 320k -ac 2 -map_meta_data 0:0 - |

...

[...] > mp3 | [...] | mp3 | ffmpeg -i %s -f mp3 -acodec libmp3lame -ar 44100 -ab 320k -ac 2 -map_meta_data 0:0 - |

Remove unused transcoding rows. This decrease pause between tracks...
User avatar
stozher
 
Posts: 313
Joined: Tue Nov 16, 2010 10:56 am
Location: Sofia, Bulgaria

Postby jpspyro » Wed Dec 15, 2010 2:46 am

Thanks for the help and advice. I have actually narrowed it down to an upstream limitation issue with my router and modem.

Apparently 2MB upstream is not cutting it or there is some bottleneck in my network.
jpspyro
 
Posts: 5
Joined: Mon Dec 13, 2010 6:07 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 11 guests