Chapter 139: extractAudio()
Core Idea
Extracts the audio from a video source and saves it to the specified output path. It does not convert the audio to a different format.
Key Concepts
- Example
- Arguments
- videoSource
- audioOutput
- logLevel?
- binariesDirectory?<AvailableFrom v="4.0.120" />
- Return Value
- Compatibility
Code Examples
const videoSource = resolve(process.cwd(), '/Users/john/path-to-video.mp4');
const audioOutput = resolve(process.cwd(), './output-audio-path.mp3');
await extractAudio({
videoSource,
audioOutput,
});
- What it demonstrates: Usage pattern for extractAudio() from the official docs.
Key Takeaways
- Understand example when working with extractAudio().
- Understand arguments when working with extractAudio().
- Understand videosource when working with extractAudio().
- Understand audiooutput when working with extractAudio().
- Understand loglevel? when working with extractAudio().
Connects To
- Chromium Flags: related page in the Rendering & SSR section.
- Compare ssr: related page in the Rendering & SSR section.
- Dataset Render: related page in the Rendering & SSR section.