mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
23 lines
625 B
TypeScript
23 lines
625 B
TypeScript
#!/usr/bin/env ts-node
|
|
|
|
import { extractAudioFromVideo } from "../services/modules/extraction/ffmpegExtractor.ts";
|
|
|
|
const videoPath = process.argv[2];
|
|
|
|
if (!videoPath) {
|
|
console.error("Usage: ts-node extractAudio.ts <videoPath>");
|
|
process.exit(1);
|
|
}
|
|
|
|
(async () => {
|
|
try {
|
|
console.log(`Extracting audio from: ${videoPath}`);
|
|
|
|
await extractAudioFromVideo(videoPath); // Call the extraction function (ffmpegExtractor.ts in services/modules/extraction)
|
|
|
|
console.log("Audio extraction completed successfully.");
|
|
} catch (err) {
|
|
console.error("Audio extraction failed:", err);
|
|
process.exit(1);
|
|
}
|
|
})(); |