Show HN: Download any song without knowing its name
iyask.me
iyask.me
`play` will instantly play any song (great for parties), and `mp3` will download it: https://github.com/exogen/dotfiles/blob/730fb8e2b72b2fc3aa3d...
If the first result for your search isn't the song you want, I usually append "hq", "hd", or "album version".
youtube-dl: error: no such option: --youtube-skip-dash-manifest
As an error, am I missing something? response = urlopen('https://www.youtube.com/results?search_query=' + search)
command = 'youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 ' + video_link
Amazing how useful of a tool you can make with such little code. There is really some great libraries available today. youtube-dl -f bestaudio[ext=m4a] <youtube ID>
PS: you can replace m4a with mp3 but that will induce trasnscoding and loss of quality. YT's AAC tracks are usually the highest bitrate ones so it's best to leave it as is.>"bestaudio[ext=m4a]"
(First time I've ever used it but it wouldn't work for me without the quotes)
One smart thing he did was to create a new page every time someone downloaded a video, and at some point he was getting hundreds of thousands of daily visitors (I saw the Analytics charts).
# Youtube-dl is a proof that god exists.youtube-dl is a great tool ( supports multiple websites outside of youtube as well )
The problem is...if you use youtube-dl to rip songs from youtube you are going to be stuck with a not so great quality bitrate.
Based on some quick research, it looks like the top quality audio bitrate you can get currently get from youtube is 126.886 kbps. That's going to really reduce the quality of any song you rip from the site. Most songs are digitally released at 320kbps these days. CD quality is 192kbsp.
I'm curious, did you blind test yourself? I blind tested a friend of mine who kept saying so, and he did barely better than random.
I should have said 'if the frequency goes sufficiently low'.
Each audio sample is a signed 16-bit two's complement integer, with sample values ranging from −32768 to +32767. The source audio data is divided into frames, containing twelve samples each (six left and right samples, alternating), for a total of 192 bits (24 bytes) of audio data per frame.
https://en.wikipedia.org/wiki/Compact_Disc_Digital_Audio#Dat...
CDs store audio as 16 bit samples, with 44100 samples per second. This gives a bitrate of 16 bits * 44100 Hz = 705600 bits/second (705.6 Kbps). This is per channel, so the total bitrate of the format is 1411.2 kbps, as stated (modulo rounding) by the GP.
EDIT: in fact, the article you link specifically says (a couple sections further down) that the bitrate is 1411.2 kbps.
705600 * 2 = 1411200 # bits/s for stereo channel
80 * 60 = 4800 # seconds in 80 minutes
1411200 * 4800 = 6773760000 # bits in a 80 minutes CD
6773760000 / 8 / 1024 /1024 = 807 # In MBWhile a 'raw' redbook CD can hold ~850 MB, it is standard to included error correction codes so that a slightly scratched CD can still work.
This website can help you compare the bit rates and see if you can hear the difference. http://www.npr.org/sections/therecord/2015/06/02/411473508/h...
Sure looks a lot more productive to the boss than searching for your next track on YouTube. :)
A few people ask for music. They could have shazaamed it, but they don't.
It would also be great if I could pipe in the search and bypass confirmation, e.g:
> echo hide your love away | instantmusic -f
I haven't updated the package as yet.
import re, youtube_dl
from bs4 import BeautifulSoup
from urllib2 import urlopen
from urllib import quote_plus
ydl_opts = {}
soup = BeautifulSoup(urlopen('https://www.youtube.com/results?search_query=' + quote_plus('linkin')).read())
links = soup.find_all('a', href=re.compile(r'watch\?v='), class_='yt-uix-tile-link')
for i, link in enumerate(links):
print i+1, '-', link.text
choice = int(raw_input("Select song index : "))
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download(['http://www.youtube.com/' + links[choice-1].get('href')])Echoprint is open, I'll take a look at that. Echonest doesn't seem to have any service on their site (not sure how it's used).
I think it'd be nice to have a SoundHound/Shazam-style audio fingerprint downloader too: then you can either repeat lyrics, or get a quick soundbyte!
probably wouldn't be too hard, depending on what's available for voice recognition libs in Python; I haven't actually looked. Anyone know?
My testing env : Windows 8.1, MSYS2, Python 3. It's working flawlessly even with some obscur foreign/french lyrics/song/group.
I'm impressed. :)
I think the project is extremely cool and you have props from me - but I hate it when people try to skate the simple fact that stuff like this is illegal. ROMs and emulators have shown up on imgur many times as "free" - like as if the publishers have released the rights to the game(s).
if it was illegal why would it still exist publicly?
if something was illegal you bet your ass the USG will take it down.
Also, because everything which is not forbidden is allowed, one would need to show that youtube-dl is illegal, and not that youtube-dl is not illegal.
The jocular saying is that, in England, "everything which is not forbidden is allowed", while, in Germany, the opposite applies, so "everything which is not allowed is forbidden". This may be extended to France — "everything is allowed even if it is forbidden" — and Russia where "everything is forbidden, even that which is expressly allowed". While in North Korea it is said that "everything that is not forbidden is compulsory"
I kind of figured it would be obvious BUT....
> Two days after YouTube-MP3.org, a site that takes music videos and converts their songs into MP3 files, was blocked from accessing YouTube, the RIAA has asked CNET to remove software from Download.com that performs a similar function. CNET, which is owned by CBS, is the publisher of this news site. [1]
Here is information on youtube-mp3.org [2].
Please do see my other post [3].
I want to make it very clear - I do NOT agree with the rulings and RIAA bullying. If you want to be upset at someone - call your representatives and ask them to start passing laws that are in favor of scraping.
As an aside note - to expand on my original post. Emulators are not illegal by definition (unless they circumvent/bypass encryption - but that's a whole other ball of wax), downloading a free or open source community made ROM for the emulator is not illegal. It is, however, illegal to download a ROM for a copyrighted game. Now, Nintendo isn't going to come after you for playing an old NES game in the privacy of your home - it's still illegal but they aren't going to expend the legal resources and the amount of bad PR to make an example out of you. They may and probably will come after you if you sell or distribute said ROMS.
[1] http://www.cnet.com/news/riaa-to-cnet-follow-google-nix-vide...
[2] https://torrentfreak.com/youtube-mp3-fights-google-with-lawy...
It's about as illegal as violating a TOS.
The EFF's interpretation of the TPP makes it also seem like for any member country, it could also be liable for criminal penalties.
IANAL
...which in the US, due to the joy that is the CFAA, is pretty illegal and could result in jail time.
https://ilt.eff.org/index.php/Computer_Fraud_and_Abuse_Act_%...
> Although these are early scraping decisions, and the theories of liability are not uniform, it is difficult to ignore a pattern emerging that the courts are prepared to protect proprietary content on commercial sites from uses which are undesirable to the owners of such sites.
Straight from the youtube TOS [2]:
> Content is provided to you AS IS. You may access Content for your information and personal use solely as intended through the provided functionality of the Service and as permitted under these Terms of Service. You shall not download any Content unless you see a “download” or similar link displayed by YouTube on the Service for that Content. You shall not copy, reproduce, distribute, transmit, broadcast, display, sell, license, or otherwise exploit any Content for any other purposes without the prior written consent of YouTube or the respective licensors of the Content. YouTube and its licensors reserve all rights not expressly granted in and to the Service and the Content.
It's apparent the RIAA that is also against it [3]. If you ask the RIAA - they will most likely say you did not purchase a legal copy of it - so therefore you shouldn't own a digital copy of it. Thus making it piracy.
It appears my original stance got lost - I'm not saying I agree with it - but these are the cold hard facts.
[1] https://en.wikipedia.org/wiki/Web_scraping#Legal_issues
[2] https://www.youtube.com/t/terms
[3] https://www.techdirt.com/articles/20110208/01511613004/is-do...
Example: In the US, the AHRA that makes personal space shifting digital audio legal (relevant to the submission) is fairly limited in the media that can be used for copying. Though I agree that they're being used for basically the same thing, computer hard drives aren't covered.
A relevant quote from Wikipedia [1] that sums up why I think this act falls short of its purpose: "In each case, the principal distinction between what is and is not covered by the AHRA is determined by whether or not the device is marketed or designed (or in the case of media, commonly used by consumers) to make audio recordings, not the device's capabilities."
[1] https://en.wikipedia.org/wiki/Audio_Home_Recording_Act#Digit...
The more important thing is that space shifting to different media (digital, personal computer hard drive in this case) is legally treated differently. Though, to be honest, I'm not convinced that any personal recording protections would or should apply to the YouTube situation. It's just one way that the two differ.
Cache-Control
Expires
max-age
See https://developers.google.com/web/fundamentals/performance/o...
[1] (Note that the site is broken as of a few months.. it never caught on and I'm going to let the domain expire unless someone wants to have it (for free, just tell me what you're going to do with it).)
This was sufficient for me on OS X 10.10.5:
pip install instantmusic
brew install ffmpeg
instantmusic
> ...some lyrics...
afplay foo.mp3$ instantmusic
Enter songname/ lyrics/ artist.. or whatever
> used to be a thug
Making a Query Request!
Found: The Ambassador Christology Release Party I Used to be a Thug.mpg 11-22-99
Download song (y/n)? y
Downloading...
[generic] watch?v=YfE2-T1r-jw: Requesting header
[redirect] Following redirect to
https://www.youtube.com/watch?v=YfE2-T1r-jw
[youtube] YfE2-T1r-jw: Downloading webpage
[youtube] YfE2-T1r-jw: Downloading video info webpage
[youtube] YfE2-T1r-jw: Extracting video information
[youtube] YfE2-T1r-jw: Downloading DASH manifest
[youtube] YfE2-T1r-jw: Downloading DASH manifest
ERROR: unable to open for writing: [Errno 13] Permission denied: u'The Ambassador Christology Release Party I Used to be a Thug.mpg 11-22- 99-YfE2-T1r-jw.m4a.part