//use the same audio stream , -vn :no video
ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac

//use the same video stream , -an :no audio
ffmpeg -i input-video.avi -an -vcodec copy output-video.avi
tldr ffmpeg

ffmpeg

Video conversion tool.

- Extract the sound from a video and save it as MP3:
    ffmpeg -i video_filename -vn -ar 44100 -ac 2 -ab 192 -f mp3 sound.mp3

- Convert frames from a video or GIF into individual numbered images:
    ffmpeg -i video_or_gif_filename image%d.png

- Combine numbered images (image1.jpg, image2.jpg, etc) into a video or GIF:
    ffmpeg -f image2 -i image%d.jpg video.mpg_or_video.gif

- Convert AVI video to MP4. AAC Audio @ 128kbit, Video @ 1250Kbit:
    ffmpeg -i in.avi -acodec libfaac -ab 128k -vcodec mpeg4 -b 1250K out.mp4

Audio sampling

Sampling rate Use
8,000 Hz Telephone and encrypted walkie-talkie, wireless intercom and wireless microphone transmission; adequate for human speech but without sibilance; ess sounds like eff (/s/, /f/).
11,025 Hz One quarter the sampling rate of audio CDs; used for lower-quality PCM, MPEG audio and for audio analysis of subwoofer bandpasses.[citation needed]
16,000 Hz Wideband frequency extension over standard telephone narrowband 8,000 Hz. Used in most modern VoIP and VVoIP communication products.[10]
22,050 Hz One half the sampling rate of audio CDs; used for lower-quality PCM and MPEG audio and for audio analysis of low frequency energy. Suitable for digitizing early 20th century audio formats such as 78s.[11]
32,000 Hz miniDV digital video camcorder, video tapes with extra channels of audio (e.g. DVCAM with 4 Channels of audio), DAT (LP mode), Germany's Digitales Satellitenradio, NICAM digital audio, used alongside analogue television sound in some countries. High-quality digital wireless microphones.[12] Suitable for digitizing FM radio.[citation needed]
37,800 Hz CD-XA audio
44,056 Hz Used by digital audio locked to NTSC color video signals (3 samples per line, 245 lines per field, 59.94 fields per second = 29.97 frames per second).
44,100 Hz Audio CD, also most commonly used with MPEG-1 audio (VCD, SVCD, MP3). Originally chosen by Sony because it could be recorded on modified video equipment running at either 25 frames per second (PAL) or 30 frame/s (using an NTSC monochrome video recorder) and cover the 20 kHz bandwidth thought necessary to match professional analog recording equipment of the time. A PCM adaptor would fit digital audio samples into the analog video channel of, for example, PAL video tapes using 3 samples per line, 588 lines per frame, 25 frames per second.
47,250 Hz world's first commercial PCM sound recorder by Nippon Columbia (Denon)
48,000 Hz The standard audio sampling rate used by professional digital video equipment such as tape recorders, video servers, vision mixers and so on. This rate was chosen because it could reconstruct frequencies up to 22 kHz and work with 29.97 frames per second NTSC video - as well as 25 frame/s, 30 frame/s and 24 frame/s systems. With 29.97 frame/s systems it is necessary to handle 1601.6 audio samples per frame delivering an integer number of audio samples only every fifth video frame.[9] Also used for sound with consumer video formats like DV, digital TV, DVD, and films. The professional Serial Digital Interface (SDI) and High-definition Serial Digital Interface (HD-SDI) used to connect broadcast television equipment together uses this audio sampling frequency. Most professional audio gear uses 48 kHz sampling, including mixing consoles, and digital recording devices.
50,000 Hz First commercial digital audio recorders from the late 70s from 3M and Soundstream.
50,400 Hz Sampling rate used by the Mitsubishi X-80 digital audio recorder.
88,200 Hz Sampling rate used by some professional recording equipment when the destination is CD (multiples of 44,100 Hz). Some pro audio gear uses (or is able to select) 88.2 kHz sampling, including mixers, EQs, compressors, reverb, crossovers and recording devices.
96,000 Hz DVD-Audio, some LPCM DVD tracks, BD-ROM (Blu-ray Disc) audio tracks, HD DVD (High-Definition DVD) audio tracks. Some professional recording and production equipment is able to select 96 kHz sampling. This sampling frequency is twice the 48 kHz standard commonly used with audio on professional equipment.
176,400 Hz Sampling rate used by HDCD recorders and other professional applications for CD production. Four times the frequency of 44.1 kHz.
192,000 Hz DVD-Audio, some LPCM DVD tracks, BD-ROM (Blu-ray Disc) audio tracks, and HD DVD (High-Definition DVD) audio tracks, High-Definition audio recording devices and audio editing software. This sampling frequency is four times the 48 kHz standard commonly used with audio on professional video equipment.
352,800 Hz Digital eXtreme Definition, used for recording and editing Super Audio CDs, as 1-bit DSD is not suited for editing. Eight times the frequency of 44.1 kHz.
2,822,400 Hz SACD, 1-bit delta-sigma modulation process known as Direct Stream Digital, co-developed by Sony and Philips.
5,644,800 Hz Double-Rate DSD, 1-bit Direct Stream Digital at 2x the rate of the SACD. Used in some professional DSD recorders.