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] [Convert to AAC] No effect when using -postprocessor-args "-r 44100" for ffmpeg #16925

Closed
ddelange opened this issue Jul 7, 2018 · 1 comment
Labels

Comments

@ddelange
Copy link

@ddelange ddelange commented Jul 7, 2018

Checkboxes

  • I've verified and I assure that I'm running youtube-dl 2018.07.04

  • At least skimmed through the README, most notably the FAQ and BUGS sections

  • Searched the bugtracker for similar issues including closed ones

  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

  • Bug report (encountered problems with youtube-dl)


Aim

Convert any video to the highest quality audio output available (in 256kbps AAC), with a sampling rate of 44.1 kHz.


Issue

Everything is set up accordingly, and the output quality is as expected (frequencies up to 22 kHz for each channel), in a 48 kHz file. However, additionally passing -postprocessor-args "-r 44100" does not have any effect on the output file.


Verbose output

URL used for testing with opus audio format available: https://www.youtube.com/watch?v=4FwpwFDuZbk

The line starting with ** shows that the sample rate argument is indeed passed to ffmpeg.

youtube-dl -v --geo-bypass --postprocessor-args "-r 44100" -x -f "bestaudio[acodec=opus]/bestaudio/best" --audio-format m4a --audio-quality 256 --no-playlist -i -o "~/Music/youtube-dl/%(title)s.%(ext)s" --download-archive "~/Music/youtube-dl/Downloaded.txt" --add-metadata --metadata-from-title "%(artist)s - %(title)s" --embed-thumbnail https://www.youtube.com/watch?v=4FwpwFDuZbk
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--geo-bypass', u'--postprocessor-args', u'-r 44100', u'-x', u'-f', u'bestaudio[acodec=opus]/bestaudio/best', u'--audio-format', u'm4a', u'--audio-quality', u'256', u'--no-playlist', u'-i', u'-o', u'~/Music/youtube-dl/%(title)s.%(ext)s', u'--download-archive', u'~/Music/youtube-dl/Downloaded.txt', u'--add-metadata', u'--metadata-from-title', u'%(artist)s - %(title)s', u'--embed-thumbnail', u'https://www.youtube.com/watch?v=4FwpwFDuZbk']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.07.04
[debug] Python version 2.7.13 (CPython) - Darwin-12.5.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.4.1, ffprobe 3.4.1
[debug] Proxy map: {}
[youtube] 4FwpwFDuZbk: Downloading webpage
[youtube] 4FwpwFDuZbk: Downloading video info webpage
[youtube] 4FwpwFDuZbk: Downloading thumbnail ...
[youtube] 4FwpwFDuZbk: Writing thumbnail to: /Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).jpg
[debug] Invoking downloader on u'https://r4---sn-4g5e6nez.googlevideo.com/videoplayback?source=youtube&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&requiressl=yes&fexp=23709359&fvip=4&clen=3150446&gir=yes&dur=188.421&lmt=1523381040170633&key=yt6&mime=audio%2Fwebm&ei=t7hAW7X2NYH9gAfi44zwAw&c=WEB&expire=1530989848&signature=4D6B010BDBFD0C384FF06BF7F4B193A17F6DBC3B.3A51301836DC09EA5E26C06945F2B339DDEF6013&initcwndbps=390000&mn=sn-4g5e6nez%2Csn-5hnekn7l&itag=251&mm=31%2C26&ip=185.220.70.131&ipbits=0&id=o-AEGmq2Z1TA9CNuf98ynRbrn_hI3EV5rxZA-6f9uq286K&pl=24&keepalive=yes&ms=au%2Conr&mv=m&mt=1530968148&ratebypass=yes'
[download] Destination: /Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).webm
[download] 100% of 3.00MiB in 00:01
[fromtitle] parsed artist: Re-Style
[fromtitle] parsed title: Get It Crackin (Sefa Remix)
[debug] ffmpeg command line: ffprobe -show_streams 'file:/Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).webm'
[ffmpeg] Destination: /Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).m4a
**[debug] ffmpeg command line: ffmpeg -y -i 'file:/Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).webm' -vn -acodec aac '-b:a' 256k '-bsf:a' aac_adtstoasc -r 44100 'file:/Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).m4a'
Deleting original file /Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).webm (pass -k to keep)
[ffmpeg] Adding metadata to '/Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).m4a'
[debug] ffmpeg command line: ffmpeg -y -i 'file:/Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).m4a' -vn -acodec copy -metadata 'comment=[removed comments for readibility]' -metadata 'artist=Re-Style' -metadata 'title=Get It Crackin (Sefa Remix)' -metadata 'date=20180410' -metadata 'purl=https://www.youtube.com/watch?v=4FwpwFDuZbk' -r 44100 'file:/Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).temp.m4a'
[atomicparsley] Adding thumbnail to "/Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).m4a"
[debug] AtomicParsley command line: AtomicParsley '/Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).m4a' --artwork '/Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).jpg' -o '/Users/David10.8/Music/youtube-dl/Re-Style - Get It Crackin (Sefa Remix).temp.m4a'
@ddelange ddelange changed the title [Youtube] [Convert to AAC] No effect when using `-postprocessor-args "-r 44100"` for `ffmpeg` [Youtube] [Convert to AAC] No effect when using -postprocessor-args "-r 44100" for ffmpeg Jul 7, 2018
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jul 7, 2018

-r is video option. Audio option is -ar.

@dstftw dstftw closed this Jul 7, 2018
@dstftw dstftw added the invalid label Jul 7, 2018
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
2 participants
You can’t perform that action at this time.