My website!!!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
7.7 KiB

<!DOCTYPE html>
<meta charset="UTF-8">
<title>Kira Oakley - Simul-casting with Friends</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="all">
<h1>Simul-casting with Friends 📺</h1>
<p>A social event made more common in pandemic times has been <em>The Simulcast</em>:
watching a TV show or movie with friends over the internet, who are also social
<p>I'd watch my partner set it up, which would involve both parties calling each
other on the phone, loading up Netflix, and orally confirming timestamps before
announcing a "3, 2, 1, play!" countdown. It was kind of fun, but it was hard to keep in sync if somebody wanted to e.g. take a bathroom break.
And if one person is off by more than 1 or 2 seconds, it's easy for someone to
react to something that hasn't happened yet for the other party.</p>
<p>Here is what I've been using lately instead!</p>
<p>Last summer me and the rest of the <a href="">cabal</a> team received a grant from Mozilla to implement a subjective moderation system. One of the other participants in the grant program produced a really nice little web app called <a href=""></a>. It's a simulcasting program!</p>
<p>You can check it out for yourself if you'd like. You specify the media (HTTP URL or local file), people can join your "couch", and the playback is synchronized automatically. It also supports YouTube URLs and a few other popular video websites. What I really like about it is that you don't need to make an account to use it.</p>
<p>What's really unfortunate is that doesn't seem to be open source.</p>
<h2>Acquiring Media</h2>
<p>I like using bittorrent to acquire media. Only legally and copyright-free media, of course. Of course.</p>
<p>I particularly like <a href="">webtorrent-cli</a>.</p>
<p>To install it, you'll need to first install <a href="">NodeJS</a>. Then, on the command line, run <code>npm install -g webtorrent-cli</code>. You might need administrator/sudo privileges, depending on your configuration.</p>
<p>From here, you can use webtorrent-cli to download torrents from a magnet link
like so:</p>
webtorrent 'magnet:?xt=urn:btih:132313E...'
<p><img src="assets/webtorrent.png"/></p>
<p>Another torrent program I like is <a href="">rtorrent</a>, which gives finer control over torrents with many episodes/files, letting you selectively download a subset of files rather than the whole thing at once.</p>
<p><rtorrent screenshot></p>
<h2>Sharing Media</h2>
<p> has an upload-local-media option, but it requires that every participant has a copy of that media file locally.</p>
<h3>Via a Server</h3>
<p>If you have a server or VPS (Virtual Private Server, like <a href="">Linode</a>), then it's possible for you to upload your media file to your server and host it over HTTP, where you can then plug that URL into, and all participants will share it automatically, without needing to do any file transfers.</p>
<h3>Via IPFS</h3>
<p>If nobody in your group has a server, an alternative you could try is <a href="">IPFS</a>, a peer-to-peer file system program. Only the person with the media file to share needs to install it.</p>
<p>Once's installed, you can share the media file like so:</p>
<li>Run <code>ipfs add $MEDIA_FILE</code>, which adds it to your local IPFS repository. Note the file hash that it prints out.</li>
<li>Run <code>ipfs daemon</code>, which makes your local IPFS repository accessible by others, given they know the unique hash of the file.</li>
<li>Visit <code>$HASH</code>, where <code>$HASH</code> is the file hash printed out in step 1. This is a public IPFS-to-HTTP gateway. (This bridges the IPFS network and the web, which will make it easier to share your media without needing a server of your own, or using an annoying ad-ridden file sharing service.) The page may take a while to load -- the server is downloading the media file from your local machine.</li>
<p>Once you can confirm it loads (it'll probably start playing the media file in the browser), you can plug this URL into as the media URL! Now everyone can watch together.</p>
<p>NOTE: Depending on your router's configuration, this may not work. I've noticed that some routers have NATs (Network Address Translation) systems that make peer-to-peer sharing almost impossible. If the media never seems to load on, this might be what's happening to you.</p>
<h2>Preparing Media</h2>
<p>Sometimes I want to share films that aren't in my native language (English). I've noticed that the browser media player doesn't always support subtitles well.</p>
<p>One work-around for this is to bake the subtitles right into the media file, as in, making the subtitles part of the actual video data.</p>
<p><code>ffmpeg</code> (<code>avconv</code> on some systems) is perfect for this -- it's like a swiss-army knife for media processing.</p>
<p>Here is the command to run:
ffmpeg -i film.mp4 -vf -acodec copy -vcodec libx264 out.mp4
<p>Here's what we're telling <code>ffmpeg</code>:
<li><code>-i film.mp4</code>: use the movie file as an (i)nput.</li>
<li><code>-vf</code>: this is the subtitles file to use in this video filter (vf).</li>
<li><code>-acodec copy</code>: copy the original audio, since we aren't modifying it.</li>
<li><code>-vcodec libx264</code>: we can't copy the original video, since we're modifying it to include subtitles. I use x264 here, but you can specify whatever codec you'd like. The encoding may go faster if you choose the same codec as the source media.</li>
<li><code>out.mp4</code>: the media file to output.</p></li>
<p>Yay! Now your media is ready to share.</p>
<h2>Real-Time Voice Communication</h2>
<p>I like to have an audio line open with my friends while we watch, in case we need to communicate about bio-breaks or share feelings about something that happened in the movie.</p>
<p>There are many options for this:</p>
<li>a phone call.</li>
<li>some people like Zoom.</li>
<li>a little-known program called <a href="">mumble</a>. It's open source and audio-only. There are clients for desktop and mobile. There are public servers (of varying quality &amp; maturity), or someone in the group can run their own if they have access to a server.</li>
<li> has a built-in voice feature, but I don't know how good it is.</li>
<p>Honestly I'm kind of disappointed about the options for doing this, but it's at least possible without needing to use much annoying proprietary technology. I've used these tools several times and it's been much less stressful than coordinating over e.g. Netflix or some other proprietary streaming service.</p>
<p>I think there is room for improvement, especially using peer-to-peer technologies to facilitate group media streaming &amp; signalling for playback, and also for group voice chat.</p>
<p>And, of course, nothing beats actually being in the room with your friends for a good old fashioned movie night. :)</p>
<p>Happy viewing!</p>
<p>Write me feedback, corrections or comments at <code></code>!</p>