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

Audio file not playable in VLC (2.0.8) when using --extract-audio #2288

Closed
mariomaric opened this issue Feb 1, 2014 · 9 comments
Closed

Audio file not playable in VLC (2.0.8) when using --extract-audio #2288

mariomaric opened this issue Feb 1, 2014 · 9 comments

Comments

@mariomaric
Copy link

@mariomaric mariomaric commented Feb 1, 2014

Hi!

After I did upgrade:

$ sudo pip install --upgrade youtube_dl
Downloading/unpacking youtube-dl
  Downloading youtube_dl-2014.01.30.2.tar.gz (281Kb): 281Kb downloaded
  Running setup.py egg_info for package youtube-dl

Installing collected packages: youtube-dl
  Found existing installation: youtube-dl 2014.01.21
    Uninstalling youtube-dl:
      Successfully uninstalled youtube-dl
  Running setup.py install for youtube-dl

    Installing youtube-dl script to /usr/local/bin
Successfully installed youtube-dl
Cleaning up...

I run this command:

$ youtube-dl -x http://www.youtube.com/watch?v=q8MqQWhKvpE
[youtube] Setting language
[youtube] q8MqQWhKvpE: Downloading webpage
[youtube] q8MqQWhKvpE: Downloading video info webpage
[youtube] q8MqQWhKvpE: Extracting video information
[download] Destination: Devendra Banhart - Never Seen Such Good Things-q8MqQWhKvpE.m4a
[download] 100% of 2.93MiB in 00:04
[youtube] Post-process file Devendra Banhart - Never Seen Such Good Things-q8MqQWhKvpE.m4a exists, skipping

Hint: pay attention to the last word in the last line above: skipping

And guess what? Audio file do not want to play in VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b) @ Ubuntu 12.04.3 LTS.

Can somebody please try to reproduce this issue?

Thx!

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Feb 1, 2014

Ok, the problem is in de3ef3e, we now download the file that only contains the audio (to save time) and use the m4a extension for it, that's why ffmpeg is not run. The problem is that most players don't play the DASH audio/video only files (at least mplayer plays them fine). In the meantime you can force to convert to other format using --audio-format aac (or your favourite format).
@phihag Should we force to run ffmpeg if the downloaded file is DASH audio only?

@mariomaric
Copy link
Author

@mariomaric mariomaric commented Feb 1, 2014

If you can setup youtube-dl to run ffmpeg on "file that only contains the audio" to make it playable in most players (i.e. replace DASH with M4A), that would be awesome---personally I definitely prefer as much untouched audio file as possible (i.e. -codec:a copy ffmpeg option).

Thx for your work, btw, yt-dl is excellent tool!

@phihag
Copy link
Contributor

@phihag phihag commented Feb 2, 2014

I can reproduce that the file is playable in mplayer, but not vlc. I'd like to find out where the fault lies (vlc or is the DASH format incompatible?), but as a workaround, how about specifying the ext .dashm4a for these files?

@mariomaric
Copy link
Author

@mariomaric mariomaric commented Feb 2, 2014

I would say that it is definitely VLC's fault (at least in version I use, 2.0.8)---I could play MPEG-DASH .m4a file in Google Chrome 32.0.1700.102

@mariomaric
Copy link
Author

@mariomaric mariomaric commented Feb 6, 2014

May I suggest that -x option stays as it were before, and that you add another new option, for example: --download-only-audio that would download MPEG-DASH .m4a file.

Although new -x behavior save download time, from some quick testing, it doesn't save bitrate, which is smaller, e.g., instead 191, it is 125. I can provide later more info about that if needed...

@ghost
Copy link

@ghost ghost commented Mar 18, 2014

Noticed that NOT passing -k (aka --keep-video) only the .m4a (audio file) is downloaded(somehow) but deleted:
Deleting original file Kirk Gadget - Hot Pursuit-L3j7qwyNRG8.m4a (pass -k to keep)
(was this command: youtube-dl https://www.youtube.com/watch?v=L3j7qwyNRG8 --extract-audio -ctw --audio-format mp3 )
However passing -k doesn't 'cause the .m4a to be kept, but rather the .mp4 (video) first downloaded then kept. However the video is much larger(to download and store),
here's to hoping for a way to keep only the .m4a file, thanks in advance.

@ghost
Copy link

@ghost ghost commented Mar 19, 2014

Hey guys, someone(3dyd to be exact) just gave me an important(for me) piece of information:

Command:

ffmpeg.exe -i "Kirk Gadget - Hot Pursuit-L3j7qwyNRG8.m4a" -c:a copy xxx.m4a

will change format from dash to usual so foobar will be able to play it. This command will not transcode audio so you will not get any quality loss.

This makes the downloaded .m4a files work on foobar2000 (v1.3.1), while previously they were not working(they did work in media player classic home cinema and in vlc though, before this command, but not in foobar2000), they were showing this when not working:
Could not load info (Unsupported format or corrupted file (array access out of range)) from:
(file and path followed)

Is there any way to actually make youtube-dl execute something like this? (the key here is not transcoding the downloaded .m4a file)
Thanks.

PS: if anyone's wondering 3dyd is the person who made foo_youtube component for foobar2000, which can be used to play the audio directly from a youtube URL, however it won't play the .m4a file directly (currently).

@phihag phihag closed this in 62cd676 Jan 23, 2015
@phihag
Copy link
Contributor

@phihag phihag commented Jan 23, 2015

youtube-dl 2015.01.23.4 and newer will automatically correct the header of the m4a file if ffmpeg is present on the system. I am therefore closing this issue. See our FAQ if you need help updating. Thank you for the report!

@mariomaric
Copy link
Author

@mariomaric mariomaric commented Jan 24, 2015

Thanks, it is working like a charm!

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
3 participants
You can’t perform that action at this time.