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 are 0, 1 or 2. 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, lav2wav will create silence with 44100kHz Sampelrate, 16 Bit audio bitsize and 2 Chanels. yes ma'am, silence from nothing. 🀫
  • -r sr,bs,ch β€” if the file does not contain any sound, lav2wav will 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 when lav2wav generates silence. this happens only if you have NTSC framerate, and than it creates for every hour of video 1.1498sec too 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. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά