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

Thread: Tip to record microphone voice with ffmpeg to different formats

  1. #1
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan
    Beans
    2,146
    Distro
    Ubuntu 18.04 Bionic Beaver

    Tip to record microphone voice with ffmpeg to different formats

    Just record your voice with a microphone to a wave file and leave it on your Desktop




    Code:
    ffmpeg -f alsa -ac 2 -i pulse   -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0  -y  ./Desktop/myVOICE.wav
    AND just record your voice with a microphone to an alac file



    Code:
          ffmpeg -f alsa -ac 2 -i pulse -acodec alac  -y ./Desktop/RecordingMYvoice.m4a
    to flac



    Code:
          ffmpeg -f alsa -ac 2 -i pulse -acodec flac  -y ./Desktop/RecordingMYvoice.flac
    to aac



    Code:
    ffmpeg -f alsa -ac 2 -i pulse -acodec aac -strict experimental -ab 399k  -y ./Desktop/RecordingMYvoice.aac
    Last edited by shantiq; October 2nd, 2010 at 12:09 PM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community
    Playing with Slackware too now ...
    ShanArt

  2. #2
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan
    Beans
    2,146
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Tip to record microphone voice with ffmpeg to different formats

    not found a way to do this to wavpack/ape and mp3 or ogg yet ffmpeg says the codecs are not there


    gives message like
    Code:
    Unknown encoder 'oggenc'
    but i have all 4 not sure why it says that
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community
    Playing with Slackware too now ...
    ShanArt

  3. #3
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Tip to record microphone voice with ffmpeg to different formats

    Quote Originally Posted by shantiq View Post
    not found a way to do this to wavpack/ape and mp3 or ogg yet ffmpeg says the codecs are not there


    gives message like
    Code:
    Unknown encoder 'oggenc'
    but i have all 4 not sure why it says that
    You probably need to use -acodec libvorbis.
    If you type ffmpeg -codecs it will show what's available.

  4. #4
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan
    Beans
    2,146
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Tip to record microphone voice with ffmpeg to different formats

    ok so wavpack and mp3 only decode and do not encode in ffmpeg that is the answer thanx


    ogg works with libvorbis not oggenc


    so if you want to record from mike to ogg



    Code:
    ffmpeg -f alsa -ac 2 -i pulse -acodec libvorbis -ab 499k  -y ./Desktop/RecordingMYvoice.ogg
    499k is the highest in ogg set it yo what you want most people are probably happy with 120 or even less for voice only recordings



    to wma2


    i think that is lossless but i am not sure you end up with a 1000kbps about very high sound quality




    Code:
    ffmpeg -f alsa -ac 2 -i pulse -acodec wmav2 -ab 599k  -y ./Desktop/RecordingMYvoice.wma

    and for the fun bit if you love to hear your voice in perfect reproduction why not treat yourself to Microsoft Wav (64-bit float)




    your voice will be clearer than a bell in the 5000kbps region only for short messages maybe a love declaration ::)) maybe not your memoirs in an audio version but that is clear God it is clear


    Code:
    ffmpeg -f alsa -ac 2 -i pulse -acodec pcm_f64le  -y ./Desktop/RecordingMYvoice.wav


    will record an acoustic guitar off a mike in astounding clarity


    for you musicians who cannot be arsed to fire up the big guns and want a quick but quality recording this certainly works then take it to audacity for polishing
    Last edited by shantiq; October 2nd, 2010 at 12:09 PM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community
    Playing with Slackware too now ...
    ShanArt

  5. #5
    Join Date
    Sep 2006
    Beans
    3,713

    Re: Tip to record microphone voice with ffmpeg to different formats

    Quote Originally Posted by shantiq View Post
    to aac
    Code:
    ffmpeg -f alsa -ac 2 -i pulse -acodec aac -strict experimental -ab 399k  -y ./Desktop/RecordingMYvoice.aac
    It's currently generally recommended to use libfaac instead of faac due to the quality differences of their outputs. Also, the -aq option is worth trying out instead of -ab. Unfortunately, the appropriate values are codec specific so what works for one encoder may not work with another. See each encoder for a good idea of what numbers to use. faac example:
    Code:
    $ man faac
    -q <quality>
                  Set  default variable bitrate (VBR) quantizer quality in percent
                  (default: 100).
    So a good value for -acodec libfaac could be -aq 100.

  6. #6
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan
    Beans
    2,146
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Tip to record microphone voice with ffmpeg to different formats

    hi Outdoors

    libfaac won't play ball on my system or libfaac0 which is the one in my synaptic gives me a
    Code:
    Duration: N/A, start: 1285956463.992986, bitrate: N/A
        Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
    Unknown encoder 'libfaac'  or  Unknown encoder 'libfaac0'

    it is happy with -acodec aac tho not sure why but it asks that i use -strict experimental


    ok a clue might be the version of ffmpeg i use FFmpeg 0.6-4:0.6-2ubuntu3 the default one on maverick so far


    does not have it listed see

    Code:
     D V    kgv1            Kega Game Video
     D V D  kmvc            Karl Morton's video codec
      EV    libdirac        libdirac Dirac 2.2
     D A    libfaad         libfaad AAC (Advanced Audio Codec)
     DEA    libgsm          libgsm GSM
     DEA    libgsm_ms       libgsm GSM Microsoft variant
      EA    libmp3lame      libmp3lame MP3 (MPEG audio layer 3)
     D V D  libopenjpeg     OpenJPEG based JPEG 2000 decoder
     DEV    libschroedinger libschroedinger Dirac 2.2
     D A    libspeex        libspeex Speex
      EV    libtheora       libtheora Theora
      EA    libvorbis       libvorbis Vorbis


    maybe time for an update
    Last edited by shantiq; October 1st, 2010 at 07:26 PM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community
    Playing with Slackware too now ...
    ShanArt

  7. #7
    Join Date
    Sep 2006
    Beans
    3,713

    Re: Tip to record microphone voice with ffmpeg to different formats

    If -acodec aac sounds good for you then you can just use that. Otherwise you can use libavcodec-extra-52 from Medibuntu when/if it becomes available to enable libfaac in FFmpeg, or compile FFmpeg yourself:

    HOWTO: Install and use the latest FFmpeg and x264

  8. #8
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan
    Beans
    2,146
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Tip to record microphone voice with ffmpeg to different formats

    ok so a better quality aac/m4a goes like this i have set the quality really high 499 take it down to the level you want maybe 150 or 100 to suit your needs






    Code:
    ffmpeg -f alsa -ac 2 -i pulse -acodec libfaac  -aq 499  -y ./Desktop/RecordingMYvoice.aac

    Aac/m4a makes sense to be used for a voice recording; there is much literature all over the net to say that for the same size it is always higher sound quality than mp3


    and in any case there is no way i can see to record your voice to mp3 directly here with ffmpeg. Aac is universal and probably a better choice anyway.
    Last edited by shantiq; October 2nd, 2010 at 12:08 PM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community
    Playing with Slackware too now ...
    ShanArt

  9. #9
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Tip to record microphone voice with ffmpeg to different formats

    Quote Originally Posted by shantiq View Post

    Code:
     DEV D  jpegls          JPEG-LS
     D V    kgv1            Kega Game Video
     D V D  kmvc            Karl Morton's video codec
      EA    libfaac         libfaac AAC (Advanced Audio Codec)
      EA    libmp3lame      libmp3lame MP3 (MPEG audio layer 3)
     DEA    libopencore_amrnb OpenCORE Adaptive Multi-Rate (AMR)

    and in any case there is no way i can see to record your voice to mp3 directly here with ffmpeg.
    It's up there, -acodec libmp3lame

  10. #10
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan
    Beans
    2,146
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Tip to record microphone voice with ffmpeg to different formats

    MP3
    ===



    Code:
    ffmpeg -f alsa -ac 2 -i pulse -acodec libmp3lame  -aq 0  -y ./Desktop/RecordingMYvoice.mp3

    or else use -ab



    Code:
    ffmpeg -f alsa -ac 2 -i pulse -acodec libmp3lame  -ab 320k  -y ./Desktop/RecordingMYvoice.mp3
    Last edited by shantiq; October 2nd, 2010 at 11:51 AM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community
    Playing with Slackware too now ...
    ShanArt

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
  •