Jump to content
vitor

PlayAddress — Play the URL in the frontmost browser or clipboard

Recommended Posts

Posted (edited)

Run playadd and available options will appear to play the URL in the frontmost browser tab or your clipboard.


rAWiidy.png


Pick one of them and the URL will play. ⌘↵ downloads the video (requires DownVid; adds to WatchList if available).

 

If the close_tab Workflow Environment Variable is true and the URL is supported, the browser tabs with the matching URL will close.


To play a stream you need mpv, IINA, or VLC.


Download | Source

Edited by vitor

Share this post


Link to post

Update.


Fix closing Safari tab.


To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.
 

Share this post


Link to post
11 hours ago, paulw said:

This is great, Vitor!

 

Thank you for the kind words.

 

11 hours ago, paulw said:

How can I set up a default video player?

 

There’s no option for that right now. Which video player would you like as the default, and does it support playing URLs directly?

Share this post


Link to post

Update.


Instead of closing the current tab, all tabs in the frontmost window with the matching URL will be closed. This gets rid of duplicates and allows you to navigate to another tab while the script is getting the video.


To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.
 

Share this post


Link to post
5 hours ago, vitor said:

There’s no option for that right now. Which video player would you like as the default, and does it support playing URLs directly?

 

I was partly curious how it decides which app to open. It opened VLC, and then once I had installed IINA, it opened that instead. IINA seems like the better option to me, but I suppose setting a default and/or choosing a player in the action would appeal to people.

Share this post


Link to post
3 minutes ago, paulw said:

I was partly curious how it decides which app to open.

 

The answer to that is in the node labeled “Play video”.


It looks for (in order) mpv, IINA, and VLC. That order is due to the following thought process: VLC is the worst of the three1, but the most popular, so if you have it and one of the other two, you’re more likely to prefer one of them. IINA is based off mpv; it’s essentially less CLI and more GUI, so if you have mpv you’re more likely to prefer it.

 

14 minutes ago, paulw said:

but I suppose setting a default and/or choosing a player in the action would appeal to people.


I don’t think it would. Your previous comment suggests it’s making the right choice for you (IINA), and this is the same technique/order I’m using in both ShortFilms and WatchList. That I recall, no one ever wanted a different order in those, so I’m pretty confident in the choice. Also, don’t underestimate the toll of an extra option like having to choose a player in the action: most people don’t want to pick a different player every time, they want their chosen one to be used without having to think about.



1. Arguably, but this opinion is coming from years of obsessing over the best media player, even in the days before I used macOS and was on Linux. I remember it coming down to VLC and mplayer and the latter being superior both in perceived performance and image quality. mpv is based on mplayer and does a lot of things right. Additionally (and anecdotally), every macOS VLC user I’ve ever recommended mpv to has converted. Even you mentioned how IINA (based on mpv) seems to be the better option for you.

Share this post


Link to post

Hey,

 

 Love your workflows, often use DownVid! 

 

This one though doesn't quite work for me. I use IINA, and sometimes when trying to play the current tab it closes the tab but doesn't play it in the player, at most the workflow activates it. It always works when the player isn't running, but never when it's running. Nothing looks different in the debug log, so I'm not sure what's going on. 

 

Cheers

Share this post


Link to post
52 minutes ago, multicolor said:

Love your workflows, often use DownVid!

 

Thank you!

 

53 minutes ago, multicolor said:

It always works when the player isn't running, but never when it's running.

 

And thank you as well for giving reproducible steps — it made it way easier to identify the issue. It also happens with mpv; it seems the app instance gets the information (as you said, it activates), but if it was already open, it doesn’t take over, presumably to not take you out of whatever is currently playing.

 

Not a big deal. I’ve updated the Workflow to now always open a new app instance. Already released at the same URL.

Share this post


Link to post
51 minutes ago, vitor said:

Not a big deal. I’ve updated the Workflow to now always open a new app instance. Already released at the same URL.

Wow thanks, that was fast! Works great.

 

Now if one could wish for features, perhaps it would be possible to add further videos to the current playlist in the background if a video is already playing. That way one could queue a few videos and let it play. 

 

Though I do understand if that's not in scope of what you feel PlayAddress should be :)

 

Cheers anyhow!

Share this post


Link to post
48 minutes ago, multicolor said:

That way one could queue a few videos and let it play.

 

It’s not that I wouldn’t, it’s that I can’t. There’s no way to append to an already running playlist from the command line. You can get a similar effect by having them play sequentially (in the “Play video” node, on the last line, replace open -na with open -nWa), but that will only start the new file when the last one ends. That means that if you add a bunch of them in a row and then change your mind, there’s no way to edit it.


More importantly, this would work fine for mpv users because the player exits when playback ends, but that isn’t the case with IINA (no idea about VLC), at least by default, meaning you’d have to purposefully close the player when the video ends.

Share this post


Link to post
On 6/24/2019 at 1:51 PM, vitor said:

 

