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

Extracting Opus audio - bitrate -> videoID ignores video-quality setting, one ID "takes" the argument and gets encoded in bitrate #18345

Closed
WurstCommander opened this issue Nov 29, 2018 · 2 comments

Comments

@WurstCommander
Copy link

@WurstCommander WurstCommander commented Nov 29, 2018

First I like to thank a big thank you for coding youtube-dl, I really appreciate your work. I hope my issue isn't a stupid one. I researched and I don't get it.

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.11.23. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • [x ] I've verified and I assure that I'm running youtube-dl 2018.11.23

Before submitting an issue make sure you have:

  • [x ] At least skimmed through the README, most notably the FAQ and BUGS sections
  • [ x] Searched the bugtracker for similar issues including closed ones
  • [ x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • [x ] Bug report (encountered problems with youtube-dl)

Log:

./youtube-dl.exe DLzxrzFCyOs -x --audio-format opus --audio-quality 32k -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['DLzxrzFCyOs', '-x', '--audio-format', 'opus', '--audio-quality', '32k', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.11.23
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: ffmpeg N-91473-gc5329d64b1, ffprobe N-91473-gc5329d64b1
[debug] Proxy map: {}
[youtube] DLzxrzFCyOs: Downloading webpage
[youtube] DLzxrzFCyOs: Downloading video info webpage
[youtube] {18} signature length 40.41, html5 player vfl-6ni-d
[youtube] {36} signature length 40.41, html5 player vfl-6ni-d
[youtube] {17} signature length 40.41, html5 player vfl-6ni-d
[youtube] {271} signature length 40.41, html5 player vfl-6ni-d
[youtube] {137} signature length 40.41, html5 player vfl-6ni-d
[youtube] {248} signature length 40.41, html5 player vfl-6ni-d
[youtube] {136} signature length 40.41, html5 player vfl-6ni-d
[youtube] {247} signature length 40.41, html5 player vfl-6ni-d
[youtube] {135} signature length 40.41, html5 player vfl-6ni-d
[youtube] {244} signature length 40.41, html5 player vfl-6ni-d
[youtube] {134} signature length 40.41, html5 player vfl-6ni-d
[youtube] {243} signature length 40.41, html5 player vfl-6ni-d
[youtube] {133} signature length 40.41, html5 player vfl-6ni-d
[youtube] {242} signature length 40.41, html5 player vfl-6ni-d
[youtube] {160} signature length 40.41, html5 player vfl-6ni-d
[youtube] {278} signature length 40.41, html5 player vfl-6ni-d
[youtube] {140} signature length 40.41, html5 player vfl-6ni-d
[youtube] {171} signature length 40.41, html5 player vfl-6ni-d
[youtube] {249} signature length 40.41, html5 player vfl-6ni-d
[youtube] {250} signature length 40.41, html5 player vfl-6ni-d
[youtube] {251} signature length 40.41, html5 player vfl-6ni-d
[debug] Invoking downloader on 'https://r1---sn-oxujvavbox-jboe.googlevideo.com/videoplayback?initcwndbps=1302500&c=WEB&pl=18&requiressl=yes&mime=audio%2Fwebm&keepalive=yes&source=youtube&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&itag=171&expire=1543538622&gir=yes&mm=31%2C29&mn=sn-oxujvavbox-jboe%2Csn-4g5e6nsk&dur=212.585&mt=1543516938&mv=m&ms=au%2Crdu&lmt=1538219864361466&clen=3651081&ip=78.35.81.118&key=yt6&ipbits=0&fvip=2&txp=5511222&id=o-AC4ePIttFumUamSJfhA8vARewRFQcJAzZMzeMKE2QWTa&ei=XjMAXIO6JcmTgQfTvayQBA&signature=6861ABD58FD104E3DB82E98CFE8E94D3717B3C5F.08BA5C3D9935163D5ACBCC3C1467B7A2A53F74AE&ratebypass=yes'
[download] Destination: Rick Astley - Never Gonna Give You Up [HQ]-DLzxrzFCyOs.webm
[download] 100% of 3.48MiB in 00:01
[debug] ffmpeg command line: ffprobe -show_streams "file:Rick Astley - Never Gonna Give You Up [HQ]-DLzxrzFCyOs.webm"
[ffmpeg] Destination: Rick Astley - Never Gonna Give You Up [HQ]-DLzxrzFCyOs.opus
[debug] ffmpeg command line: ffmpeg -y -i "file:Rick Astley - Never Gonna Give You Up [HQ]-DLzxrzFCyOs.webm" -vn -acodec libopus "-b:a" 32k "file:Rick Astley - Never Gonna Give You Up [HQ]-DLzxrzFCyOs.opus"
Deleting original file Rick Astley - Never Gonna Give You Up [HQ]-DLzxrzFCyOs.webm (pass -k to keep)

-vn -acodec libopus "-b:a" 32k

So the bitrate argument 32k is recognized and the opus file is encoded

vs:

youtube-dl.exe 9DxeMowxDTU -x --audio-format opus --audio-quality 32k -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['9DxeMowxDTU', '-x', '--audio-format', 'opus', '--audio-quality', '32k', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.11.23
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: ffmpeg N-91473-gc5329d64b1, ffprobe N-91473-gc5329d64b1
[debug] Proxy map: {}
[youtube] 9DxeMowxDTU: Downloading webpage
[youtube] 9DxeMowxDTU: Downloading video info webpage
[debug] Invoking downloader on 'https://r2---sn-oxujvavbox-jboz.googlevideo.com/videoplayback?mime=audio%2Fwebm&signature=1D782380ADC244D66A14C11291A8E0E3A86EE5AB.6F124D896EEBC9FBDF3D1DFBD6BDC44B28D73C72&clen=102948313&sparams=clen%2Cdur%2Cei%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpcm2cms%2Cpl%2Crequiressl%2Csource%2Cexpire&fvip=2&txp=5511222&pcm2cms=yes&initcwndbps=1110000&gir=yes&pl=18&source=youtube&gcr=de&c=WEB&requiressl=yes&mn=sn-oxujvavbox-jboz%2Csn-4g5edn7l&mm=31%2C29&keepalive=yes&mv=m&mt=1543516938&ms=au%2Crdu&ei=mzMAXO6IM86i1gLAlpGYAQ&ipbits=0&expire=1543538684&key=yt6&ip=78.35.81.118&lmt=1543052929515147&dur=7704.881&itag=251&id=o-AP2-1BpmhDXcqGYgF2Yz7noBtyHqHBwnMvo4MYbORPEQ&ratebypass=yes'
[download] Destination: Joe Rogan Experience #1205 - Jake 'The Snake' Roberts & Tony Hinchcliffe-9DxeMowxDTU.webm
[download] 100% of 98.18MiB in 00:10
[debug] ffmpeg command line: ffprobe -show_streams "file:Joe Rogan Experience #1205 - Jake 'The Snake' Roberts & Tony Hinchcliffe-9DxeMowxDTU.webm"
[ffmpeg] Destination: Joe Rogan Experience #1205 - Jake 'The Snake' Roberts & Tony Hinchcliffe-9DxeMowxDTU.opus
[debug] ffmpeg command line: ffmpeg -y -i "file:Joe Rogan Experience #1205 - Jake 'The Snake' Roberts & Tony Hinchcliffe-9DxeMowxDTU.webm" -vn -acodec copy "file:Joe Rogan Experience #1205 - Jake 'The Snake' Roberts & Tony Hinchcliffe-9DxeMowxDTU.opus"
Deleting original file Joe Rogan Experience #1205 - Jake 'The Snake' Roberts & Tony Hinchcliffe-9DxeMowxDTU.webm (pass -k to keep)

-vn -acodec copy

Description of your issue, suggested solution and other information

I use the same command-line arguments, with the video 9DxeMowxDTU I can change the --audio-quality to what every I want 0-9 or bitrates, it always stays the same (-acodec copy), other formats like ,mp3, ,acc "take" the quality accordingly.

Why does this happen with this video and/or only with opus?

Further research:

I get that "-acodec copy" would be ok if the source-webm-file would be the same bitrate as the parameter for the audio-quality, but it isn't (and I want to change the quality no matter what).

./youtube-dl.exe 9DxeMowxDTU -f 22 -x --audio-format opus --audio-quality 64k -k -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['9DxeMowxDTU', '-f', '22', '-x', '--audio-format', 'opus', '--audio-quality', '64k', '-k', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.11.23
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: ffmpeg N-91473-gc5329d64b1, ffprobe N-91473-gc5329d64b1
[debug] Proxy map: {}
[youtube] 9DxeMowxDTU: Downloading webpage
[youtube] 9DxeMowxDTU: Downloading video info webpage
[debug] Invoking downloader on 'https://r2---sn-oxujvavbox-jboz.googlevideo.com/videoplayback?fvip=2&id=o-AEeJwnKvGuAWV-HM60aPBF_90WEUOtp4nutya21FN5Bz&ei=FDsAXJHSBdiB8gPd6oOIDA&ms=au%2Crdu&mt=1543518844&mv=m&pl=18&source=youtube&mm=31%2C29&mn=sn-oxujvavbox-jboz%2Csn-4g5e6nls&ratebypass=yes&ip=78.35.81.118&itag=22&dur=7704.915&gcr=de&mime=video%2Fmp4&signature=6728E0A3271078BE3D38A3D11F45B32373941A30.890BDBC91EAB9871EE69B4777CCE9C3E3DE69D7B&expire=1543540596&ipbits=0&requiressl=yes&lmt=1542967840595231&sparams=dur%2Cei%2Cgcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&c=WEB&txp=5532432&key=yt6&initcwndbps=1058750'
[download] Joe Rogan Experience #1205 - Jake 'The Snake' Roberts & Tony Hinchcliffe-9DxeMowxDTU.mp4 has already been downloaded
[download] 100% of 732.97MiB
[debug] ffmpeg command line: ffprobe -show_streams "file:Joe Rogan Experience #1205 - Jake 'The Snake' Roberts & Tony Hinchcliffe-9DxeMowxDTU.mp4"
[ffmpeg] Destination: Joe Rogan Experience #1205 - Jake 'The Snake' Roberts & Tony Hinchcliffe-9DxeMowxDTU.opus
[debug] ffmpeg command line: ffmpeg -y -i "file:Joe Rogan Experience #1205 - Jake 'The Snake' Roberts & Tony Hinchcliffe-9DxeMowxDTU.mp4" -vn -acodec libopus "-b:a" 64k "file:Joe Rogan Experience #1205 - Jake 'The Snake' Roberts & Tony Hinchcliffe-9DxeMowxDTU.opus"

If I download -f mp4 the --audio-quality parameter IS passed on. Files with *.webm same to get the copy parameter no matter would audio-quality you choose for the opus file:

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 29, 2018

Conversion will only happen when original format does not match --audio-format. DLzxrzFCyOs bestaudio vorbis => conversion. 9DxeMowxDTU bestaudio opus => no conversion.

@WurstCommander
Copy link
Author

@WurstCommander WurstCommander commented Nov 29, 2018

but the bitrate should still change, shouldn't it? it's opus but not the bitrate which is passed on, it should get encoded to a lower bitrate

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.