lav2wav(1)
β¨ NAME β¨
lav2wav β the lil tool that pulls the audio out of your MJPEG container files and sends it straight to stdout. no middleman, no drama. π§β¨
π SYNOPSIS π
lav2wav [-s num] [-c num] [-v num] [-I] [-R] [-r samplerate, bitesize, channels] lavfile1 [lavfile2 ... lavfileN]
π¦ DESCRIPTION π¦
okay so bestie, here's the tea β β lav2wav is your go-to for extracting the audio to stdout. that output heads straight to stdout, which means you can either save it as a wav file, or pipe it into literally any other sound processing tool that can handle the wav format. the vibes are immaculate, the pipeline is real. π
who's in the group chat for that? mp2enc and toolame for mpeg layer 2 audio, and for mpeg layer 3 audio you've got lame, for example. iykyk π
and your input files? they can be any combination of AVI (.avi), Quicktime (.qt) or editlist files β as long as they're all lavtools-readable (like MJPEG-encoded AVI/Quicktime, or DV type 2 AVI). mix and match, she doesn't care, she's flexible like that. π«Ά
π OPTIONS π
lav2wav accepts the following options, and yes, we're going through every single one, no skipping, no shortcuts:
-s numβ start extracting at video frame (num). like, begin here, bestie. π¬-c numβ extract (num) frames of audio. just that many, not one more. βοΈ-v numβ verbosity level. your choices are0,1or2. pick your volume. π-Iβ ignore unsupported bitrates / bits per sample. she simply does not see them. π-Rβ if the file does not contain any sound,lav2wavwill create silence with44100kHzSampelrate,16 Bitaudio bitsize and2 Chanels. yes ma'am, silence from nothing. π€«-r sr,bs,chβ if the file does not contain any sound,lav2wavwill generate silence with the values you supply: the samplerate (sr), audio-bitsize (bs) and channel (ch). your silence, your rules. π
π BUGS π
okay so this is the part where we get real. π
the "WAV" file format (technically: RIFF) is really very much less than ideal for a tool that's meant to live in pipelines the way lav2wav is. the whole problem? the header includes a field that specifies the length of the file. and you literally can't fill that in except by seeking back to the begining and over-writing it. π
so if the output is unseekable (e.g. a pipe) β which, bestie, is exactly the pipeline situation β lav2wav simply writes a large length into the header and leaves it at that. that's it. that's the move. most tools like sox(1) or mp2enc(1) either ignore the length field anyway or only give a warning, so like... it's fine? mostly? π
β οΈ and one more: the audio length is inacurate calculated whenlav2wavgenerates silence. this happens only if you have NTSC framerate, and than it creates for every hour of video1.1498sectoo less of silence. so if you're running NTSC and letting her cook up silence, the math is off. no cap. π
π AUTHOR π
this man page was written by Bernhard Praschinger. periodt. π
if you have questions, remarks, problems, or you just want to contact the developers, the main mailing list for the MJPEG-tools is:
mjpeg-users@lists.sourceforge.net
for more info, see our website at
http://mjpeg.sourceforge.net
π SEE ALSO π
and that's the whole page, bestie!! this one came from the MJPEG Tools Team, dated 2 June 2001 β vintage but still slaying, fr fr. go forth and extract that audio. πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- arch rolling: mjpegtools 2.2.1-4 Β· GPL-2.0-or-later
- debian bookworm: mjpegtools 1:2.1.0+debian-7
- debian trixie: mjpegtools 1:2.1.0+debian-8.1+b1
- fedora 43: mjpegtools 2.2.1-11.fc43 Β· GPL-2.0-or-later AND GPL-2.0-only AND GPL-1.0-or-later
- fedora 44: mjpegtools 2.2.1-12.fc44 Β· GPL-2.0-or-later AND GPL-2.0-only AND GPL-1.0-or-later
- nixos 26.05: mjpegtools 2.2.1
- nixpkgs unstable: mjpegtools 2.2.1
- opensuse-leap 16.0: mjpegtools 2.2.1-160000.2.2 Β· GPL-2.0-only
- opensuse-leap 16.0: mjpegtools 2.2.1-160000.2.2 Β· GPL-2.0-only
- opensuse-leap 16.0: mjpegtools 2.2.1-160000.2.2 Β· GPL-2.0-only
- opensuse-leap 16.0: mjpegtools 2.2.1-160000.2.2 Β· GPL-2.0-only
- ubuntu jammy: mjpegtools 1:2.1.0+debian-6build1
- ubuntu noble: mjpegtools 1:2.1.0+debian-8.1build1
- ubuntu questing: mjpegtools 1:2.1.0+debian-8.1build1
- ubuntu resolute: mjpegtools 1:2.2.1-3
- ubuntu stonking: mjpegtools 1:2.2.1-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms