fix audio conversion not working with newer versions of ffmpeg #623
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I tried to run the following command with the newest youtube-dl version and ffmpeg 1.1 installed and got an error:
$ youtube-dl -x -k "https://www.youtube.com/playlist?list=PLr9rc7slvdRXfdRUITmYArOtB-99mr5h5"
[youtube] PL r9rc7slvdRXfdRUITmYArOtB-99mr5h5: Downloading page #1
[youtube] PL r9rc7slvdRXfdRUITmYArOtB-99mr5h5: Found 25 videos
[youtube] Setting language
[youtube] ytKvgLuy7ng: Downloading video webpage
[youtube] ytKvgLuy7ng: Downloading video info webpage
[youtube] ytKvgLuy7ng: Extracting video information
[download] Destination: ytKvgLuy7ng.mp4
[download] 100.0% of 82.40M at 1.33M/s ETA 00:00
[ffmpeg] Destination: ytKvgLuy7ng.aac
ERROR: audio conversion failed: Error splitting the argument list: Option not found
The error occurs because in newer versions, ffmpeg doesn't accept the -- option any more:
$ ffmpeg -y -i ytKvgLuy7ng.mp4 -vn -acodec copy -f adts -- ytKvgLuy7ng.aac
Unrecognized option '-'.
Error splitting the argument list: Option not found
So I did some poking around in the code and found a solution which on my system works with at least versions 0.11.1 and 1.1 of ffmpeg.