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

Check also for ffmpeg/ffprobe/avconv/avprobe.exe #447

Closed
FiloSottile opened this issue Sep 30, 2012 · 13 comments
Closed

Check also for ffmpeg/ffprobe/avconv/avprobe.exe #447

FiloSottile opened this issue Sep 30, 2012 · 13 comments
Assignees

Comments

@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Sep 30, 2012

On Windows we should check also for the .exe filenames.
Thanks @archagon from #438

@phihag
Copy link
Contributor

@phihag phihag commented Oct 1, 2012

This should work on Windows by default. We'll have to check the subprocess call.

@phihag
Copy link
Contributor

@phihag phihag commented Oct 8, 2012

@FiloSottile Windows building is seriously broken right now, and it only seems to work on your system. On my system , even the (interactive!) Python installation fails with

err:msi:ACTION_InstallFiles compressed file wasn't installed (L"C:\\Python27\\Lib\\distutils\\filelist.py")

(I'm looking for a solution, but it's messy. Well, duh, it's Windows.)

Can you rebuild the binaries with a new release number and then release it?

@FiloSottile
Copy link
Collaborator Author

@FiloSottile FiloSottile commented Oct 8, 2012

Sure, will do ASAP! Can I merge a couple of PR before? (audio-extract progress, Google Plus IE, small fixes)

I know that the wine building is a mess, but @Tailszefox in #443 seems to have achieved it, so there are probably versions-related issues. (The interactive installation only happens the first time, building the environment) Let me know if I can help you with it.

@Tailszefox
Copy link
Contributor

@Tailszefox Tailszefox commented Oct 9, 2012

The installation of the building environment when trying to compile the Windows version under Linux itself worked nicely for me, creating the prefix and all. The only thing I had to do was to change some parts of the script for it not fail near the end.

Note that the resulting exe doesn't work with Wine for me (throws a Could not load python dll error), but it does work nicely on a native Windows XP installation.

@kumarldh
Copy link

@kumarldh kumarldh commented Jul 4, 2013

I can see this issue on Debian wheezy

Copy pasting the error

kumar@mybox:~/Music/Hindi/Movies/Fukrey$ youtube-dl --extract-audio https://www.youtube.com/watch?v=ArXLVS8_2cw
[youtube] Setting language
[youtube] ArXLVS8_2cw: Downloading video webpage
[youtube] ArXLVS8_2cw: Downloading video info webpage
[youtube] ArXLVS8_2cw: Extracting video information
[download] Destination: Ambarsariya HD 1080p Full Video Song New _ Fukrey (2013) Movie Latest Song On YouTube-ArXLVS8_2cw.flv
[download] 100.0% of 20.26MiB at 1.03MiB/s ETA 00:00
ERROR: WARNING: unable to obtain file audio codec with ffprobe

@hadifarnoud
Copy link

@hadifarnoud hadifarnoud commented Jul 26, 2013

I experience the same error on Mac mountain lion.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jul 26, 2013

@kumarldh or @hadifarnoud open a new isssue for that (with the output when running with the --verbose option), please.

@orangeoval
Copy link

@orangeoval orangeoval commented Jun 13, 2014

Was a new ticket ever open, re: @kumarldh and @hadifarnoud posts above? I am running 2014.05.31.4 release on OSX Mavericks with ffmpeg installed and lame installed, and I am receiving the same issue when attempting to download a youtube video and convert from m4a to audio file:

person@place {~/a/directory}: youtube-dl -x https://www.youtube.com/watch?v=4pgbJaKemic --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-x', 'https://www.youtube.com/watch?v=4pgbJaKemic', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.05.31.4
[debug] Python version 2.7.5 - Darwin-13.2.0-x86_64-i386-64bit
[debug] Proxy map: {}
[youtube] Setting language
[youtube] 4pgbJaKemic: Downloading webpage
[youtube] 4pgbJaKemic: Downloading video info webpage
[youtube] 4pgbJaKemic: Extracting video information
[youtube] 4pgbJaKemic: Encrypted signatures detected.
[youtube] encrypted signature length 82 (40.41), itag 43, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 18, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 5, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 36, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 17, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 83 (42.40), itag 135, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 83 (42.40), itag 244, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 83 (42.40), itag 134, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 83 (42.40), itag 243, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 83 (42.40), itag 133, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 83 (42.40), itag 242, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 83 (42.40), itag 160, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 83 (42.40), itag 140, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 83 (42.40), itag 171, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 135, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 244, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 134, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 243, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 133, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 242, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 160, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 140, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 171, html5 player en_US-vflmY-xcZ
[download] Freddy Cannon Tallahassee Lassie-4pgbJaKemic.m4a has already been downloaded
ERROR: WARNING: unable to obtain file audio codec with ffprobe
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1073, in post_process
keep_video_wish, new_info = pp.run(info)
File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 121, in run
raise PostProcessingError(u'WARNING: unable to obtain file audio codec with ffprobe')
PostProcessingError

The m4a file downloads in fine working conditions, it's just the post-processing where the issue arises. In all honesty, I don't think it's related to YTDL, as there seems to be an issue with ffmpeg's ability to load lame:

person@place {~/a/directory}: ffmpeg
dyld: Library not loaded: /usr/local/lib/libmp3lame.0.dylib
Referenced from: /usr/local/bin/ffmpeg
Reason: image not found
Trace/BPT trap: 5

I found a few references to the errors, but no substantial information. If you all think it's ticket-worthy, I'll open one, or if you're confident that the issue is unrelated to YTDL, I will let it be. Feel free to point me in the right direction if this has been discussed.

Thanks,
o0

@Tailszefox
Copy link
Contributor

@Tailszefox Tailszefox commented Jun 14, 2014

From what I'm seeing, it does seem unrelated, since the issue comes from ffmpeg, though it would be nice if you could run the command youtube-dl tries to execute on its own to see what output you get.

The command should be ffprobe -show_streams filename. youtube-dl then looks for the "codec_name=" entry, and then the "codec_type=audio" entry. I assume it's unable to find them here.

How did you install ffmpeg? If you used homebrew or the like, it's possible you got a version without lame. Either try to find a version with it, or try compiling ffmpeg on your own, making sure to include lame.

@orangeoval
Copy link

@orangeoval orangeoval commented Jun 14, 2014

Thanks for the reply @Tailszefox. I actually provided the output of running ffmpeg with no arguments to demonstrate the general error that the program output on any run, regardless of the arguments

person@place {~/a/directory}: ffprobe -show_streams Freddy\ Cannon\ Tallahassee\ Lassie-4pgbJaKemic.m4a
dyld: Library not loaded: /usr/local/lib/libmp3lame.0.dylib
Referenced from: /usr/local/bin/ffprobe
Reason: image not found
Trace/BPT trap: 5

I downloaded and installed ffmpeg through homebrew. Oddly enough, the -x audio extraction youtube-dl option (i.e. running ffmpeg) has worked for me in the environment in the past. So I am not sure if I installed an bad update or what. I seem to have ffmpeg and lame installed, but the library that ffmpeg is looking for (which is noted in the error message), if not there:

person@place {/a/directory}: which ffmpeg
/usr/local/bin/ffmpeg
person@place {
/a/directory}: which lame
/usr/local/bin/lame
person@place {~/a/directory}: ls -latr /usr/local/lib/libmp3lame.0.dylib
ls: /usr/local/lib/libmp3lame.0.dylib: No such file or directory

I am trying to track that library down. If I can't, would you suggest I uninstall/reinstall lame, or compiling on my own?

@orangeoval
Copy link

@orangeoval orangeoval commented Jun 14, 2014

well, I found that library in (/usr/local/Cellar/lame/3.99.5/lib) and linked it to the location noted in the error, where ffmpeg was looking (/usr/local/lib), and that resolved that error, but a new error is resulting:

person@place {~/a/directory}: youtube-dl -x https://www.youtube.com/watch?v=4pgbJaKemic --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-x', 'https://www.youtube.com/watch?v=4pgbJaKemic', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.05.31.4
[debug] Python version 2.7.5 - Darwin-13.2.0-x86_64-i386-64bit
[debug] Proxy map: {}
[youtube] Setting language
[youtube] 4pgbJaKemic: Downloading webpage
[youtube] 4pgbJaKemic: Downloading video info webpage
[youtube] 4pgbJaKemic: Extracting video information
[youtube] 4pgbJaKemic: Encrypted signatures detected.
[youtube] encrypted signature length 82 (40.41), itag 43, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 18, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 5, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 36, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 17, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 85 (42.42), itag 135, html5 player en_US-vflmY-xcZ
[youtube] 4pgbJaKemic: Downloading js player xcZ
[youtube] encrypted signature length 85 (42.42), itag 244, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 85 (42.42), itag 134, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 85 (42.42), itag 243, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 85 (42.42), itag 133, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 85 (42.42), itag 242, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 85 (42.42), itag 160, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 85 (42.42), itag 140, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 85 (42.42), itag 171, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 135, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 244, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 134, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 243, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 133, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 242, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 160, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 140, html5 player en_US-vflmY-xcZ
[youtube] encrypted signature length 82 (40.41), itag 171, html5 player en_US-vflmY-xcZ
[download] Destination: Freddy Cannon Tallahassee Lassie-4pgbJaKemic.m4a
[download] 100% of 2.01MiB in 00:02
ERROR: WARNING: unable to obtain file audio codec with ffprobe
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1073, in post_process
keep_video_wish, new_info = pp.run(info)
File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 121, in run
raise PostProcessingError(u'WARNING: unable to obtain file audio codec with ffprobe')
PostProcessingError

person@place {~/a/directory}: ffprobe -show_streams Freddy\ Cannon\ Tallahassee\ Lassie-4pgbJaKemic.m4a
dyld: Library not loaded: /usr/local/lib/libmp3lame.0.dylib
Referenced from: /usr/local/bin/ffprobe
Reason: no suitable image found. Did find:
/usr/local/lib/libmp3lame.0.dylib: stat() failed with errno=62
/usr/local/lib/libmp3lame.0.dylib: stat() failed with errno=62
Trace/BPT trap: 5

I found out this was due to faac libraries existing in /usr/local/Cellar..., but not in /usr/local/lib, so I linked those too and that seems to have solved the errors.

Now, however, there does appear to be a youtube-dl issue:

[download] 100% of 2.01MiB in 00:02
[youtube] Post-process file Freddy Cannon Tallahassee Lassie-4pgbJaKemic.m4a exists, skipping

I am not sure if I am using the -x flag incorrectly, but I was under the impression that it should convert the original m4a (video) file that was downloaded to an .mp3 audio file. The post-processing message suggests that its trying to convert to m4a, which already exists... I don't know, maybe I am using the command incorrectly.

I will keep poking around and post back if I sort it out.

THANKS FOR THE HELP!

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 14, 2014

@orangeoval If you want to get the audio in an specific format you must use the --audio-format option, in that case: --audio-format mp3. The default behaviour is to extract the audio in the best format possible, and m4a actually only contains the audio.

@orangeoval
Copy link

@orangeoval orangeoval commented Jun 14, 2014

just realized that right as you were posting. That resolved it:

youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=4pgbJaKemic

perfect.

THANKS!

By the way, I recently updated to Maverics, so I am not sure if that was responsible for the loss of library links, or what, but hopefully if anyone else encounters this issue they will find this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.