<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Knowledge Base (Posts about self-hosted)</title><link>https://bgstack15.ddns.net/blog/</link><description></description><atom:link href="https://bgstack15.ddns.net/blog/categories/self-hosted.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2022 &lt;a href="mailto:bgstack15@gmail.com"&gt;bgstack15&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-SA"
style="border-width:0; margin-bottom:12px;"
src="https://bgstack15.ddns.net/.images/l_by-sa_4.0_88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Sun, 24 Jul 2022 12:47:40 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Thoughts on self-hosted youtube alternatives</title><link>https://bgstack15.ddns.net/blog/posts/2022/07/24/thoughts-on-self-hosted-youtube-alternatives/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;The whole topic of self-hosted youtube alternatives is rather scant on the Internet, which surprised me.&lt;/p&gt;
&lt;p&gt;I found a nice &lt;a href="https://github.com/alexta69/metube"&gt;web-based yt-dlp frontend&lt;/a&gt;! I have a single Docker server for other purposes, so it was nice to play around with this metube. Ultimately it wasn't better than running yt-dlp in a terminal and dragging links into that command to append the url to the command.&lt;/p&gt;
&lt;p&gt;And for the viewing frontend, I tried &lt;a href="https://git.mills.io/prologic/tube"&gt;https://git.mills.io/prologic/tube&lt;/a&gt; which sounded so promising! The video upload operations never completed for me. I think it was trying to encode the videos (transcode?) but it never actually populated the web page with contents even after ffmpeg stopped running.&lt;/p&gt;
&lt;p&gt;So I then tried &lt;a href="https://github.com/mediacms-io/mediacms/"&gt;MediaCMS&lt;/a&gt; which I really, really wanted to like. It's a Django (python) app, which I have no experience with. I was unable to get this reverse-proxied behind Apache httpd under a virtual path (or prefix, i.e., https://example.com/media/). I gave up and then used a different port number, so all the traffic on port 1285 went to the application.
This one worked with uploaded videos. I had to change a few settings in the &lt;code&gt;deploy/docker/local_settings.py&lt;/code&gt;:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;MINIMUM_RESOLUTIONS_TO_ENCODE = [240, 360, 1080]
USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The last two are the bog-standard Django reverse-proxy instructions that deal with https. This is needed for any proxying tasks. I removed my manipulated STATIC_URL, MEDIA_URL, and FORCE_SCRIPT_NAME components which never actually completely worked.&lt;/p&gt;
&lt;p&gt;The MediaCMS web presentation looks slick. With the 1080 minimum resolution (which ended up producing a file twice as large as the 1080p files I uploaded), it was acceptable. There is even a little button over the video for "Cast video." From a mobile browser, the cast failed to send to my Chromecast. From a desktop's chromium, it did work to cast to a Chromecast. It started as screen mirroring, and then it asked me if I wanted to send just the video.&lt;/p&gt;
&lt;p&gt;So the usability was missing a little bit.&lt;/p&gt;
&lt;p&gt;And none of this was actually better than Jellyfin, and also just visiting the files over nfs, except the awesome youtube interface. The quadruple files per video was a little excessive but storage is cheap these days, right?&lt;/p&gt;</description><category>experiment</category><category>self-hosted</category><category>youtube</category><guid>https://bgstack15.ddns.net/blog/posts/2022/07/24/thoughts-on-self-hosted-youtube-alternatives/</guid><pubDate>Sun, 24 Jul 2022 12:41:04 GMT</pubDate></item></channel></rss>