Page 1 of 1

mp3 > ogg Transcoding

PostPosted: Tue May 10, 2011 11:27 am
by IceFreak2000
I'd like to set up mp3 > ogg transcoding for my Android device to help reduce the bandwidth required when connecting over 3G, but I can't seem to get the settings right.

I'm running Subsonic 4.4 on Windows 2008, and have oggenc2 in the transcode folder.

I've tried using this two-step process:

Step 1:
Code: Select all
lame -S --decode %s -

Step 2:
Code: Select all
oggenc2 -Q -b %b -o - -


but this generates the following error in the log:

Code: Select all
Starting transcoder: [c:\subsonic\transcode\lame] [-S] [--decode] [C:\Music\Boards of Canada\Music Has the Right to Children\17 One Very Important Thought.mp3] [-]
Starting transcoder: [c:\subsonic\transcode\oggenc2] [-Q] [-b] [2147483647] [-o] [-] [-]
(c:\subsonic\transcode\oggenc2) Mode initialisation failed: invalid parameters for bitrate


Any clues as to what I'm doing wrong?

Many thanks

PostPosted: Tue May 10, 2011 12:15 pm
by GJ51
ffmpeg -i %s -f wav -

lame -b %b - -

Works on my Server 08 R2 install. Ther is a folder OGG Music on the server that uses these settings. Click Server link below for demo.

PostPosted: Tue May 10, 2011 12:37 pm
by IceFreak2000
I think you've misunderstood what I'm asking Gary; I want to transcode to OGG from MP3

PostPosted: Tue May 10, 2011 12:55 pm
by IceFreak2000
OK, I've just tried the following one-step transcode setting

Code: Select all
ffmpeg -v 0 -i %s -f ogg -vn -acodec libvorbis -ar 44100 -ab %bk -ac 2 -map_meta_data 0:0 -


that I found here http://forum.subsonic.org/forum/viewtopic.php?t=5121, but I'm getting the following in my log files:

Code: Select all
[5/10/11 1:46:49 PM BST] DEBUG TranscodeInputStream Starting transcoder: [c:\subsonic\transcode\ffmpeg] [-v] [0] [-i] [C:\Music\Alice In Chains\Jar Of Flies\04 No Excuses.mp3] [-f] [ogg] [-vn] [-acodec] [libvorbis] [-ar] [44100] [-ab] [2147483647k] [-ac] [2] [-map_meta_data] [0:0] 
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) FFmpeg version SVN-r21231-Sherpya, Copyright (c) 2000-2010 Fabrice Bellard, et al.
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) built on Jan 16 2010 05:42:31 with gcc 4.2.5 20080919 (prerelease) [Sherpya]
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavutil 50. 7. 0 / 50. 7. 0
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavcodec 52.47. 0 / 52.47. 0
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavformat 52.47. 0 / 52.47. 0
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavdevice 52. 2. 0 / 52. 2. 0
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libavfilter 1.15. 0 / 1.15. 0
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libswscale 0. 8. 0 / 0. 8. 0
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) libpostproc 51. 2. 0 / 51. 2. 0
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) [mp3 @ 02d922e0]max_analyze_duration reached
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Input #0, mp3, from 'C:\Music\Alice In Chains\Jar Of Flies\04 No Excuses.mp3':
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Metadata:
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TALB : Jar Of Flies
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TPE1 : Alice in Chains
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TPE2 : Alice in Chains
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TCOM : Jerry Cantrell
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TCON : Alternative
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TPUB : Columbia Europe
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TIT2 : No Excuses
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TRCK : 04/07
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) TYER : 1993
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Duration: 00:04:15.63, start: 0.000000, bitrate: 192 kb/s
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0: Audio: mp3, 44100 Hz, 2 channels, s16, 192 kb/s
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) [NULL @ 014f6c40]Value 2147483647000.000000 for parameter 'ab' out of range
[5/10/11 1:46:50 PM BST] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Invalid value '2147483647k' for option 'ab'


So, something is up with the %b expansion for the 'ab' option; anyone seen this before?

PostPosted: Tue May 10, 2011 1:37 pm
by GJ51
IceFreak2000 wrote:I think you've misunderstood what I'm asking Gary; I want to transcode to OGG from MP3


My bad. Reminds me of the dyslexic Jew who was always walking around saying, "Yo."

This might be of some help:

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

PostPosted: Wed May 11, 2011 5:10 pm
by yourlord
in all cases you are trying to transcode to a 2147483647Kbps stream which is pretty much absurdly invalid.

You need to track down how your requested bitrate is getting set to 2147483647..

Try changing the encoder line to force the bitrate to something like 128 or something and see if it transcodes. If it does, you can either hunt down how %b is getting replaced with a bogus value, or just live with the hard coded bitrates.