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
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
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.
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.
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)
soCode: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
what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
Playing with Slackware too now ...
ShanArt
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
Great. Please mark thread SOLVED.
Bookmarks