Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Convert ogg to mp3

  1. #1
    Join Date
    May 2010
    Beans
    14

    Convert ogg to mp3

    I have a few ogg files that I want to put on my phone. My phone doesn't play oggs, so I need to convert. It's just an audiobook so I really don't care about quality. Oddly, nothing I try seems to be up to the task. Here's what I tried so far:

    sox my.ogg my.mp3:

    "sox FAIL formats: can't open output file `x.mp3': SoX was compiled without MP3 encoding support"

    mencoder:
    wants video too?? Wha??

    vlc (from GUI):
    "p, li { white-space: pre-wrapStreaming / Transcoding failed: It seems your FFMPEG (libavcodec) installation lacks the following encoder:
    MPEG Audio layer 1/2/3.
    If you don't know how to fix this, ask for support from your distribution.

    This is not an error inside VLC media player.
    Do not contact the VideoLAN project about this issue."

    lame my.ogg my.mp3:
    "sorry, vorbis support in LAME is deprecated."

    audicity (via GUI):
    success..but I'm now going to have to somehow script it.

    This is very annoying. It makes me want to rip directly into mp3 from now on. Is there an easy way to convert an ogg file to an mp3 from the command-line?

  2. #2
    Join Date
    Jun 2009
    Location
    Oregon
    Beans
    403

    Re: Convert ogg to mp3

    Although mainly a GUI tool, sound converter (package: soundconverter) has a basic command-line interface. The GUI is also pretty slick - just set up your conversion options and drag in the files or folders you'd like to convert.

    I use it all the time to convert ogg to mp3.

  3. #3
    Join Date
    Nov 2008
    Location
    #!
    Beans
    1,749

    Re: Convert ogg to mp3

    Quote Originally Posted by PhilGil View Post
    Although mainly a GUI tool, sound converter (package: soundconverter) has a basic command-line interface. The GUI is also pretty slick - just set up your conversion options and drag in the files or folders you'd like to convert.

    I use it all the time to convert ogg to mp3.
    Same here but if you overclock like I do, watch out when doing mass conversions because it will heat that processor up.

  4. #4
    Join Date
    Dec 2009
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Convert ogg to mp3


  5. #5
    Join Date
    Jun 2008
    Location
    Byron, CA, USA
    Beans
    574
    Distro
    Ubuntu 20.04 Focal Fossa

    Thumbs up Re: Convert ogg to mp3

    Quote Originally Posted by PhilGil View Post
    Although mainly a GUI tool, sound converter (package: soundconverter) has a basic command-line interface. The GUI is also pretty slick - just set up your conversion options and drag in the files or folders you'd like to convert....
    Thanks for the tip; I may be using this package in the near future. In 10.04, as of 17 September 2010, GNOME Sound Recorder cannot generate MP3 direct from analog, but it will do Ogg Vorbis object files. I presume that Sound Converter has a Manual page for it? It would definitely help, in terms of completing the metadata for the MPEG-1 Level 3 audio files that I need to synthesize.
    nVIDIA® nForce® chipsets require discrete GPU's up to Pascal and appropriate nVIDIA Kernel modules.
    Most intel® ExpressSets™ and AMD® RS-Series are fully supported in open source.

  6. #6
    Join Date
    Jun 2007
    Beans
    14,790

    Re: Convert ogg to mp3

    How about building your own sox with mp3 support?

  7. #7
    Join Date
    Aug 2009
    Location
    Brisbane
    Beans
    3,779

    Re: Convert ogg to mp3

    Quote Originally Posted by PhilGil View Post
    Although mainly a GUI tool, sound converter (package: soundconverter) has a basic command-line interface. The GUI is also pretty slick - just set up your conversion options and drag in the files or folders you'd like to convert.
    Soundkonvter (KDE, as if that kwasnt kobvious LOL) works well too.

    I onyl use it for .flac-> MP3 conversions for my probtable media player. It will play .flac, but with 6GB of memory I just cant fit enough .flacs on it. Also MP3 album art actually works, flac album art doesnt work on my player.

  8. #8
    Join Date
    Dec 2006
    Beans
    7,349

    Re: Convert ogg to mp3

    The problem of SoX being unable to transcode to mp3 is one that is often raised on these forums, perhaps you would be interested in enabling full mp3 support? The following works under the 32 bit Lucid Lynx, it may work under the 64 bit version but I have not tested this. You will need to have the Universe Repository enabled as well as the 'Source Code' option.

    First install some build tools:

    Code:
    sudo apt-get install build-essential fakeroot dpkg-dev devscripts
    Next install the build dependencies for SoX as well as the new one of libmp3lame-dev:

    Code:
    sudo apt-get build-dep sox
    sudo apt-get install libmp3lame-dev
    Then pick up the source:

    Code:
    cd $HOME/Desktop && mkdir build && cd build
    apt-get source sox
    cd sox-14.3.0
    Now remove the option that blocks mp3 encoding, add libmp3lame-dev to the build depends, remove the warning about mp3 writing, rebuild the packages, install them and finally clean the source:

    Code:
    sed -i 's/--without-lame //' debian/rules
    sed -i 's/libmagic-dev, /libmagic-dev, libmp3lame-dev, /' debian/control
    sed -i 's/Write support not available yet.//' debian/control
    fakeroot debian/rules binary
    sudo dpkg -i ../*.deb
    fakeroot debian/rules clean
    Now you can encode to mp3 with Sox .

    Andrew
    You think that's air you're breathing now?

  9. #9
    Join Date
    Jun 2007
    Beans
    14,790

    Re: Convert ogg to mp3

    Get the uncrippled version of sox from: https://launchpad.net/~dtl131/+archi...acks/+packages

  10. #10
    Join Date
    Nov 2007
    Location
    Weat Virginia
    Beans
    2
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Convert ogg to mp3

    So having installed SOX as per above and being in a directory with an ogg file with the filename of SOS.ogg here is my command line.

    Code:
    sox SOS.ogg SOS.mp3
    and I get the following

    sox FAIL formats: can't open input file `SOS.ogg': No such file or directory
    If I try

    Code:
    sox ./SOS.ogg SOS.mp3
    I get

    sox FAIL formats: can't open input file `./SOS.ogg': No such file or directory
    What am I doing wrong?

    Thanks,
    Mike

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •