New tool: YouTube Sound Importer


(mogue) #1

Download: https://dl.dropboxusercontent.com/u/128528/mogue.googlespy.U2B.xrnx

Hey! I need your help with this tool. It hasn’t been tested for windows or linux. I need it to be tested to see if it works, there is a lot of platform specific code. Please help me out and post some feedback on these platforms. thanks!

YouTube Sound Importer is a renoise tool that allows you to import sound from a internet url to the selected sample.

Paste a link and press “Import Sample”:

4197 YouTube-DemoB.png

Watch the progress in the sample name:

4196 YouTube-DemoA.png

This tool was inspired by 29a’s freesound integration. I use a lot of samples from around the internet and after growing tired of youtube-mp3.org and other crappy conversion sites I decided to make this tool.

Technical details:

YouTube Sound Importer is a basic wrapper for youtube-dl to download video streams and ffmpeg to export the audio track.

Supported tubes/streams/webplayers: (according to youtube-dl --list-extractors)

[details=“Click to view contents”] 1up.com
220.ro
3sat
56.com
8tracks
AddAnime
AppleTrailers
archive.org
ARD
arte.tv
AUEngine
Bandcamp
blip.tv
blip.tv:user
Bloomberg
Break
Brightcove
canalc2.tv
canalplus.fr
CNN
CollegeHumor
ComedyCentral
CondeNast
Criterion
CSpan
dailymotion
DailymotionPlaylist
daum.net
DefenseGouvFr
DepositFiles
Dotsub
EbaumsWorld
eHow
Escapist
exfm
facebook
fernsehkritik.tv
fernsehkritik.tv:postecke
Flickr
francetvinfo.fr
Freesound
FunnyOrDie
GameSpot
Gametrailers
generic
Hark
HotNewHipHop
Howcast
Hypem
ign.com
Ina
InfoQ
Instagram
JeuxVideo
Jukebox
justin.tv
Kankan
keek
KickStarter
liveleak
Livestream
metacafe
Metacritic
mixcloud
MTV
muzu.tv
MySpass
myvideo
Naver
NBA
NBCNews
Newgrounds
Ooyala
ORF
PBS
photobucket
plus.google
pluzz.francetv.fr
Pornotube
RBMARadio
RedTube
RingTV
Roxwel
RTLnow
screen.yahoo:search
Sina
Slashdot
Slideshare
Sohu
soundcloud
soundcloud:set
soundcloud:user
southparkstudios.com
Spiegel
stanfordoc
Statigram
Steam
Teamcoco
techtv.mit.edu
TED
TF1
ThisAV
TrailerAddict
Trilulilu
Tudou
Tumblr
Tutv
Unistra
ustream
ustream:channel
Vbox7
VeeHD
Veoh
Vevo
Vice
video.google:search
video.mit.edu
videofy.me
vimeo
vimeo:channel
Vine
wat.tv
Weibo
Wimp
WorldStarHipHop
XHamster
XNXX
XVideos
Yahoo
YouJizz
Youku
YouPorn
youtube
youtube:channel
youtube:favorites
youtube:playlist
youtube:recommended
youtube:search
youtube:show
youtube:subscriptions
youtube:user
youtube:watch_later
ZDF

I have only tried a few, some don’t work. [/details]

Note: This tool is incomplete and might be buggy. Please remove and reinstall if you encounter any problems, reopening renoise might also be required. Doing so should clear the tool.


best way to record samples/clips?
(slippycurb) #2

this is great idea sonnyjim,thanks, but im afraid it doesnt seem to be working here on Win8…id give you the log file but there was no output from the tool in it(i checked)…i see windows powershell opening and the sample instrument says…"get info for http://www.youtube…etc…". the tool opens ok and picks up the link from the clipboard ok…but not alot else happens when i click “import sample”

http://www.flickr.com/photos/103130294@N02/9922812023/
thats from clicking “show samples folder”


(Djeroek) #3

Cool idea, but I don’t think it works right now in Windows Vista.

Nothing happens when trying to import a sample from a youtube link, pressing ‘show samples folder’ gives a windows error notice with a cmd.exe (commandline) black window screen behind it. Something about a path not being found. In my case:

C:\Users\plugexpert\AppData\Roaming\Renoise\V2.8.1\Scripts\Tools\mogue.googlespy…/samples/

