Play file path from clipboard

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
sh4d0w
New Cone
New Cone
Posts: 2
Joined: 20 Feb 2012 08:06

Play file path from clipboard

Postby sh4d0w » 20 Feb 2012 08:15

So my scenario is that I've copied a http link that I want to stream with vlc player to the clipboard. I would like to write a simple script that starts playing the file at the path on the clipboard. I've already tried

pbpaste | VLC -

pbpaste outputs the contents of the clipboard to stdout, so I was hoping VLC would then pick that up, read the path, and then play it, but apparently it expects an actual stream when you pipe things to it, not a filepath. I've tried something similar on windows that failed so I don't think this is OS-specific

Any thoughts?

Thanks,
sh4d0w

sh4d0w
New Cone
New Cone
Posts: 2
Joined: 20 Feb 2012 08:06

Re: Play file path from clipboard

Postby sh4d0w » 24 Feb 2012 19:29

posted this on stack overflow: http://stackoverflow.com/questions/9422 ... -clipboard

this rather simple and slightly mortifying one-liner does the trick: vlc -vvv $(pbpaste)


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 50 guests