Transcoding Ogg --> MP3

Need help? Post your questions here.

Moderator: moderators

Transcoding Ogg --> MP3

Postby woloi » Fri Feb 08, 2008 3:04 pm

I have a significant number of ogg files, which is fine for when I'm home with Amarok/Winamp depending on which computer I'm on. However, if I'm using another computer that does not have an ogg decoder, the transcoding feature sounds great!

I have oggdec and lame installed on my Linux computer, and just to be safe I've even linked /var/subsonic/transcode/oggdec and /var/subsonic/transcode/lame to the actual binaries. When I look in the subsonic.log file, it appears as if it transcodes the entire file from ogg to mp3, but then fails to play.

Code: Select all
[2008-02-08 14:52:29,320] DEBUG InputStreamReaderThread - (/var/subsonic/transcode/oggdec)      [100.0%]
[2008-02-08 14:52:29,320] DEBUG InputStreamReaderThread - (/var/subsonic/transcode/lame) Assuming raw pcm input file
[2008-02-08 14:52:29,325] DEBUG InputStreamReaderThread - (/var/subsonic/transcode/lame) LAME 3.97 64bits (http://www.mp3dev.org/)
[2008-02-08 14:52:29,325] DEBUG InputStreamReaderThread - (/var/subsonic/transcode/lame) Using polyphase lowpass filter, transition band: 16538 Hz - 17071 Hz
[2008-02-08 14:52:29,325] DEBUG InputStreamReaderThread - (/var/subsonic/transcode/lame) Encoding <stdin> to <stdout>
[2008-02-08 14:52:29,325] DEBUG InputStreamReaderThread - (/var/subsonic/transcode/lame) Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=3


This stream fails to play in the webplayer as well as Winamp. Unchecking the ogg>mp3 transcode box results in a ogg stream being sent to Winamp, which does play ok. Any ideas?
woloi
 
Posts: 2
Joined: Fri Feb 08, 2008 2:58 pm

Postby woloi » Fri Feb 08, 2008 3:13 pm

I figured it out right after I posted...

The default setting for ogg>mp3 is missing a dash after the -o.

Original: oggdec %s -o
Correct: oggdec %s -o -

Without that dash, it will not output to stdout, and since lame is expecting a stdin for an input, of course nothing ever happens and it just hangs. Everything seems to be working now though! :D
woloi
 
Posts: 2
Joined: Fri Feb 08, 2008 2:58 pm

Postby Ikyo » Fri Feb 08, 2008 5:12 pm

I would also suggest taking a look at a script that I posted a little while back. It interfaces in with mplayer. If Mplayer can play the file, this script will transcode anything and send it into lame.

http://forum.subsonic.org/forum/viewtopic.php?t=671
Ikyo
 
Posts: 58
Joined: Wed Nov 30, 2005 12:07 am

Postby masa6614 » Tue Feb 16, 2010 4:10 pm

what should i put in the step1 and step2 fields within subsonic?
masa6614
 
Posts: 2
Joined: Tue Feb 16, 2010 4:07 pm

Postby masa6614 » Tue Feb 23, 2010 6:04 pm

nevermind

step1: oggdec %s -o

step2: lame -b %b - -
masa6614
 
Posts: 2
Joined: Tue Feb 16, 2010 4:07 pm

Postby grigorianz » Fri Mar 25, 2011 6:21 am

grigorianz
 
Posts: 1
Joined: Fri Mar 25, 2011 6:07 am

ogg --> mp3 transcoding working under Linux

Postby Josholith » Wed Apr 20, 2011 5:54 pm

My configuration that is currently working to stream/transcode ogg --> mp3 under Linux (openSUSE 11.4 server, running the WAR version of Subsonic 4.4 in Tomcat):

Step 1:
oggdec -Q -o /dev/stdout %s

Step 2:
lame -b %b - -

Note, the -Q option in step 1 is optional, but without it, you will get hundreds of lines in your subsonic.log showing useless percent% completion stats from the oggdec process.

Hope it works for you.
Josholith
 
Posts: 1
Joined: Wed Apr 20, 2011 5:46 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 17 guests