import { extname } from 'https://deno.land/std/path/mod.ts';
const input_file = `./sample_recording.wav`;
const ffmpeg_bin = `/usr/bin/ffmpeg`;
const output_file = './sample_output.ogg';
const input_data = await Deno.open(input_file, { read: true });
const command = new Deno.Command(ffmpeg_bin, {
args: [
'-i', '-',
],
stdin: 'piped',
stdout: 'piped',
});
const childProcess = command.spawn();
childProcess.stdout.pipeTo(
Deno.openSync(output_file, { write: true, create: true }).writable,
);
childProcess.stdin.close();
input_data.close();
import { extname } from 'https://deno.land/std/path/mod.ts';
const input_file = `./sample_recording.wav`;
const ffmpeg_bin = `/usr/bin/ffmpeg`;
const output_file = './sample_output.ogg';
const input_data = await Deno.open(input_file, { read: true });
const command = new Deno.Command(ffmpeg_bin, {
args: [
'-i', '-',
],
stdin: 'piped',
stdout: 'piped',
});
const childProcess = command.spawn();
childProcess.stdout.pipeTo(
Deno.openSync(output_file, { write: true, create: true }).writable,
);
childProcess.stdin.close();
input_data.close();