7 ms·
Half of what you want is easy: https://ytdl-org.github.io/youtube-dl/index.html https://ytdl-org.github.io/youtube-dl/index.html The excessive compression YT a
by paol 7y ago
Half of what you want is easy: https://ytdl-org.github.io/youtube-dl/index.html https://ytdl-org.github.io/youtube-dl/index.html
The excessive compression YT applies, only they can fix. It especially annoys me they take a SD definition source to mean "well surely the uploader doesn't care about the quality of this video, so lets apply the lowest quality setting to it". If you have a high quality but low resolution video you have to upsample it before uploading to get around this. But of course most SD videos on there didn't do this.
- est31 7y ago> Half of what you want is easy How can you download something in opus using youtube-dl? I mean downloading it in opus, not telling youtube-dl to download it in some other format and then convert it to opus. I've tried it on some of the videos and before reencoding, the audio was in vorbis which is a great format and at high bitrates not very distinguishable from opus, but still opus is better.
- gknoy 7y agoDownload options _might_ work, but depends on what formats are available: --prefer-free-formats Prefer free video formats unless a specific one is requested If opus is provided, you could probably download it this way, but I think your best bet is the post-processing method (which of course isn't perfect): -x, --extract-audio Convert video files to audio-only files (requires ffmpeg or avconv and ffprobe or avprobe) --audio-format FORMAT Specify audio format: "best", "aac", "flac", "mp3", "m4a", "opus", "vorbis", or "wav"; "best" by default; No effect without -x
- ihuman 7y agoYoutube-dl allows you to list all the formats you can download, and then choose exactly which audio and video formats to download and merge. https://github.com/ytdl-org/youtube-dl/blob/master/README.md#format-selection https://github.com/ytdl-org/youtube-dl/blob/master/README.md...
- est31 7y agoInteresting, for some reason it thinks that vorbis @128k has better quality than opus @160k. Youtube online player has the 160k version. Thanks!
- FabHK 7y agoFor opus, try youtube-dl -f 251 <url> However, as I don't use opus, I don't know how prevalent it is. (Use `youtube-dl -F <url>` to see all available formats.) EDIT to add: the above downloads only the audio, FWIW.
- lozf 7y agoUsing youtube-dl -f 251 $url Will download the ~160kbps opus audio if available, but it comes in a webm container, so I'll use something like ffmpeg -i "$file" -vn -acodec copy basename -s .webm "$file".ogg to repack it (without re-encoding) in to an ogg container for playback on Android. Many talks and lectures etc. could withstand the lossy transcoding to an even lower bitrate than Youtube offers (-f 249 = ~50kbps) but space isn't that much of a concern.
- FabHK 7y agoI have a little Automator workflow/Quick Action on my Mac that gets the current webpage from Safari, then runs a youtube-dl -f 140 "${@%%&*}" on it, so save the music to my home dir as an .m4a that I can then add to iTunes (obviously, that step could be automated as well). So, I don't have to visit YouTube more than necessary. It's conveniently triggered from the Safari->Services menu. I've checked one of the remastered videos, and not seen any better audio option.
- ihuman 7y ago> .m4a that I can then add to iTunes (obviously, that step could be automated as well) Since you're already using automator, you should be able to add the "run an applescript" action to add the file to itunes From https://dougscripts.com/itunes/itinfo/info03.php https://dougscripts.com/itunes/itinfo/info03.php: open Use this command to add a file to a Master Library ("Music", "Audiobooks", and so on, depending on the kind of track) and start play. Requires the alias of the file to open, which suggests you might want to use the AppleScript "choose file" command. tell application "iTunes" open (choose file) end tell
- pathartl 7y agoDownloading from YouTube and having an actual good quality version is not the same thing. YouTube's compression does a really poor job compared to other platforms... which makes sense when you figure how much they have to store.