8 ms·
youtube-dl -x --audio-format mp3 https://youtu.be/k3WkJq478To https://youtu.be/k3WkJq478To
by vhsdev 5y ago
youtube-dl -x --audio-format mp3 https://youtu.be/k3WkJq478To https://youtu.be/k3WkJq478To
- youngNed 5y agoOh - slight typo in that, try this: youtube-dl -x --audio-format mp3 https://youtu.be/dQw4w9WgXcQ
- Retr0id 5y agoThe transcode to mp3 is lossy. I just use `-f bestaudio` and call it a day.
- brnt 5y agoAren't all formats available on yt lossy transcodes?
- Retr0id 5y agoUsually, but there's no use in adding an extra layer of transcoding (I've never seen yt offer mp3 directly)
- alternatetwo 5y agoIt did once, over 10 years ago (in 2008 or so, with the whole fmt=18 arguments etc), if your total video bitrate was below 320 kbps, it left the audio untouched ... I wonder if those videos from back then are still around and if yes, still have untouched audio. Found one: https://www.youtube.com/watch?v=AavrI7RLU0g https://www.youtube.com/watch?v=AavrI7RLU0g Of course now it only has 96kbps aac, but it did have untouched mp3 audio back then. And another update, I downloaded it back in 2013, where it still had 160kbps mp3 audio! Note after formatting: As you can see from the video FPS, the trick was to keep the video bitrate as low as possible, by using a still image (or pad it with black + silence at the end). I'm not sure anymore if you had to also already use the same video codec as youtube did back then, i.e., if the video stayed untouched too. I never managed to upload a video like this, so I don't exactly know. MediaInfo output: General Complete name : Luke Warner and Mat Lock - Deep Psychosis (Daniel Kandi's Cure mix) (HQ).flv Format : Flash Video File size : 12.7 MiB Duration : 7 min 34 s Overall bit rate mode : Variable Overall bit rate : 234 kb/s httphostheader : r13---sn-4g57knek.c.youtube.com Video Format : Sorenson Spark Codec ID : 2 Duration : 7 min 34 s Bit rate : 69.5 kb/s Width : 480 pixels Height : 360 pixels Display aspect ratio : 4:3 Frame rate mode : Constant Frame rate : 1.044 FPS Bit depth : 8 bits Bits/(Pixel\*Frame) : 0.385 Stream size : 3.76 MiB (30%) Audio Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Format settings : Joint stereo / MS Stereo Codec ID : 2 Codec ID/Hint : MP3 Duration : 7 min 34 s Bit rate mode : Variable Bit rate : 160 kb/s Channel(s) : 2 channels Sampling rate : 44.1 kHz Compression mode : Lossy Delay relative to video : -131 ms Stream size : 8.68 MiB (68%) Writing library : LAME3.97
- hansel_der 5y agobestaudio is usually opus thou, which not all devices and app's can handle as seamless as mp3. ymmv
- Retr0id 5y ago`-f 'bestaudio[ext=m4a]'` is also an option - m4a is somewhat more widely supported than opus.
- twiclo 5y agoUse yt-dlp and pass it the SponsorBlock flags to auto skip intro/outro/sponsor/non-music sections. I used to use this to pipe videos into cmus or MPV but now just let a browser with ublock/sponsorblock go in the background
- deleted 5y ago[deleted]
- zirobi 5y agoNote this will download the video and ffmpeg the audio out of it, so you're no longer saving bandwidth.
- rasz 5y agoIncorrect. This will download 251 webm audio only │ 139.66MiB 134k https │ opus 134k 48000Hz medium, webm_dash and then use ffmpeg to reencode opus to mp3
- DarylZero 5y agoThe -x option will do that ONLY if no pure audio stream is available -- for youtube.com, this seems only to happen for live streams. More common on other sites. (Youtube-dl supports many different sites.)
- thunderarea 5y agoIs this a command in order to download the audio?
- thunderarea 5y agoIf so I think that is not an easy way to listen to music on YouTube if you have every time to download the song