Results 1 to 7 of 7

Thread: How to convert videos having 5.1 audio to stereo using avconv

  1. #1
    Join Date
    Nov 2009
    Beans
    84

    How to convert videos having 5.1 audio to stereo using avconv

    Hi,

    How to convert videos having 5.1 audio to stereo using avconv? can I use avformat? I don't need to change the video format.

    Thanking You,
    Ras

  2. #2
    Join Date
    Dec 2013
    Beans
    77

    Re: How to convert videos having 5.1 audio to stereo using avconv

    source: http://libav.org/avconv.html#Audio-Options

    5.9 Audio Options

    ‘-aframes number (output)’Set the number of audio frames to record. This is an alias for -frames:a.
    ‘-ar[:stream_specifier] freq (input/output,per-stream)’Set the audio sampling frequency. For output streams it is set by default to the frequency of the corresponding input stream. For input streams this option only makes sense for audio grabbing devices and raw demuxers and is mapped to the corresponding demuxer options.
    ‘-aq q (output)’Set the audio quality (codec-specific, VBR). This is an alias for -q:a.
    ‘-ac[:stream_specifier] channels (input/output,per-stream)’Set the number of audio channels. For output streams it is set by default to the number of input audio channels. For input streams this option only makes sense for audio grabbing devices and raw demuxers and is mapped to the corresponding demuxer options.
    ‘-an (output)’Disable audio recording.
    ‘-acodec codec (input/output)’Set the audio codec. This is an alias for -codec:a.
    ‘-sample_fmt[:stream_specifier] sample_fmt (output,per-stream)’Set the audio sample format. Use -sample_fmts to get a list of supported sample formats.
    ‘-af filter_graph (output)’filter_graph is a description of the filter graph to apply to the input audio. Use the option "-filters" to show all the available filters (including also sources and sinks). This is an alias for -filter:a.

  3. #3
    Join Date
    Nov 2009
    Beans
    84

    Re: How to convert videos having 5.1 audio to stereo using avconv

    Could you please provide a command line example for how to use -ac option to convert 5.1 to stereo? I tried many, but all failed.

  4. #4
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan
    Beans
    1,941
    Distro
    Ubuntu 14.04 Trusty Tahr

    videos having 5.1 audio to stereo using avconv


    Audio options:
    -aframes number set the number of audio frames to record
    -aq quality set audio quality (codec-specific)
    -ar rate set audio sampling rate (in Hz)
    -ac channels set number of audio channels
    -an disable audio
    -acodec codec force audio codec ('copy' to copy stream)
    -vol volume change audio volume (256=normal)

    so
    Code:
    avconv  -i   input.mp4  -c:v copy  -ac 2 output.mp4

    copies video codec as is
    changes audio channels to 2


    i did this for mp4 but any extension you are using is fine
    Last edited by shantiq; December 8th, 2013 at 03:00 PM.
    Linux is Latin for off-the-beaten-track
    ShanArt XmmsPurple Piper

  5. #5
    Join Date
    Nov 2009
    Beans
    84

    Re: How to convert videos having 5.1 audio to stereo using avconv

    Hi,
    Thanks it is working, I used a codec option to change the audio codec as follows,

    avconv -i input.mkv -c:v copy -c:a libmp3lame -ac 2 ouput.mkv

  6. #6
    Join Date
    Jun 2007
    Beans
    11,772

    Re: How to convert videos having 5.1 audio to stereo using avconv

    Great. Please mark thread SOLVED.

  7. #7
    Join Date
    Dec 2006
    Beans
    7,231

    Re: How to convert videos having 5.1 audio to stereo using avconv

    Quote Originally Posted by ras123 View Post
    Hi,
    Thanks it is working, I used a codec option to change the audio codec as follows,
    Perhaps add in some quality settings for lame, I cannot remember the defaults but they might not be kind to your audio...
    You think that's air you're breathing now?

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
  •