Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

youtube-dl: behavior change?[solved]

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

youtube-dl: behavior change?[solved]

  • Quote

Post by CaptainBlood » Fri May 21, 2021 4:18 pm

I used to

Code: Select all

youtube-dl -x  <youtube ref>
most of the time providing an opus file, which is highly favored here.
Using it today provided m4a file, despite

Code: Select all

youtube -F <youtube ref>
reveals opus format is available.
Forcing youtube-dl -x -f 241 <youtube ref> forces download of opus data, but encapsulated in .webm.

Any idea how to proceed to recover direct download of opus data in opus file format?

Thks 4 ur attention, interest & support.
Last edited by CaptainBlood on Fri May 21, 2021 5:49 pm, edited 1 time in total.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
sdauth
l33t
l33t
User avatar
Posts: 770
Joined: Wed Sep 19, 2018 2:48 am
Location: Ásgarðr

  • Quote

Post by sdauth » Fri May 21, 2021 5:00 pm

Do you have the url ?

I'm using this function :

Code: Select all

ytdl-music_opus() {
youtube-dl  --format bestaudio --extract-audio --audio-format opus -o "%(title)s.%(ext)s" "$1"
}
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Fri May 21, 2021 5:17 pm

sdauth,
trying with same url as formerly today...
Your command line downloaded m4a file which ffmpeg converted to opus.

IIRC, youtube-fm used to extract opus from webm file.

Thks 4 ur attention, interest & support.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
sdauth
l33t
l33t
User avatar
Posts: 770
Joined: Wed Sep 19, 2018 2:48 am
Location: Ásgarðr

  • Quote

Post by sdauth » Fri May 21, 2021 5:28 pm

Indeed. I rarely use that function to be honest. Not very good since it goes from lossy to lossy.
I just tried with this : https://www.youtube.com/watch?v=GVNO0_eR0FM

Code: Select all

youtube-dl -F https://www.youtube.com/watch?v=GVNO0_eR0FM
[youtube] GVNO0_eR0FM: Downloading webpage
[info] Available formats for GVNO0_eR0FM:
format code  extension  resolution note
249          webm       audio only tiny   45k , webm_dash container, opus @ 45k (48000Hz), 602.69KiB
250          webm       audio only tiny   67k , webm_dash container, opus @ 67k (48000Hz), 894.25KiB
251          webm       audio only tiny  122k , webm_dash container, opus @122k (48000Hz), 1.59MiB
140          m4a        audio only tiny  129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 1.69MiB
278          webm       256x144    144p   30k , webm_dash container, vp9@  30k, 30fps, video only, 403.91KiB
160          mp4        256x144    144p   31k , mp4_dash container, avc1.4d400c@  31k, 30fps, video only, 414.60KiB
242          webm       426x240    240p   41k , webm_dash container, vp9@  41k, 30fps, video only, 549.02KiB
133          mp4        426x240    240p   60k , mp4_dash container, avc1.4d4015@  60k, 30fps, video only, 807.79KiB
243          webm       640x360    360p   67k , webm_dash container, vp9@  67k, 30fps, video only, 896.01KiB
134          mp4        640x360    360p  104k , mp4_dash container, avc1.4d401e@ 104k, 30fps, video only, 1.36MiB
244          webm       854x480    480p  105k , webm_dash container, vp9@ 105k, 30fps, video only, 1.38MiB
135          mp4        854x480    480p  170k , mp4_dash container, avc1.4d401f@ 170k, 30fps, video only, 2.22MiB
247          webm       1280x720   720p  198k , webm_dash container, vp9@ 198k, 30fps, video only, 2.58MiB
136          mp4        1280x720   720p  297k , mp4_dash container, avc1.64001f@ 297k, 30fps, video only, 3.87MiB
248          webm       1920x1080  1080p  291k , webm_dash container, vp9@ 291k, 30fps, video only, 3.79MiB
137          mp4        1920x1080  1080p  507k , mp4_dash container, avc1.640028@ 507k, 30fps, video only, 6.60MiB
271          webm       2560x1440  1440p  864k , webm_dash container, vp9@ 864k, 30fps, video only, 11.25MiB
313          webm       3840x2160  2160p 1589k , webm_dash container, vp9@1589k, 30fps, video only, 20.68MiB
18           mp4        640x360    360p  187k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 2.44MiB
22           mp4        1280x720   720p  425k , avc1.64001F, 30fps, mp4a.40.2 (44100Hz) (best)

Code: Select all

youtube-dl -f 251 https://www.youtube.com/watch?v=GVNO0_eR0FM
returns a .webm with opus

if you add -x :

Code: Select all

youtube-dl -f 251 -x https://www.youtube.com/watch?v=GVNO0_eR0FM
then you get the .opus only. Maybe a bug with youtube with your url, I'm not sure.
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Fri May 21, 2021 5:49 pm

Indeed,

Code: Select all

youtube -f<index for opus> -x <youtube ref>
allows to directly download opus file.
Easier than mkextract way of doing things.
Thks 4 ur attention, interest.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Fri May 21, 2021 6:45 pm

My bad :oops:, -x does its job selecting m4a as best when downloading initial url.
Thks 4 ur attention, interest & support.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Mon May 24, 2021 3:53 am

youtube-dl facebookurl gives me an mp4 by default.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4693
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

  • Quote

Post by Zucca » Mon May 24, 2021 7:15 am

One could use --prefer-ffmpeg and --merge-output-format ogg/mkv (choose one or the other).
This method does not support opus container, or at least --help does indicate that. However, if the argument is passed to ffmpeg unmodified it should still work.

... or one can make youtube-dl to pipe the output to ffmpeg, then

Code: Select all

ffmpeg -f ogg -i - -c:a copy -f opus to/file.opus
... or something along those lines. The conversion is lossless when using stream copy (-c:a copy).
Last edited by Zucca on Mon May 24, 2021 7:20 am, edited 1 time in total.
..: Zucca :..

Code: Select all

init=/sbin/openrc-init
-systemd -logind -elogind seatd
I am NaN! I am a man!
Top
Post Reply

8 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic