aboutsummaryrefslogtreecommitdiff
path: root/build/blog/2014-12-23-mpv-launcher.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2017-04-28 19:05:18 +0200
committerneodarz <neodarz@neodarz.net>2017-04-28 19:05:18 +0200
commitcdabe7a75ea14f14ca8d4cd3bf9ac36cb1817531 (patch)
treea3a9557d77f376394bb8e49fc48dcdef556ecb38 /build/blog/2014-12-23-mpv-launcher.html
parentd08bc695f396f8e2d7fc96de7efe61818c7c9a15 (diff)
downloadmy_new_personal_website-cdabe7a75ea14f14ca8d4cd3bf9ac36cb1817531.tar.xz
my_new_personal_website-cdabe7a75ea14f14ca8d4cd3bf9ac36cb1817531.zip
Delete some usless file
Diffstat (limited to 'build/blog/2014-12-23-mpv-launcher.html')
-rw-r--r--build/blog/2014-12-23-mpv-launcher.html50
1 files changed, 0 insertions, 50 deletions
diff --git a/build/blog/2014-12-23-mpv-launcher.html b/build/blog/2014-12-23-mpv-launcher.html
deleted file mode 100644
index d941073d..00000000
--- a/build/blog/2014-12-23-mpv-launcher.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8"/>
-<meta content="pandoc" name="generator"/>
-<meta content="Zhiming Wang" name="author"/>
-<meta content="2014-12-23T00:51:05-0800" name="date"/>
-<title>mpv launcher</title>
-<link href="/img/apple-touch-icon-152.png" rel="apple-touch-icon-precomposed"/>
-<meta content="#FFFFFF" name="msapplication-TileColor"/>
-<meta content="/img/favicon-144.png" name="msapplication-TileImage"/>
-<meta content="width=device-width, initial-scale=1" name="viewport"/>
-<link href="/css/normalize.min.css" media="all" rel="stylesheet" type="text/css"/>
-<link href="/css/theme.css" media="all" rel="stylesheet" type="text/css"/>
-<link href="/css/highlight.css" media="all" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<div id="archival-notice">This blog has been archived.<br/>Visit my home page at <a href="https://zhimingwang.org">zhimingwang.org</a>.</div>
-<nav class="nav">
-<a class="nav-icon" href="/" title="Home"><!--blog icon--></a>
-<a class="nav-title" href="/"><!--blog title--></a>
-<a class="nav-author" href="https://github.com/zmwangx" target="_blank"><!--blog author--></a>
-</nav>
-<article class="content">
-<header class="article-header">
-<h1 class="article-title">mpv launcher</h1>
-<div class="article-metadata">
-<time class="article-timestamp" datetime="2014-12-23T00:51:05-0800">December 23, 2014</time>
-</div>
-</header>
-<p><strong><em>04/06/2015 update:</em></strong></p>
-<p>I just noticed that <code>daemonize</code> doesn't play too well with the OS; in particular, when you use dark menu bar on OS X Yosemite, apps launched with <code>daemonize</code> won't conform to that. So a native shell solution would be using <code>/bin/zsh</code> and run</p>
-<div class="sourceCode"><pre class="sourceCode zsh"><code class="sourceCode zsh">mpv <span class="ot">$@</span> <span class="kw">&amp;&gt;</span>/dev/null <span class="kw">&lt;</span>/dev/null <span class="kw">&amp;</span>!</code></pre></div>
-<p>instead.</p>
-<hr/>
-<p><a href="http://mpv.io"><code>mpv</code></a> is a nice simplistic video player (fork of MPlayer and mplayer2). The CLI is flawless (and you can run as many instances as you want), but when it comes to the OS X application bundle, there's one major annoyance. Each app bundle could only have one running instance (unless <code>open -n</code>’ed, which is not how sane people use app bundles), and one instance of <code>mpv</code> only supports one video. So, say I'm playing one video with the app bundle, and unsuspectingly opens another in Finder (which is associated to <code>mpv.app</code> by default), then the latter video immediately takes over, and the position in the first video is lost. That happens <em>a lot</em>.</p>
-<p>Today I finally gave this issue some serious thought (I've been on a bug report/enhancement request spree these days so it's natural for me to start thinking about enhancements). Turns out that there's a pretty simple workaround. I created an automator app <code>mpv-launcher.app</code> that does one thing: "Run Shell Script" (pass input as arguments)</p>
-<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">daemonize</span> /usr/local/bin/mpv <span class="st">"</span><span class="va">$@</span><span class="st">"</span></code></pre></div>
-<p>in the shell of your choice (for me the shell of choice is <code>zsh</code> since the env would be readily available from my <code>zshenv</code>). <code>daemonize</code>, as the name suggests, daemonizes the process so that the process doesn't block; this way, <code>mpv-launcher.app</code> immediately quits after launching, making multiple "instances" possible. (<code>daemonize</code> can be installed via <code>brew install daemonize</code>; note that you need to specify the full path of the command to daemonize, which in my case is <code>/usr/local/bin/mpv</code>). And there you go. Associate your video files to <code>mpv-launcher.app</code>. Launch as many instances as you want. Enjoy.</p>
-<p>By the way, I also filed an <a href="https://github.com/mpv-player/mpv/issues/1377">enhancement request</a> with <code>mpv-player/mpv</code>. We'll see what the developers can do. Hopefully the app bundle will support multiple videos out of box in the future.</p>
-</article>
-<hr class="content-separator"/>
-<footer class="footer">
-<span class="rfooter">
-<a class="rss-icon" href="/rss.xml" target="_blank" title="RSS feed"><!--RSS feed icon--></a><a class="atom-icon" href="/atom.xml" target="_blank" title="Atom feed"><!--Atom feed icon--></a><a class="cc-icon" href="https://creativecommons.org/licenses/by/4.0/" target="_blank" title="Released under the Creative Commons Attribution 4.0 International license."><!--CC icon--></a>
-<a href="https://github.com/zmwangx" target="_blank">Zhiming Wang</a>
-</span>
-</footer>
-</body>
-</html>