mlg404 / whatsapp-music-bot

A whatsapp bot to send and search musics to your friends!
MIT License
124 stars 77 forks source link

nao encontrado ,tente novamente #1

Closed chicken999 closed 3 years ago

chicken999 commented 3 years ago

i always get this message for every song i search for with "!play songname" thank you in advance

mlg404 commented 3 years ago

Hi, Try to remove the "yt-search" package and install It again.

You also needs ffmpeg in your machine

chicken999 commented 3 years ago

Hi, Try to remove the "yt-search" package and install It again.

You also needs ffmpeg in your machine

thanks mate, seems like that part got fixed after uninstalling yt-search , now after i type !play songname , i receive " INICIANDO DOWNLOAD: esta açao pode demorar um pouco!,and this is what i get in my console log:

Conectado com sucesso! events.js:292 throw er; // Unhandled 'error' event ^

Error: spawn C: fmpein ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21) Emitted 'error' event on DownloadYTAudio instance at: at FfmpegCommand. (C:\Users\arr98\whatsapp-music-bot-master\node_modules\yt-dl-playlist\lib\download-audio.js:82:14) at FfmpegCommand.emit (events.js:315:20) at emitEnd (C:\Users\arr98\whatsapp-music-bot-master\node_modules\fluent-ffmpeg\lib\processor.js:424:16) at C:\Users\arr98\whatsapp-music-bot-master\node_modules\fluent-ffmpeg\lib\processor.js:433:16 at wrapper (C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:268:20) at next (C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:4582:24) at C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:321:20 at wrapper (C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:268:20) at next (C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:4582:24) at C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:321:20 { errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn C:\ffmpeg\bin', path: 'C:\ffmpeg\bin', spawnargs: [ '-formats' ] }

mlg404 commented 3 years ago

It's a ffmpeg problem. Did u installed it? https://ffmpeg.org/

Try to include it on path

" INICIANDO DOWNLOAD: esta açao pode demorar um pouco!," that means the mp4 video will be downloaded and converted in mp3. For that action, u need ffmpeg installed

chicken999 commented 3 years ago

It's a ffmpeg problem. Did u installed it? https://ffmpeg.org/

Try to include it on path

" INICIANDO DOWNLOAD: esta açao pode demorar um pouco!," that means the mp4 video will be downloaded and converted in mp3. For that action, u need ffmpeg installed

yes mate , i even made ffmpeg a system variable, added it to system path, that got me confussed , at least i know its all about ffmpeg ,i will try to fix it and hit you up again, thank u, ill leave u here the log where u can appreciate that ffmpeg is added to path and also added to the index(but im still getting the same error i sent u above):

PS C:\Users\arr98\whatsapp-music-bot-master> ffmpeg ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 10.2.1 (GCC) 20200726 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

mlg404 commented 3 years ago

Can u show me the index.js file? Line 65 " ffmpegPath: '/usr/bin/ffmpeg' " must be configured too I suposed u configured it.... I run the script on ubuntu 18.04. Are you running on windows, right?

mlg404 commented 3 years ago

Searching i found this: In windows, your ffmpeg path must be the .exe file path, like this: ffmpegPath: './ffmpeg/bin/ffmpeg.exe' (on line 65)

We are runing this module: https://www.npmjs.com/package/yt-dl-playlist Try to reinstall it too

chicken999 commented 3 years ago

Can u show me the index.js file? Line 65 " ffmpegPath: '/usr/bin/ffmpeg' " must be configured too I suposed u configured it.... I run the script on ubuntu 18.04. Are you running on windows, right?

yes im running it on windows since on debian it was throwing me more errors. i used the path C:\ffmpeg\bin , in line 65,then i tried ./ffmpeg/bin/ffmepg.exe and then ./ffmpeg/bin/

path: './ffmpeg/bin', in line 65 output:

Conectado com sucesso! throw er; // Unhandled 'error' event ^

Error: spawn ./ffmpeg/bin ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21) Emitted 'error' event on DownloadYTAudio instance at: at FfmpegCommand. (C:\Users\arr98\whatsapp-music-bot-master\node_modules\yt-dl-playlist\lib\download-audio.js:82:14) at FfmpegCommand.emit (events.js:315:20) at emitEnd (C:\Users\arr98\whatsapp-music-bot-master\node_modules\fluent-ffmpeg\lib\processor.js:424:16) at C:\Users\arr98\whatsapp-music-bot-master\node_modules\fluent-ffmpeg\lib\processor.js:433:16 at wrapper (C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:268:20) at next (C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:4582:24) at C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:321:20 at wrapper (C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:268:20) at next (C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:4582:24) at C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:321:20 { errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn ./ffmpeg/bin', path: './ffmpeg/bin', spawnargs: [ '-formats' ] }

==================================== path: './ffmpeg/bin/ffmpeg.exe', in line 65 output:

Conectado com sucesso! events.js:292 throw er; // Unhandled 'error' event ^

Error: spawn ./ffmpeg/bin/ffmepg.exe ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21) Emitted 'error' event on DownloadYTAudio instance at: at FfmpegCommand. (C:\Users\arr98\whatsapp-music-bot-master\node_modules\yt-dl-playlist\lib\download-audio.js:82:14) at FfmpegCommand.emit (events.js:315:20) at emitEnd (C:\Users\arr98\whatsapp-music-bot-master\node_modules\fluent-ffmpeg\lib\processor.js:424:16) at C:\Users\arr98\whatsapp-music-bot-master\node_modules\fluent-ffmpeg\lib\processor.js:433:16 at wrapper (C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:268:20) at next (C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:4582:24) at C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:321:20 at wrapper (C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:268:20) at next (C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:4582:24) at C:\Users\arr98\whatsapp-music-bot-master\node_modules\async\dist\async.js:321:20 { errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn ./ffmpeg/bin/ffmepg.exe', path: './ffmpeg/bin/ffmepg.exe', spawnargs: [ '-formats' ] }

==============================

index file line 65:

ffmpegPath: './ffmpeg/bin',

=============================

note: i also reinstalled yt-dl-playlist

chicken999 commented 3 years ago

fixed with ffmpegPath as "ffmpeg" thank you for your help, you can close this issue.