This is an exact copy of how the path is described.


(neopan) #4

Awesome tool, it works here on OSX 10.6 :yeah:


(KMaki) #5

The errors might be because of the different path separator chars in Windows/Mac/Linux. Wasn’t it so that Mac/Linux use “/” and Win uses “”…? If so, the platform can be checked within script and the path can be so constructed platform specific.


(Conner_Bw) #6

You may be right, but contemporary Windows is compatible with the “/” symbol. Just wanted to bring that up.

I haven’t looked at the code but it could also be that it’s an escape sequence for the dot in a regular expression. Or it’s missing a trailing slash and messing up trying to do something relative.

The path posted by Jonas doesn’t look right at all.


(mogue) #7

Thanks for the replies.

I tried to fix the paths using absolute paths and double quotes. The link has been updated to a new v. 0.2 – please let me know if it works or not.


(slippycurb) #8

the show samples folder button now works…but “import sample” just updates tex in the samples list to “get info…” but doesnt download…its getting there though:-)

sorry meant to say on win8


(mogue) #9

Thx slippycurb.

youtube-dl requires python, do you have python on win8?


(vV) #10

Well, it still doesn’t work under Windows.
I still notice the forward slashes… it is usually a better practice to work with methods like:
slash = "/ "
if os.platform() = “WINDOWS” then
slash = “”
end

Python is not a default on any windows environment btw, so using tools that heavily depend on scripting environments is not really the preferred way to go on Windows.
I have Python installed, but the tool still doesn’t work from within Renoise.
If i execute it manually in powershell, it works, haven’t tested it in a normal cmd frame.
I did set the program compatibility mode to "Run as Admin"and attempted to use os.tmpname([pipefile].log) in order to have the piped output to a file created in the platform its temp folder (which is usually the best practice) but also in the tempfolder, i don’t see the piped output.

Also removed the ampersand sign that you pasted behind the end of the line, i’m not sure what it is for, but in Windows, not necessary.


(mogue) #11

thx vV, great input.

I have one question about the slash though. doesn’t “” escape the second double-quote in lua? so I need to write “\” right?


(slippycurb) #12

pyhton installed 3.3.2 …still no go here either…cant wait to directly sample from redtube…


(mogue) #13

Nice slippy!

I fixed some windows issues (I think).

Added automatic updates for youtube-dl
Fixed some extractors, including: TED and SoundCloud.

Updated download link to v. 0.21


(Djeroek) #14

I’m afraid it still doesn’t work in Windows Vista :( .

The ‘Show Samples Folder’ button works as it opens up the folder in a new explorer window. Trying to ‘Import Sample’ from the default youtube link does download the Moog Sub Phatty video into your script folder, but afterwards no sound is loaded into the sample slot! It says ‘Extracting audio …’ as sample name, but no percentage update or anything.

When I copy the empty sample named ‘Extracting audio …’ to a new instrument, an empty 44100Hz 8 bit mono sample is created.


(mogue) #15

thx Djeroek!

I think I realised the issue and fixed it. I updated the download link to v0.22 with minor changes for windows.

If the tool still stops at “Extracting audio …” then ffmpeg is failing to convert the video to wav. There should be a log in the " { tool path }\logs{ id number }.ffmpeg.log", you can open the log file in notepad.

Sorry for my crappy knowledge of the windows command line and thank you all for the help, this will work eventually!


(vV) #16

Try Virtualbox and some kind of shady appliance of Windows somewhere ;)


(mogue) #17

That’s some shady technology vV ;)/>

I think I’ll rather do some testing on a friends PC later on, but it might be a few days. So in the meantime does it work?

Edit: Nice suggestion though vV, I’m downloading and will try it if I have the time.


(Djeroek) #18

No, log says;

“De syntaxis van de bestandsnaam, mapnaam of volumenaam is onjuist.”

Which means something like ‘syntax of file name, folder name or volume is wrong’.


(img%) #19

on windows 8 64 bits it make appear a window and the screen become black and renoise crash


(HiddenCinnamon) #20

i just used it for the first time in windows 7 and it worked perfectly ^-^
however, i got the wrong youtube video, and now im trying it again to get the right one and it’s stuck on “Extracting Audio…” .m.

EDIT: i got it to work on a new instrument after restarting the importer, but it still seems a bit hit-and-miss as to whether it will work; some videos arent working at all