Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

youtube-dl missing ffprobe and/or avprobe #5236

Closed
auntieNeo opened this issue Dec 5, 2014 · 27 comments
Closed

youtube-dl missing ffprobe and/or avprobe #5236

auntieNeo opened this issue Dec 5, 2014 · 27 comments
Labels
0.kind: question Requests for a specific question to be answered

Comments

@auntieNeo
Copy link
Contributor

When trying to download youtube videos with the --extract-audio option of youtube-dl, it gives the following error apparently while trying to encode the audio:

ERROR: ffprobe or avprobe not found. Please install one.

It is still able to extract the m4a audio with the -i "ignore errors" option. I'll look into fixing this once my final exams are over.

@peti
Copy link
Member

peti commented Dec 5, 2014

Run nix-env -i ffmpeg to install ffprobe into $PATH, then the error will be gone.

@vcunat
Copy link
Member

vcunat commented Dec 6, 2014

Yes, here I think that making youtube-dl depend on ffmpeg (or libav) would be an overkill.

@aragnon
Copy link

aragnon commented Dec 6, 2014

What's the point of packaging something only half? Either do the work completely, or don't do it at all (or keep it in some developer branch and don't let it loose in a stable release).

If it is desired to have optional dependencies, then that should be implemented. It's up to the user to decide whether or not he/she wants to make certain optimizations. If you start doing the configuration management already for the user (i.e., not giving any option for configuration management to the user), then the raison d'être of NixOS is null.

Make it correct first, optimize later. What you are doing is the opposite.

@vcunat
Copy link
Member

vcunat commented Dec 6, 2014

Yes, we're doing what most distros do in this case: do not depend on that loosely coupled tool. IMHO most users will never need extract option. By "overkill" I meant that it can be done, but IMO there are much pressing problems. Feel free to implement is as an option if you feel this is important for you.

@aragnon: again, be less aggressive and more constructive, please.

@vcunat vcunat added the 0.kind: enhancement Add something new label Dec 6, 2014
@offlinehacker
Copy link
Contributor

@aragnon feel free to implement as configuration option for package
On Dec 6, 2014 11:17 PM, "Vladimír Čunát" [email protected] wrote:

Yes, we're doing what most distros do in this case: do not depend on that
loosely coupled tool. IMHO most users will never need extract option. By
"overkill" I meant that it can be done, but IMO there are much pressing
problems. Feel free to implement is as an option if you feel this is
important for you.

@aragnon https://github.com/aragnon: again, be less aggressive and more
constructive, please.


Reply to this email directly or view it on GitHub
#5236 (comment).

@fenix011
Copy link

Same issue here... Apart from

Run nix-env -i ffmpeg to install ffprobe into $PATH, then the error will be gone.

is there another possible solution for ?

@vcunat , BTW... i use youtube-dl because of the --extract-audio option

@peti peti added 0.kind: question Requests for a specific question to be answered and removed 0.kind: enhancement Add something new labels Sep 13, 2015
@jgeerds
Copy link
Member

jgeerds commented Sep 13, 2015

@JordiLA my solution:

  environment.systemPackages = with pkgs; [
    (youtubeDL.override { ffmpeg = ffmpeg-full; })
  ];

@peti
Copy link
Member

peti commented Sep 13, 2015

Please make ffmpeg available at run-time either by installing it into your profile or by modifying the youtube-dl expression to refer to it by a full path. Pull requests that improve upon the current solution are very welcome!

@peti peti closed this as completed Sep 13, 2015
@mkrahal
Copy link

mkrahal commented Oct 31, 2015

Quick Fix for all windows users:

  1. Download the ffmpeg package from http://ffmpeg.zeranoe.com/builds/, unzip it, copy ALL the contents of the Bin directory to the directory where youtube-dl.exe is located.
  2. Using DOS navigate to the directory where youtube-dl is located and run using the command:
    youtube-dl --extract-audio --audio-format mp3

And voila.... works like a charm.

@vcunat
Copy link
Member

vcunat commented Oct 31, 2015

Overwriting nix store paths is a rather hacky thing to do. Does windows/cygwin have no notion of $PATH?

@mkrahal
Copy link

mkrahal commented Oct 31, 2015

I guess windows doesn't have that notion...

Regardless of how "hacky" the method is, its simple and straight forward and most importantly it WORKS.

Hope this helps someone who is facing the same issues with "FFprobe" as me.

@vcunat
Copy link
Member

vcunat commented Oct 31, 2015

Only when you have a disk corruption in the youtube-dl package, it won't be recognizable, and maybe some other consequences, as the nix store is designed not to be modified, but whatever... use at your own risk. EDIT: I meant this method, but it might hold for Windows as well ;-)

@mkrahal
Copy link

mkrahal commented Oct 31, 2015

If you have any disk corruption in the youtube-dl package then your anyway off to a bad start, regardless of what method you use to get it to work...

It seems like you are looking for a debate where none is required. There is absolutely no risk to system integrity. Seeing as on WINDOWS both FFmpeg and Youtube-dl are stand-alone applications. They may depend on one another but thats about it, using this method will no way shape or form compromise your system or put any other part of it at risk.

@vcunat
Copy link
Member

vcunat commented Oct 31, 2015

It seems like you are looking for a debate where none is required.

You get me wrong. I do not want to argue. I just wanted to state why I don't like that workaround (and foreshadow some possible unforseen consequences), and I had finished that. BTW, if there's nothing as $PATH, I don't get what nix-env is good for, except perhaps to prevent GC of things you want to keep... (EDIT: I'm sorry, I'm really emotionally exhausted today. I shan't waste any more energy with this. I'm unsubscribing from the issue.)

@mkrahal
Copy link

mkrahal commented Oct 31, 2015

Great, get your emotions straight i think that's the priority here...

We are here to share constructive tips to solve problems that users are facing.
I for my part am offering a solution. Now regardless of how primitive the method may seem it still gets the job done. In this case "nix-env" is useless and should not even be considered a source of debate.

As i said (@vcunat please note that "nix-env" is not ever mentioned):

Quick Fix for all windows users:

1.Download the ffmpeg package from http://ffmpeg.zeranoe.com/builds/, unzip it, copy ALL the contents of the Bin directory to the directory where youtube-dl.exe is located.

2.Using DOS navigate to the directory where youtube-dl is located and run using the command:
youtube-dl --extract-audio --audio-format mp3

And voila.... works like a charm.

@fenix011
Copy link

i solved it in my Debian GNU/Linux like suggested by @phihag here

sudo apt-get install -y libav-tools

@chaitanya11
Copy link

apt-get install ffmpeg

solved this problem

@jcmontesherrera
Copy link

for OS X

brew install ffmpeg

@douineauromain
Copy link

@chaitanya11

Hi, I've
E: Package 'ffmpeg' has no installation candidate
on Ubuntu 14.04 64bits.

It's strange I have youtube-dl installed, but youtube-dl --extract-audio --audio-format mp3 with youtube create me a big mp3 file which contains also video data.

sudo apt-get install -y libav-tools worked but still same problem.

Thanks

@drcrook1
Copy link

Solution for Windows? I've added ffmpeg's bin directory to my path, doesn't appear to work on many videos. here is a sample non working video: https://www.youtube.com/watch?v=YYEQqnvFwqQ

Here is some code:
options = {
'format': 'bestaudio/best', # choice of quality
'extractaudio' : True, # only keep the audio
'audioformat' : "mp3", # convert to mp3
'outtmpl': 'C:\projects\LanguagePredictor\data\audio\english%(id)s.mp3', #name
'noplaylist' : True, # download single, not playlist
}

with youtube_dl.YoutubeDL(options) as ydl:
ydl.download(['https://www.youtube.com/watch?v=b-quxIvj87k'])

@surajssd
Copy link

this was solved on fedora using

sudo dnf -y install ffmpeg

@losparviero
Copy link

losparviero commented Feb 17, 2017

This worked on Raspbian on Raspberry Pi:

sudo apt-get install -y libav-tools

should also work on Ubuntu

@uriva
Copy link

uriva commented Feb 21, 2017

Consider adding this to the docs.

@1RedOne
Copy link

1RedOne commented Jun 7, 2017

The fix of moving FFProbe in the same directory next to YoutubeDL.exe doesn't seem to work anymore with the new release of YoutubeDl.exe. Is there a new approach the user should follow to allow for download and extraction to MP3?

How about a prompt when the user selects --Extract-Audio to allow the user to download a FFMpeg at that time?

@mkrahal
Copy link

mkrahal commented Jun 8, 2017

@1RedOne did you also move FFmpeg and FFplay in the same directory?
You need to have all three files (FFProbe, FFMPEG, and FFPLAY) in the same directory as YoutubeDl.exe

@drboy
Copy link

drboy commented Jul 19, 2017

http://www.hotstar.com/tv/koi-laut-ke-aaya-hai/13273
single file can be downloaded unable to download the full season with one script
how to download the full season with one script

@globin
Copy link
Member

globin commented Jul 19, 2017

Locking this, as most of the thread are random users coming here, having nothing to do with Nix/NixOS.

@NixOS NixOS locked and limited conversation to collaborators Jul 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
0.kind: question Requests for a specific question to be answered
Projects
None yet
Development

No branches or pull requests