Open MalikElate opened 4 months ago
The same thing happened to me today, from what i read in other recent issues it seems to be related to some changes made by Youtube, maybe made to stop this kind of libraries from working. hope it gets solved soon.
The same thing happened to me today, from what i read in other recent issues it seems to be related to some changes made by Youtube, maybe made to stop this kind of libraries from working. hope it gets solved soon.
Im not sure, did also notice other libraries were affect.
I was able to restart my computer (mac) and it working normally now
good to know that it works for you, i tried restarting mine(windows) and it still doesn't work.
try out https://www.npmjs.com/package/youtube-dl-exec
until a fix it pushed
const download = await ytdl.exec(link, { x: true });
'
Or see this https://github.com/fent/node-ytdl-core/issues/1299
I noticed the fix in yt-dlp from today: https://github.com/yt-dlp/yt-dlp/commit/f0993391e6052ec8f7aacc286609564f226943b9
It is quite substantial, though. Needs porting.
I tried using the link referenced, and copy-pasted the first code under the usage section const youtubedl = require('youtube-dl-exec')...
and it gives this error. since im new i have no idea whats going on but any support would be greatly appreciated.
\Desktop\VSCode Projects\Serious Projects\YouTube-To-MP4\node_modules\ytdl-core\lib\format-utils.js:226
return formats.filter(format => !!format.url && fn(format));
^
TypeError: Array.prototype.filter called on null or undefined
at filter (<anonymous>)
at C:\Users\datha\Desktop\Desktop\VSCode Projects\Serious Projects\YouTube-To-MP4\node_modules\ytdl-core\lib\format-utils.js:226:51
at Array.filter (<anonymous>)
at exports.filterFormats (C:\Users\datha\Desktop\Desktop\VSCode Projects\Serious Projects\YouTube-To-MP4\node_modules\ytdl-core\lib\format-utils.js:226:18)
at exports.chooseFormat (C:\Users\datha\Desktop\Desktop\VSCode Projects\Serious Projects\YouTube-To-MP4\node_modules\ytdl-core\lib\format-utils.js:104:23)
at downloadFromInfoCallback (C:\Users\datha\Desktop\Desktop\VSCode Projects\Serious Projects\YouTube-To-MP4\node_modules\ytdl-core\lib\index.js:86:26)
at C:\Users\datha\Desktop\Desktop\VSCode Projects\Serious Projects\YouTube-To-MP4\node_modules\ytdl-core\lib\index.js:20:5
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on PassThrough instance at:
at downloadFromInfoCallback (C:\Users\datha\Desktop\Desktop\VSCode Projects\Serious Projects\YouTube-To-MP4\node_modules\ytdl-core\lib\index.js:88:12)
at C:\Users\datha\Desktop\Desktop\VSCode Projects\Serious Projects\YouTube-To-MP4\node_modules\ytdl-core\lib\index.js:20:5
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v20.11.1
Not able to download a youtube video as it is showing that video file is not supported by the files
just switch to https://www.npmjs.com/package/@distube/ytdl-core it should be a drop in replacement i.e https://github.com/SwapnilSoni1999/spotify-dl/commit/a0605c825ac718d2de68c1bef1a9e15c2747078c
Thanks @phyzical How to ffmpeg a video Error during extraction: Error: ffmpeg exited with code 1: pipe:1: Invalid argument
ffmpeg(fs.createReadStream('video.mp4')) .setStartTime(0) .setDuration(15) .output(fs.createWriteStream('outputPath.mp4')) .on('end', () => { console.log('Segment extraction finished'); }) .on('error', (err) => { console.error('Error during extraction:', err); }) .run();
Able to solve it on my own here is the corrected code:
ffmpeg('video.mp4') .setStartTime(0) .setDuration(15) .output(outputPath.mp4') .on('end', () => { console.log('Segment extraction finished'); }) .on('error', (err) => { console.error('Error during extraction:', err); }) .run();
@MalikElate Yup, I'm getting same thing you should use latest package of ytdl-core => @distube/ytdl-core, I fix the error while doing this!
Hey, I'm trying to use ytdl-core but its stopped working across several version. When I download a video I get a blank file that is zero bytes. I'm expecting that videos should download as normal.
I'm running the most basic download but it work work. `const fs = require('fs'); const ytdl = require('ytdl-core');
ytdl('http://www.youtube.com/watch?v=aqz-KE-bpKQ') .pipe(fs.createWriteStream('video.mp4'));`
Any help on this would be greatly appreciated