-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Youtube m4a files downloaded with --extract-audio can't play in some players #3681
Comments
I've been told by Winamp support they do not support playing files that are MPEG DASH (m4a). I use ffmpeg to convert the m4a DASH audio to m4a AAC LC via
Wondering myself if there's an easier way to achieve this inside youtube-dl. |
Hi, I have tried to pipe the youtube-dl output directly through ffmeg, but it appears not to be that simple if you want to keep the filenaming scheme of youtube-dl (I am trying to download a 1000 tracks playlist). From my point of view, the simplier here would be to add an option into youtube-dl script with your command line @sunk818 , allowing to easily retrieve the filenames with internal variables |
This works for me in Windows 7 and will work on a certain file mask (ext) within one folder (fold) and save it to the designated folder (dest). Save the below as a batch file such as convert.bat set fold=c:\music\youtube-dl for %%f in ("%fold%%ext%") do ECHO ffmpeg -i "%%f" -vn -acodec copy "%dest%%%~nxf" |
I am on Mac OS X 10.9.4 :) |
It's not hard to find a unix equivalent. Try superuser.com
|
I don't know anything about windows batch files (if that's how it's called...) but do your method allows to execute a conversion immediately after downloading each track, or is it something you run after downloading all the DASH audio tracks ? |
I do it after I download the entire playlist.
|
You can use the #!/bin/sh
inputname=$1
tempname=${inputname}.temp.m4a
echo "Processing dash audio: $inputname"
ffmpeg -y -i "$inputname" -vn -c:a copy "$tempname"
mv "$tempname" "$inputname" Give it executable permissions and you can just run |
Sounds good ! I'll try that thanks :) |
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! |
thanks for this update :) works fine |
@phihag I ran youtube-dl version 2017.06.12 on MacOS 10.12.5, with ffmpeg version 3.3.1 on the path, and the header doesn't get corrected, I guess because youtube-dl can't find ffmpeg? If I run the ffmpeg command given by @sunk818 as a manual step on the download then all is OK, but I thought youtube-dl should invoke this using the PATH location? Specifying --ffmpeg-location (plus folder path) does not do the header correction. Bit puzzled here, maybe this in an OSX-specific thing? The permissions of ffmpeg look OK - I deleted the extended attributes on the ffmpeg executables while checking...
|
This fixes issue #3681 and other similar for non-YouTube video sites that use MPEG-DASH. Signed-off-by: Ondřej Caletka <ondrej@caletka.cz>
This fixes issue #3681 and other similar for non-YouTube video sites that use MPEG-DASH. Signed-off-by: Ondřej Caletka <ondrej@caletka.cz>
A number of audio players use libfaad to decode M4A/AAC files, and this library has a shortcoming: it can't play the files that are downloaded from youtube using
youtube-dl --extract-audio
.The problem is that youtube's MP4 container has an empty "time-to-sample atom" (a.k.a. seek table).
This can be easily fixed using ffmpeg's remuxer:
$ ffmpeg -i in.m4a -acodec copy -movflags faststart out.m4a
I was thinking that this would be good to add as a postprocessing filter for sites whose audio files have no seek table.
Thoughts?
The text was updated successfully, but these errors were encountered: