Results 1 to 5 of 5

Thread: How do I convert an ogv file to an ogg or mp3 file (or really ANY audio file)?

  1. #1
    Join Date
    Mar 2007
    Location
    New York City
    Beans
    108
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    How do I convert an ogv file to an ogg or mp3 file (or really ANY audio file)?

    I would like to convert OGV files to audio format.If someone knows how, I would really appreciate their help.

    -Desi

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Beans
    535
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How do I convert an ogv file to an ogg or mp3 file (or really ANY audio file)?

    There is a command line program called pacpl that can convert between various audio formats and also convert the sound from various video formats into audio files. Install it, open a terminal and enter
    Code:
    man pacpl
    DMedia - Distributed Media Library
    LaVida - A simulation game for Linux
    AskUbuntu

  3. #3
    Join Date
    Jan 2009
    Location
    USA! goin downhill tho :(
    Beans
    403
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How do I convert an ogv file to an ogg or mp3 file (or really ANY audio file)?

    A simple method is to install soundconverter.

    Code:
    sudo apt-get install soundconverter
    It is smart enough to ignore video and just convert the sound.

  4. #4
    Join Date
    Oct 2007
    Beans
    183
    Distro
    Ubuntu 12.10 Quantal Quetzal

    ogv -> soundconverter -> mp3

    Quote Originally Posted by NFblaze View Post
    install soundconverter.
    Thanks! does the job, though slow, but it's scriptable. Here's the bash scriptlet I used to get MP3 from a conference video. (Hopefully tweakable to suit others' needs. Comment out the `eval` to see what you're doing before you do it.)

    Code:
    URI="http://www.archive.org/download/IntroductionToRepresentingSpatialObjectsInR/1_3_Bivand_a.ogv"
    OUTPUT_MIMETYPE='audio/mpeg'
    OUTPUT_SUFFIX='.mp3'
    FN="$(basename ${URI})"
    DIR='${HOME}/docs/GEOSTAT2011SummerSchool'
    # FP="${DIR}/${FN}" # soundconverter chokes on paths
    FP="./${FN}" # and pushd/popd
    START="$(date)"
    echo -e "START=${START}"
    for CMD in \
      "mkdir -p ${DIR}" \
      "pushd ${DIR}" \
      "wget -c -O "${FP}" "${URI}"" \
      "soundconverter -b -s '${OUTPUT_SUFFIX}' -m '${OUTPUT_MIMETYPE}' '${FP}'" \
      "popd" \
    ; do
      echo -e "$ ${CMD}"
      eval "${CMD}"
    done
    END="$(date)"
    echo -e "  END=${END}"
    echo -e "START=${START}"
    python -c "from datetime import * ; from dateutil import parser ; start=parser.parse(\"${START}\") ; end=parser.parse(\"${END}\") ; print (end-start).seconds"
    Output was like

    Code:
    Length: 31910532 (30M) [video/ogg]
    ...
    2011-08-22 12:40:17 (671 KB/s) - “./1_3_Bivand_a.ogv” saved [31910532/31910532]
    # download time=46 s, totally dominated by following
    $ soundconverter -b -s '.mp3' -m 'audio/mpeg' './1_3_Bivand_a.ogv'
    SoundConverter 1.4.4
      using Gstreamer version: 0.10.35, Python binding version: 0.10.21
      using gio
      using 2 thread(s)
    ...
      END=Mon Aug 22 12:48:59 EDT 2011
    START=Mon Aug 22 12:39:30 EDT 2011
    569
    So it took 569 s (~9.5 min) to convert a 30 MB video (of which 46 s (8%) was download time) on my medium-grade laptop

    Code:
    me@it:~$ inxi -SCMI
    System:    Host: it Kernel: 2.6.39-2-amd64 x86_64 (64 bit) Desktop Gnome 2.30.2 Distro: Linux Mint Debian Edition
    Machine:   Mobo: System76 model: Pangolin Performance version: panp5 Bios: Phoenix version: 1.02.22 date: 04/06/2009
    CPU:       Dual core Intel Core2 Duo CPU T6500 (-MCP-) cache: 2048 KB flags: (lm nx sse sse2 sse3 sse4_1 ssse3)
               Clock Speeds: 1: 1200.00 MHz 2: 1200.00 MHz
    Info:      Processes: 149 Uptime: 14:47 Memory: 1400.0/3933.9MB Client: Shell inxi: 1.7.23
    Sound quality equal to original.
    Last edited by tlroche; August 22nd, 2011 at 09:38 PM. Reason: improve script

  5. #5
    Join Date
    Mar 2011
    Location
    Pizza Hut
    Beans
    1,209
    Distro
    Kubuntu 13.10 Saucy Salamander

    Re: ogv -> soundconverter -> mp3

    You could also use VLC (which is what I do). Here are some instructions (note that you can convert any supported video format to any supported audio format, not just the ones used in this tutorial).
    Ubuntu user #35115 - Linux user #555707 - My Ubuntu Wik page
    Join the Ubuntu Forums' IRC room (#ubuntuforums on irc.freenode.net)!

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
  •