initial music stuff
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
const { spawn } = require('node:child_process');
|
||||
|
||||
console.log('Starting smoke test...');
|
||||
|
||||
const ytdlp = spawn('yt-dlp', [
|
||||
'-f', 'bestaudio',
|
||||
'-o', '-',
|
||||
'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
|
||||
]);
|
||||
|
||||
const ffmpeg = spawn('ffmpeg', [
|
||||
'-i', 'pipe:0',
|
||||
'-f', 'null',
|
||||
'-'
|
||||
]);
|
||||
|
||||
ytdlp.stdout.pipe(ffmpeg.stdin);
|
||||
|
||||
ffmpeg.on('close', (code) => {
|
||||
console.log('FFmpeg exited with code:', code);
|
||||
});
|
||||
|
||||
ytdlp.on('error', err => console.error('yt-dlp error:', err));
|
||||
ffmpeg.on('error', err => console.error('ffmpeg error:', err));
|
||||
Reference in New Issue
Block a user