vitor Posted June 22, 2019 Share Posted June 22, 2019 (edited) Run playadd and available options will appear to play the URL in the frontmost browser tab or your clipboard. Pick one of them and the URL will play. ⌘↵ downloads the video (requires DownMedia). The Hotkey is a shortcut to play the URL in the frontmost browser tab. If the close_tab Workflow Environment Variable is true and the URL is supported, the browser tabs with the matching URL will close. If the use_watchlist Workflow Environment Variable is true, streams will be added and played from WatchList (a separate Workflow). To play a stream you need mpv, IINA, or VLC. Download | Source Works well with WatchList Edited June 18, 2021 by vitor Link to comment
vitor Posted June 23, 2019 Author Share Posted June 23, 2019 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. Link to comment
paulw Posted June 23, 2019 Share Posted June 23, 2019 This is great, Vitor! How can I set up a default video player? Link to comment
vitor Posted June 24, 2019 Author Share Posted June 24, 2019 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? Link to comment
vitor Posted June 24, 2019 Author Share Posted June 24, 2019 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. Link to comment
paulw Posted June 24, 2019 Share Posted June 24, 2019 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. Link to comment
vitor Posted June 24, 2019 Author Share Posted June 24, 2019 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. Link to comment
multicolor Posted June 25, 2019 Share Posted June 25, 2019 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 Link to comment
vitor Posted June 25, 2019 Author Share Posted June 25, 2019 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. multicolor 1 Link to comment
multicolor Posted June 25, 2019 Share Posted June 25, 2019 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! Link to comment
vitor Posted June 25, 2019 Author Share Posted June 25, 2019 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. multicolor 1 Link to comment
paulw Posted June 27, 2019 Share Posted June 27, 2019 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! vitor 1 Link to comment
xilopaint Posted June 29, 2019 Share Posted June 29, 2019 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. Link to comment
vitor Posted June 29, 2019 Author Share Posted June 29, 2019 (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 June 29, 2019 by vitor Link to comment
xilopaint Posted June 29, 2019 Share Posted June 29, 2019 (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 June 29, 2019 by xilopaint Link to comment
vitor Posted June 29, 2019 Author Share Posted June 29, 2019 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. Link to comment
vitor Posted July 1, 2019 Author Share Posted July 1, 2019 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. Link to comment
vitor Posted January 20, 2020 Author Share Posted January 20, 2020 Update. Update video download to new DownMedia. 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. Link to comment
vitor Posted October 13, 2020 Author Share Posted October 13, 2020 (edited) Update. WatchList support. Set use_watchlist Workflow Environment Variable to true and streams will be added to WatchList and immediately played, allowing for better management of watched URLs if you use that Workflow. You’ll need to update WatchList for the new feature to work. 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. Edited October 13, 2020 by vitor Link to comment
vitor Posted June 18, 2021 Author Share Posted June 18, 2021 Update. Added a hotkey to play the frontmost browser 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. Link to comment
vitor Posted February 23, 2022 Author Share Posted February 23, 2022 Update. When closing the matching browser tab, do it for all windows. Also, improved handling in Safari. 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. Link to comment
vitor Posted March 30, 2022 Author Share Posted March 30, 2022 Update. Added Universal Action. 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. Link to comment
nammin Posted April 25, 2022 Share Posted April 25, 2022 can I add this to an app Infuse? Link to comment
vitor Posted April 25, 2022 Author Share Posted April 25, 2022 13 minutes ago, nammin said: can I add this to an app Infuse? Infuse doesn’t allow playing a URL directly from an argument, so no. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now