Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

retselseer

macrumors newbie
Original poster
Dec 14, 2011
9
0
I have been trying hard for a while to figure out how to create an Applescript application which I could use to successfully stream YouTube urls to mplayer. I have an executable bash script that can do it just fine. It contains just one line -
Code:
mplayer -loop 0 -really-quiet -geometry 1000x1000 -ontop -cache 8192 $(youtube-dl -g "$1")
I named it yt and I have it placed in the /opt/local/bin folder. To use it, I just copy a YouTube video url(e.g. http://www.youtube.com/watch?v=Ok6pI1iD8PU) and then open up a terminal window and type, "yt http://www.youtube.com/watch?v=Ok6pI1iD8PU" The video then plays in mplayer just fine. The reason I want an Applescript to do this is because I want to use it in conjunction with this Firefox addon I have called 'Open with...' Can anyone please help me with this endeavor of mine? Thanks.
 

kryten2

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
I have been trying hard for a while to figure out how to create an Applescript application which I could use to successfully stream YouTube urls to mplayer. I have an executable bash script that can do it just fine. It contains just one line -
Code:
mplayer -loop 0 -really-quiet -geometry 1000x1000 -ontop -cache 8192 $(youtube-dl -g "$1")
I named it yt and I have it placed in the /opt/local/bin folder. To use it, I just copy a YouTube video url(e.g. http://www.youtube.com/watch?v=Ok6pI1iD8PU) and then open up a terminal window and type, "yt http://www.youtube.com/watch?v=Ok6pI1iD8PU" The video then plays in mplayer just fine. The reason I want an Applescript to do this is because I want to use it in conjunction with this Firefox addon I have called 'Open with...' Can anyone please help me with this endeavor of mine? Thanks.


Couple of ways of doing this. The best would be to read through this old thread Simple scripts to stream videos to VLC and CorePlayer. If you want to jump right in, the information you need is at post #62 here.
 

retselseer

macrumors newbie
Original poster
Dec 14, 2011
9
0
I already looked through that thread and that one certain post in particular. According to post #63, I need to have xclip installed. From my research, I don't think xclip is available for Mac OS X at all. I tried installing it via MacPorts but to no avail. Just what could I use as an alternative?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.