I don’t think it would. Your previous comment suggests it’s making the right choice for you (IINA), and this is the same technique/order I’m using in both ShortFilms and WatchList. That I recall, no one ever wanted a different order in those, so I’m pretty confident in the choice. Also, don’t underestimate the toll of an extra option like having to choose a player in the action: most people don’t want to pick a different player every time, they want their chosen one to be used without having to think about.

 

I appreciate your well thought out process here, and I agree!

Share this post


Link to post
On 6/24/2019 at 2:51 PM, vitor said:

The answer to that is in the node labeled “Play video”.


It looks for (in order) mpv, IINA, and VLC. That order is due to the following thought process: VLC is the worst of the three1, but the most popular, so if you have it and one of the other two, you’re more likely to prefer one of them. IINA is based off mpv; it’s essentially less CLI and more GUI, so if you have mpv you’re more likely to prefer it.

 

I'm an IINNA user. Why do you see mpv better than it? I don't know mpv and find IINA very good.

Share this post


Link to post
Posted (edited)
10 hours ago, xilopaint said:

Why do you see mpv better than it?

 

I didn’t said mpv was better than IINA, but that if you have both you’re more likely to prefer the former, which I do (I don’t have IINA installed). Some reasons why I prefer mpv:

  • IINA is a layer on top of mpv, so:
    • It’s bound to be less performant (and at the very least it feels like it is).
    • Has a slower update cycle.
    • I’m not yet convinced it’ll stick around (I’ve seen too many mplayer GUIs come and go).
  • By default, IINA does a few things I don’t like (there may be options to change those, but it’s not worth it considering the other reasons). Examples:
    • Open a file and it adds its whole directory as a playlist.
    • Doesn’t exit when playback ends.
  • My mpv config is highly customised: startup options; keyboard shortcuts (about 60); and even scripts1. IINA claims that you can use your mpv config with it, but when I tried it didn’t work.


IINA is better looking (apart from the icon), but not enough to mitigate the other points. But if I could get IINA’s interface on mpv, I would.


All that said, IINA is my default recommendation because it’s easier to use, and that’s the point. Seeing IINA as a simplification of mpv, it makes sense to think that if you have both installed you prefer the more complex one (otherwise you wouldn’t have it).

 


1. I’ve tried quite a few. At the moment I have just one that I wrote to activate Do Not Disturb when I set a video of over 20 minutes to fullscreen (and to deactivate when the player exits fullscreen or quits).

Edited by vitor

Share this post


Link to post
Posted (edited)

I'd like to give mpv a go but I'm uncertain that a CLI (and I love CLIs) could be practical for a video player. Would I need to memorize a bunch of command-line options to use mpv? How easy is searching subtitles with mpv? Is it easy to alternate it to Picture in Picture mode?

 

Also, I see mpv has a Homebrew formula and a cask. What's the difference?

Edited by xilopaint

Share this post


Link to post
5 minutes ago, xilopaint said:

I'd like to give mpv a go but I'm uncertain that a CLI (and I love CLIs) would be practical for a vide player.

 

You never need to touch the CLI if you don’t want to. It has an app bundle as well.

 

6 minutes ago, xilopaint said:

Would I need to memorize a bunch of options to use mpv?

 

Depends on what you do, I guess. I’ve set up my own keyboard shortcuts (mostly single characters) according to what’s logical for me. Some I could tell you the exact shortcut (even with modifiers) without looking at the keyboard, while others are position based.

 

I couldn’t tell you any of the defaults without looking them up.

 

12 minutes ago, xilopaint said:

How easy is searching subtitles with mpv?

 

There’s not a default function for it, that I know of. But there is a ready-made script. With it set up, you could press a single key and have the subtitle downloaded and loaded in the file.


Expect mpv to be more customisable but more barebones by default. For example, it can’t play streams unless you installed youtube-dl yourself (IINA has it bundled, I think).

 

23 minutes ago, xilopaint said:

Is it easy to alternate it to Picture in Picture mode?

 

It doesn’t yet have native support for it (don’t forget mpv is cross-platform, unlike IINA).


I fake it with Phoenix (I think at the time I’ve set that up, PiP wasn’t yet a thing).

 

26 minutes ago, xilopaint said:

I see mpv has a Homebrew formula and a cask. What's the difference?

 

For now, use either. The cask uses third-party builds (but that the main website links to, so are considered trustworthy) and will install the app bundle to /Applications. It’s one of those cases where we’re handling the formula/cask situation. There is a possibility the formula will eventually not provide the app bundle, but nothing planned as of now.

 

In sum, my advice would be to stick with IINA if you’re used to it and like it. I started using mpv before IINA existed and have a ton of work invested into its configuration that I can’t easily port (unless they’ve fixed that option). If I had heard of them both today, I might have gone with IINA. And who knows, maybe it will become the official GUI.

Share this post


Link to post

Update.


Handle cases of broken clipboard contents.


To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...