Announcement

Collapse
No announcement yet.

Recommend a video/audio converter.

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Recommend a video/audio converter.

    I use Audacity to convert mp3's into the ogg format, but sometimes I need to extract the audio from .flv or .mp4. I used to use a program called pytube to extract audio (into mp3, then audcity to ogg) but apparently it has been abandoned. OggConvert doesn't convert to audio, but simply makes it into an ogv, often ruining the video quality. Can anyone recommend an application to do this?

    #2
    Hi
    If one cannot get it converted "directly" then possibly use several apps as in the discussion in this thread;

    http://www.kubuntuforums.net/showthr...ile-conversion

    I also keep around:

    SoundKonverter
    Sound Converter
    WinFF

    in addition to Audacity and ffmpeg, and one needs all of the codecs in "restricted", which you should probably already have if you answered the question in the installer.

    woodsmoke
    sigpic
    Love Thy Neighbor Baby!

    Comment


      #3
      Both SoundKonverter and WinFF work great, thank you.

      Oddly, converting an mp4 to ogg the file size was 50mb. Loading it into Audacity and exporting it in the same ogg format reduced it by 3mb. Converting the original mp4 to ogg using WinFF resulted in a 33mb file, Audacity converted it to 45mb. None of them calculate the duration time correctly although the entire duration is there.
      Last edited by Cornova; Sep 11, 2012, 10:52 PM.

      Comment


        #4
        This should work...

        Step 1: probe the file to find the audio bitrate
        Code:
        avprobe [i]inputFile[/i].mp4
        Look for the audio stream info. Example:
        Code:
        steve@x1:~/local/Videos$ [B]avprobe test.mp4[/B]
        avprobe version 0.8.3-6:0.8.3-6ubuntu1, Copyright (c) 2007-2012 the Libav developers
          built on Aug 11 2012 19:25:13 with gcc 4.7.1
        Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
          Metadata:
            major_brand     : mp42
            minor_version   : 0
            compatible_brands: isommp42
            creation_time   : 2012-01-16 11:39:16
          Duration: 00:03:20.70, start: 0.000000, bitrate: 694 kb/s
            Stream #0.0(und): Video: h264 (Constrained Baseline), yuv420p, 640x360, 596 kb/s, 29.97 fps, 29.97 tbr, 60k tbn, 59.94 tbc
            Metadata:
              creation_time   : 1970-01-01 00:00:00
            [B]Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 96 kb/s[/B]
            Metadata:
              creation_time   : 2012-01-16 11:39:16
        Step 2: extract the audio, convert to Vorbis, set bit rate, and save in OGG file:
        Code:
        avconv -i [i]inputFile[/i].mp4 -acodec libvorbis -b [i]bitRate[/i]k -vn -sn [i]outputFile[/i].ogg
        Example:
        Code:
        avconv -i test.mp4 -acodec libvorbis -b 96k -vn -sn test.ogg
        --

        I could not find a way to automatically determine the bit rate and feed it to avconv all in one command.
        Last edited by SteveRiley; Sep 12, 2012, 12:26 AM. Reason: Improved.

        Comment


          #5
          Originally posted by Cornova View Post
          I use Audacity to convert mp3's into the ogg format, but sometimes I need to extract the audio from .flv or .mp4. I used to use a program called pytube to extract audio (into mp3, then audcity to ogg) but apparently it has been abandoned. OggConvert doesn't convert to audio, but simply makes it into an ogv, often ruining the video quality. Can anyone recommend an application to do this?
          I am confused Audacity dose a wonderful job of exporting .flv or .mp4 to .ogg or anything else (mp3,m4a-acc,wav,aiff,gsm,flac,mp2,ac3,amr,wma) ,,,,,,,do you have ffmpeg installed?

          I use it all the time for just this ,,,,,extracting audio from video that is ?

          VINNY
          i7 4core HT 8MB L3 2.9GHz
          16GB RAM
          Nvidia GTX 860M 4GB RAM 1152 cuda cores

          Comment


            #6
            Originally posted by vinnywright View Post
            I am confused Audacity dose a wonderful job of exporting .flv or .mp4 to .ogg or anything else (mp3,m4a-acc,wav,aiff,gsm,flac,mp2,ac3,amr,wma) ,,,,,,,do you have ffmpeg installed?

            I use it all the time for just this ,,,,,extracting audio from video that is ?

            VINNY
            Wow, your right you can do this with Audacity. On Ubuntu 10.04 it would always crash anytime I tried to open anything with video in it. I hadn't tried it on Kubuntu because I assumed it could only read audio.

            It still doesn't show the duration correctly though, maybe that's a problem with the player (VLC)

            Edit: It is VLC, Amarok gauges the duration properly.
            Last edited by Cornova; Sep 12, 2012, 07:30 PM.

            Comment


              #7
              cool ...glad it's working for you now

              VINNY
              i7 4core HT 8MB L3 2.9GHz
              16GB RAM
              Nvidia GTX 860M 4GB RAM 1152 cuda cores

              Comment


                #8
                Originally posted by vinnywright View Post
                cool ...glad it's working for you now

                VINNY
                Thanks.

                What do you guys use for video editing? Like lets say you want to load an mpeg into something like Audacity and export it to ogv. I had an application on 10.04 that would do this but I remember it would change screen so it wasn't full inside the window. OggConvert ruined the video half the time.

                Someone create "Vidacity" lol

                Comment


                  #9
                  Originally posted by Cornova View Post
                  Thanks.

                  What do you guys use for video editing? Like lets say you want to load an mpeg into something like Audacity and export it to ogv. I had an application on 10.04 that would do this but I remember it would change screen so it wasn't full inside the window. OggConvert ruined the video half the time.

                  Someone create "Vidacity" lol
                  try
                  Code:
                  ffmpeg -i file.mpeg file.ogg
                  this will do a simple convert with sane default options and give a .ogg video from the .mpeg you could start with a .mp4 or .flv or or ....and end with .ogg or .mp4 or or whatever you have codecs for

                  VINNY
                  i7 4core HT 8MB L3 2.9GHz
                  16GB RAM
                  Nvidia GTX 860M 4GB RAM 1152 cuda cores

                  Comment


                    #10
                    Originally posted by vinnywright View Post
                    try
                    Code:
                    ffmpeg -i file.mpeg file.ogg
                    this will do a simple convert with sane default options and give a .ogg video from the .mpeg you could start with a .mp4 or .flv or or ....and end with .ogg or .mp4 or or whatever you have codecs for
                    You have to be careful with that when you want to extract a particular stream, though.

                    If your input file is a container holding both a video and an audio stream, and your output file is also a container that's capable of holding both streams, then the simpler command like that will result in a file with both streams. Your "file.ogg" will contain a Theora video stream in addition to an audio stream.

                    To extract just the audio portion, you'll need to use the version of the command I provided earlier. The -vn flag means no video; the -sn flag means no subtitles.

                    Furthermore, it's important to understand which kinds of audio and/or video are supported by which kinds of containers. For instance, an OGG container can hold not only Vorbis audio, but also FLAC audio. So this command:
                    Code:
                    avconv -i file.mp4 -vn -sn file.ogg
                    could create an OGG file containing a FLAC audio stream. To obtain a compressed Vorbis output, it's necessary to indicate which codec to use:
                    Code:
                    avconv -i file.mp4 -acodec libvorbis -vn -sn file.ogg
                    Now, in the case where you're converting to a container format that can't support one or another stream type, LibAV will simply discard the unsupported portion. MP3 files have no facility for containing video, so the command
                    Code:
                    avconv -i file.mp4 file.mp3
                    will result in an MP3 file containing only the audio portion of the original file.

                    To learn the names of the supported codecs, run this:
                    Code:
                    avconv -codecs

                    Comment


                      #11
                      Originally posted by SteveRiley View Post
                      You have to be careful with that when you want to extract a particular stream, though.

                      If your input file is a container holding both a video and an audio stream, and your output file is also a container that's capable of holding both streams, then the simpler command like that will result in a file with both streams. Your "file.ogg" will contain a Theora video stream in addition to an audio stream.

                      To extract just the audio portion, you'll need to use the version of the command I provided earlier. The -vn flag means no video; the -sn flag means no subtitles.

                      Furthermore, it's important to understand which kinds of audio and/or video are supported by which kinds of containers. For instance, an OGG container can hold not only Vorbis audio, but also FLAC audio. So this command:
                      Code:
                      avconv -i file.mp4 -vn -sn file.ogg
                      could create an OGG file containing a FLAC audio stream. To obtain a compressed Vorbis output, it's necessary to indicate which codec to use:
                      Code:
                      avconv -i file.mp4 -acodec libvorbis -vn -sn file.ogg
                      Now, in the case where you're converting to a container format that can't support one or another stream type, LibAV will simply discard the unsupported portion. MP3 files have no facility for containing video, so the command
                      Code:
                      avconv -i file.mp4 file.mp3
                      will result in an MP3 file containing only the audio portion of the original file.

                      To learn the names of the supported codecs, run this:
                      Code:
                      avconv -codecs
                      O so vary true Mr Riley ,,,, and their are a plethora of options that would take pages of text to describe which is why I sead ...." a simple convert" .....LOL have a look at "man avconv" or "man ffmpeg" to see for your self @Cornova but Mr Riley's examples are good,, and sound advice as always

                      VINNY
                      i7 4core HT 8MB L3 2.9GHz
                      16GB RAM
                      Nvidia GTX 860M 4GB RAM 1152 cuda cores

                      Comment


                        #12
                        Originally posted by vinnywright View Post
                        pages of text to describe
                        Pages indeed! Start here: http://libav.org/avconv.html

                        Comment


                          #13
                          Thanks for all the commands. I'm going to copy them in a document in case I never want to use them.

                          Comment

                          Working...
                          X