Changes between Version 10 and Version 11 of Capture/ALSA


Ignore:
Timestamp:
Nov 25, 2023, 11:32:03 PM (2 years ago)
Author:
20kbirds
Comment:

Describe how to set input sample format

Legend:

Unmodified
Added
Removed
Modified
  • Capture/ALSA

    v10 v11  
    125125= Input options =
    126126
    127 The only useful [https://ffmpeg.org/ffmpeg.html#Audio-Options audio input options] for ALSA input are `-sample_rate` (audio sample rate) and `-channels` (audio channels).
     127The recognized [https://ffmpeg.org/ffmpeg.html#Audio-Options audio input options] for ALSA input are `-sample_rate` (audio sample rate), `-channels` (audio channels) and audio codec.
    128128
    129129* Specifying audio sampling rate/frequency will force the audio card to record the audio at that specified rate. Usually the default value is "48000" (Hz).
    130130* Specifying audio channels will force the audio card to record the audio as mono, stereo or even 2.1/5.1 (if supported by your audio card). Usually the default value is "1" (mono) for Mic input and "2" (stereo) for Line-In input.
     131
     132To specify input sample format, use the audio codec option `-c:a xxx`. For example, to capture in 24 bits from a USB interface:
     133
     134{{{
     135ffmpeg -c:a pcm_s24le -f alsa -i hw:0 out.wav
     136}}}
    131137
    132138= Examples =