<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yamil Llanos on Medium]]></title>
        <description><![CDATA[Stories by Yamil Llanos on Medium]]></description>
        <link>https://medium.com/@yllanos?source=rss-5d5713a165ff------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*LhRw1gI6okaeXFL-l86ZXA.jpeg</url>
            <title>Stories by Yamil Llanos on Medium</title>
            <link>https://medium.com/@yllanos?source=rss-5d5713a165ff------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 13:45:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yllanos/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to hardware-accelerate video transcoding via Quicksync (QSV) while retaining HDR using Linux…]]></title>
            <link>https://medium.com/@yllanos/how-to-hardware-accelerate-video-transcoding-via-quicksync-qsv-while-retaining-hdr-using-linux-afe25780718c?source=rss-5d5713a165ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/afe25780718c</guid>
            <category><![CDATA[encoding]]></category>
            <category><![CDATA[hdr]]></category>
            <category><![CDATA[videos]]></category>
            <category><![CDATA[ffmpeg]]></category>
            <category><![CDATA[gpu]]></category>
            <dc:creator><![CDATA[Yamil Llanos]]></dc:creator>
            <pubDate>Tue, 14 Jan 2025 22:11:22 GMT</pubDate>
            <atom:updated>2025-01-17T16:54:44.840Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to hardware-accelerate video transcoding via Quicksync (QSV) while retaining HDR using Linux, Docker and ffmpeg</h3><p>This is a follow-up to a <a href="https://medium.com/@yllanos/how-to-encode-a-4k-hdr-movie-using-ffmpeg-while-maintaining-selected-auio-tracks-intact-from-source-d1e2f6a16162">post I wrote a few years ago</a>, where I created a simple script to transcode video using a software-only approach.</p><p>I always wanted to revisit this with a way more efficient method, and finally here it is.</p><p>I will be explaining the requirements, environment, the process, how to monitor and check. Finally I will be leaving some comments about the whole thing.</p><p>Requirements:</p><ul><li>A fairly recent Linux version <strong>installed on bare metal</strong>. In my case, I am using Ubuntu <strong>Server</strong> with Kernel 6.8 but I guess 6.1 should do. Maybe 5.x should work but I haven’t tested it myself</li><li>An Intel CPU supporting Intel Quicksync. I am using a Core i3–12100 but anything 7th gen or above should work. As far as I know, you’ll get better results starting from 10th gen or above but do not quote me on that one (I am not sure).</li><li>Docker installed. I am using 27.2.0. The user that execute Docker processes needs to have admin privileges (no need to run Docker itself as root).</li></ul><p>You will also need a way to monitor the GPU usage, so go ahead and install:</p><pre>sudo apt install intel-gpu-tools</pre><p>Assuming you have a sample input file called “input.mkv” and you want to output to “output.mkv”, open up a terminal and execute:</p><pre>docker run --rm -it \<br>--device=/dev/dri:/dev/dri \<br>-v $(pwd):/config \<br>linuxserver/ffmpeg \<br>-hwaccel qsv \<br>-c:v hevc_qsv \<br>-hide_banner \<br>-ss 00:00:00 -t 00:10:00  \<br>-i /config/input.mkv \<br>-c:v hevc_qsv \<br>/config/output.mkv</pre><p>You will see some stuff like this on terminal output:</p><pre>**** adding /dev/dri/card1 to video group video with id 44 ****<br>**** creating video group video2ibb with id 109 ****<br>**** adding /dev/dri/renderD128 to video group video2ibb with id 109 ****<br><br>...<br><br>libva info: VA-API version 1.22.0<br>libva info: Trying to open /usr/local/lib/x86_64-linux-gnu/dri/iHD_drv_video.so<br>libva info: Found init function __vaDriverInit_1_22<br>libva info: va_openDriver() returns 0<br>libva info: VA-API version 1.22.0<br>libva info: Trying to open /usr/local/lib/x86_64-linux-gnu/dri/iHD_drv_video.so<br>libva info: Found init function __vaDriverInit_1_22<br>libva info: va_openDriver() returns 0<br>Stream mapping:<br>  Stream #0:0 -&gt; #0:0 (hevc (hevc_qsv) -&gt; hevc (hevc_qsv))<br>  Stream #0:1 -&gt; #0:1 (truehd (native) -&gt; vorbis (libvorbis))<br>Press [q] to stop, [?] for help<br><br>...<br><br>Stream #0:0(eng): Video: hevc, qsv(tv, bt2020nc/bt2020/smpte2084, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 1k tbn<br>      Metadata:<br>        BPS             : 68305721<br>        DURATION        : 01:48:57.531000000<br>        NUMBER_OF_FRAMES: 156744<br>        NUMBER_OF_BYTES : 55818846640<br>        SOURCE_ID       : 001011<br>        _STATISTICS_WRITING_APP: mkvmerge v89.0 (&#39;And the Melody Still Lingers On (Night in Tunisia)&#39;) 64-bit<br>        _STATISTICS_WRITING_DATE_UTC: 2025-01-06 12:03:47<br>        _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID<br>        encoder         : Lavc61.19.100 hevc_qsv<br>      Side data:<br>        Mastering Display Metadata, has_primaries:1 has_luminance:1 r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.000100, max_luminance=1000.000000<br>        Content Light Level Metadata, MaxCLL=1061, MaxFALL=244<br>        cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A<br>  Stream #0:1(eng): Audio: vorbis (oV[0][0] / 0x566F), 48000 Hz, 7.1, fltp (default)<br>      Metadata:<br>        title           : Surround 7.1<br>        BPS             : 4085322<br>        DURATION        : 01:48:57.532000000<br>        NUMBER_OF_FRAMES: 7845038<br>        NUMBER_OF_BYTES : 3338490756<br>        SOURCE_ID       : 001100<br>        _STATISTICS_WRITING_APP: mkvmerge v89.0 (&#39;And the Melody Still Lingers On (Night in Tunisia)&#39;) 64-bit<br>        _STATISTICS_WRITING_DATE_UTC: 2025-01-06 12:03:47<br>        _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID<br>        encoder         : Lavc61.19.100 libvorbis<br>[out#0/matroska @ 0x56cc86fc1c00] video:585752KiB audio:31776KiB subtitle:0KiB other streams:0KiB global headers:3KiB muxing overhead: 0.066697%<br>frame=14386 fps= 38 q=-0.0 Lsize=  617940KiB time=00:09:59.84 bitrate=8439.1kbits/s speed=1.59x</pre><p>And watch your first ten minutes get transcoded with hardware acceleration.</p><p>Then open a second terminal and execute:</p><pre>sudo intel_gpu_top</pre><p>And you’ll see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*acSqKtS0qsteCd9I9anEqw.png" /><figcaption>intel-gpu-top QSV transcoding monitoring</figcaption></figure><p>For this test, I fired up mediainfo and I got this on my output file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*gbqGZrfuJ-8j0mscx2UHEg.png" /><figcaption>mediainfo output</figcaption></figure><p>Which to me it suggested HDR from source file was retained. I still had to do my subjective test so I renamed the file and added it to my storage, then added it to my media player (Apple TV 4K + Infuse) connected to my TV and played the file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L0lQG3Blvw_izfj0xVoBjw.png" /><figcaption>HDR looking good</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8jb9s1l3dSEtOkzGgWqEzQ.png" /><figcaption>And there it is: HDR</figcaption></figure><p>NOTES:</p><ul><li>I had a long video so that’s why I added the line “-ss 00:00:00 -t 00:10:00” so I could test and encode just the first ten minutes. If you want to go ahead and encode the full duration, just remove that line from your script</li><li>I may revisit this post with a more detailed script that allows for slightly better customization. For example, in this example the audio is encoded to Vorbis format which I am not a huge fan of. Also: there are some options which I think are already deprecated by now.</li><li>It is <strong><em>very important</em></strong> that your server has a connected physical display or a virtual display using a dummy DisplayPort/HDMI plug. Otherwise this will not work</li></ul><p>PROs of this method:</p><ul><li>Apart from the requirements above and thanks to Docker, you don’t have to worry about a lot of stuff like building packages with a set of libraries, operating system specifics or initializing hardware devices.</li><li>Portability: You can easily take the script and run it on a different environment.</li><li>Platform agnostic: you can upgrade CPU and have a performance increase without changing a single line of code.</li><li>No GUI needed: perfect to run on headless servers. It may even be possible in Cloud/DC environments as long as you have access to GPU resources but I obviously don’t have that type of infrastructure to test on.</li></ul><p>CONs:</p><ul><li>You do need root permissions or a user with admin privileges to check GPU</li><li>It can be daunting to customize because ffmpeg is so big and has too many options depending on what you need</li></ul><p>Other comments:</p><ul><li>Years ago, I was so frustrated about how little documentation is there available for this type of stuff that it was very hard even to put together a basic software-only encode script. Guess what it is more or less still the same nowadays. I see people complaining and asking on Reddit all the time. Intel Communities is no help and there is so little people</li><li>I am constantly impressed by Docker. It is amazing all you can achieve with this technology. I suspected this may work because I have a media server with Plex running as a Docker container. Plex can transcode media using QuickSync as long as you have a screen connected (mentioned above) and you expose the device to your container. This is where I got the inspiration from. And guess what, the same maintainer had an ffmpeg container with the same interface and basic documentation so I gave it a try.</li><li>There should also be a way to do the same using VAAPI. This could open whole new set of possibilities like encoding using AMD GPUs, for example. I do own a recent AMD GPU but on a different machine that I do not use as playground, so sorry if there are no tests there. This only may justify a new post.</li><li>In theory, the same idea could be applicable to NVIDIA GPUs and NVENC. I no longer own an NVIDIA GPU so sorry again.</li></ul><p>I hope this helps somebody. Let me know if there is something I missed or you want to include. Or if you have time to work with me to build a more robust script we can share on GitHub. Enjoy</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afe25780718c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Unifi Controller on Synology NAS using Portainer + MacVlans (in 2023)]]></title>
            <link>https://medium.com/@yllanos/install-unifi-controller-on-synology-nas-using-portainer-macvlans-in-2023-fe00ba0dc713?source=rss-5d5713a165ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe00ba0dc713</guid>
            <category><![CDATA[macvlan]]></category>
            <category><![CDATA[portainer]]></category>
            <category><![CDATA[nas]]></category>
            <category><![CDATA[synology]]></category>
            <category><![CDATA[unifi-controller]]></category>
            <dc:creator><![CDATA[Yamil Llanos]]></dc:creator>
            <pubDate>Sun, 01 Jan 2023 17:02:40 GMT</pubDate>
            <atom:updated>2023-01-01T17:02:40.471Z</atom:updated>
            <content:encoded><![CDATA[<p>For a long time, I struggled when trying to install Unifi Controller on my Synology NAS. Sounds as easy as just installing any other Docker container but in my case it was just not possible. Every time I followed a tutorial, there was some kind of error or issue that wouldn’t let me complete this task.</p><p>I tried for months, and I had given up for the most part because furstration, but eventually came up with a solution that completely worked for me.</p><p>You will need:</p><ul><li>A Synology box with DSM 7.1.1–42962 Update 1 or later</li><li>Docker package for Synology version 20.10.3–1308 or later</li><li>An active user from Synology’s “admin” group (please do not use root to manage your NAS)</li><li>Command-line familiarity</li><li>Docker familiarity</li></ul><p><strong><em>Step #1</em></strong>: Enable SSH access on NAS. Go to Control Panel =&gt; Terminal &amp; SNMP. Then under Terminal tab, tick on Enable SSH service:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*aE2fV9ol87-vwH7kViMSYQ.png" /></figure><p><strong><em>Step #2</em></strong>: Create shared folders for Portainer and Unifi Controller. Go into File Station and create folders: /volume1/docker/Unifi /volume1/docker/Portainer</p><p>NOTE: I like to capitalize app’s names. Please take this into consideration as per show below.</p><p>It will have to look like this: (assuming you are on volume 1):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*agSjpvs_qxfdnBubCm6hJQ.png" /></figure><p><strong><em>Step #3</em></strong>: Install Portainer. Log in to your NAS and execute the following command (adjust your time zone accordingly):</p><pre>sudo docker run -d \<br>-p 9000:9000 -p 9443:9443 \<br>--name Portainer --restart=always \<br>-e TZ=America/Bogota \<br>-v /var/run/docker.sock:/var/run/docker.sock \<br>-v /volume1/docker/Portainer:/data portainer/portainer-ce:latest</pre><p>Step #4: find out the name of you nic device. Go into your ssh session on NAS and type:</p><pre>ip a</pre><p>OR</p><pre>ifconfig</pre><p>To get a list of network devices. it will most likely be something like “eth0”. In my case it is “eth4” as I am using a PCIe NIC. Just make sure you get the name of the device for the IP of your NAS.</p><p><strong><em>Step #5</em></strong>: Create a MacVlan config. This is not the MacVlan itself, just a config that we will need. Wait until Portainer is ready, then go into Networks menu on the left, then click on Add network button on top right:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_sugT3Cdd3XTV9PUn6Ijtg.png" /></figure><p>On Create network menu, choose a name. I chose “MacVConfig”. Under Driver, choose “macvlan” from the drop-down list. Make sure to choose the “Configuration” option. Under Parent network card, use the name of the device from step #4. Under Subnet, use your network parameters. For many people, it will be 192.168.1.0/24 which is the same as 192.168.1.0 with 255.255.255.0 mask (this is my case). Under gateway, write the IP of your router. Mine is 192.168.1.1 On IP range, you decide how many IPs you may use starting from a specific IP. I want to dedicate just 4 IPs starting from 192.168.1.50, so for me it will be 192.168.1.50/30</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/0*TX7Dvx1JaVZLWJbA.jpg" /><figcaption>You can also use a CIDR calculator if you need some help</figcaption></figure><p>Click on Create the network on the bottom, it should look kinda like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E_nSR9wRqnX5t5t95kKz7g.png" /></figure><p><strong><em>Step #6</em></strong>: Create MacVlan. On Portainer, go again into Networks =&gt; Add network. Under name, choose a name. I will be using “mvl”. Under Driver, choose “macvlan” from the drop-down list. Under Macvlan configuration, make sure to select “Creation” then choose “MacVConfig” from the drop-down list (the configuration we created before). Then activate “Enable manual container attachment”. Click on “Create the Network”. It should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XNnrEbAgoTuHhuPeBvXSPg.png" /></figure><p>If you need more help creating MacVlans, go watch the following videos:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fo7nn6Tv-PAw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Do7nn6Tv-PAw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fo7nn6Tv-PAw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f7c13bce142c26807120c5ce54743924/href">https://medium.com/media/f7c13bce142c26807120c5ce54743924/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F4741-YR31fM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4741-YR31fM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F4741-YR31fM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6d10356a92784782d35248c2b22f7443/href">https://medium.com/media/6d10356a92784782d35248c2b22f7443/href</a></iframe><p><strong><em>Step #7</em></strong>: Get PUID and PGID. Go into ssh session on ANS and issue the following command:</p><pre>id</pre><p>Take a note of the output and write it down. In my case, PUID=1024 and PGID=100 so I will be using that below.</p><p><strong><em>Step #8</em></strong>: Install Unifi Controller. Go into ssh session on NAS and use following command:</p><pre>sudo docker run -d \<br>--name=Unifi \<br>--network=&quot;mvl&quot; \<br>--ip=&quot;192.168.1.50&quot; \<br>-p 3478:3478/udp \<br>-p 10001:10001/udp \<br>-p 5514:5514/udp \<br>-p 8080:8080 \<br>-p 8443:8443 \<br>-e PUID=1024 \<br>-e PGID=100 \<br>-v /volume1/docker/Unifi:/config \<br>--restart always \<br>ghcr.io/linuxserver/unifi-controller</pre><p>Notice we are telling docker to create and run a container that uses “mvl” as network (the MacVlan we created on step #6). We are also telling it to set a specific IP for our container. Also notice the location where container files will be stored, adapt accordingly, if needed.</p><p>NOTE: the first time you launch unifi-controller, it will take a while. Just give it a few minutes.</p><p><strong><em>Step #9</em></strong>: Disable SSH access. We will do the opposite we did on step #1. Control Panel =&gt; Terminal &amp; SNMP. Then under Terminal tab, disable SSH.</p><p>If you go into your Synology Docker app, you will see your new containers under Overview:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-LN6HwuEReTQYCrpl2KXOw.png" /></figure><p>You can also confirm MacVlan creation under Network menu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HJqXpSbxwDuJZw1XQgX3Vw.png" /></figure><p>That’s it. Now you can run Unifi Controller on you NAS, having a dedicated IP to that service without having to worry about port conflicts on shared IP.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe00ba0dc713" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to encode a 4K HDR movie using ffmpeg while maintaining selected auio tracks intact from source]]></title>
            <link>https://medium.com/@yllanos/how-to-encode-a-4k-hdr-movie-using-ffmpeg-while-maintaining-selected-auio-tracks-intact-from-source-d1e2f6a16162?source=rss-5d5713a165ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1e2f6a16162</guid>
            <category><![CDATA[ffmpeg]]></category>
            <category><![CDATA[hdr]]></category>
            <category><![CDATA[video-encoding]]></category>
            <category><![CDATA[hevc]]></category>
            <category><![CDATA[4k]]></category>
            <dc:creator><![CDATA[Yamil Llanos]]></dc:creator>
            <pubDate>Wed, 25 Sep 2019 20:19:06 GMT</pubDate>
            <atom:updated>2019-10-01T17:06:30.517Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*CqXI0YZAt4UMg7TGqhIpHg.jpeg" /></figure><p>This is my second time writing about this. I had to take down the previous one due to an error I detected after publishing. But I’m confident we will be in a better shape now.</p><p>If you want to have the latest version of my code, please visit the <a href="https://github.com/yllanos/corozo">project’s repo on Github</a>. I may add more features or make some adjustments without notice, so make sure to to visit once in a while.</p><p>To start explaining how this script work, we will start by having a detailed look at mediainfo from a typical source file (in my case is a REMUX of some usual source material):</p><pre>General<br>Complete name                            : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos.mkv<br>Format                                   : Matroska<br>Format version                           : Version 4<br>File size                                : 57.0 GiB<br>Duration                                 : 2 h 15 min<br>Overall bit rate mode                    : Variable<br>Overall bit rate                         : 60.0 Mb/s<br>Movie name                               : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos<br>Encoded date                             : UTC 2019-04-16 06:09:30<br>Writing application                      : mkvmerge v32.0.0 (&#39;Astral Progressions&#39;) 64-bit<br>Writing library                          : libebml v1.3.7 + libmatroska v1.5.0<br>Cover                                    : Yes<br>Attachments                              : cover_land.jpg / small_cover.jpg / small_cover_land.jpg / cover.jpg</pre><pre>Video<br>ID                                       : 1<br>Format                                   : HEVC<br>Format/Info                              : High Efficiency Video Coding<br>Commercial name                          : HDR10<br>Format profile                           : Main 10@L5.1@High<br>Codec ID                                 : V_MPEGH/ISO/HEVC<br>Duration                                 : 2 h 15 min<br>Bit rate                                 : 44.9 Mb/s<br>Width                                    : 3 840 pixels<br>Height                                   : 2 160 pixels<br>Display aspect ratio                     : 16:9<br>Frame rate mode                          : Constant<br>Frame rate                               : 23.976 (24000/1001) FPS<br>Color space                              : YUV<br>Chroma subsampling                       : 4:2:0 (Type 2)<br>Bit depth                                : 10 bits<br>Bits/(Pixel*Frame)                       : 0.226<br>Stream size                              : 42.6 GiB (75%)<br>Title                                    : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos<br>Language                                 : English<br>Default                                  : No<br>Forced                                   : No<br>Color range                              : Limited<br>Color primaries                          : BT.2020<br>Transfer characteristics                 : PQ<br>Matrix coefficients                      : BT.2020 non-constant<br>Mastering display color primaries        : Display P3<br>Mastering display luminance              : min: 0.0020 cd/m2, max: 1000 cd/m2<br>Maximum Content Light Level              : 793 cd/m2<br>Maximum Frame-Average Light Level        : 679 cd/m2</pre><pre>Audio #1<br>ID                                       : 2<br>Format                                   : MLP FBA 16-ch<br>Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation<br>Commercial name                          : Dolby TrueHD with Dolby Atmos<br>Codec ID                                 : A_TRUEHD<br>Duration                                 : 2 h 15 min<br>Bit rate mode                            : Variable<br>Bit rate                                 : 4 137 kb/s<br>Maximum bit rate                         : 7 701 kb/s<br>Channel(s)                               : 8 channels<br>Channel layout                           : L R C LFE Ls Rs Lb Rb<br>Sampling rate                            : 48.0 kHz<br>Frame rate                               : 1 200.000 FPS (40 SPF)<br>Compression mode                         : Lossless<br>Stream size                              : 3.93 GiB (7%)<br>Title                                    : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos<br>Language                                 : English<br>Default                                  : Yes<br>Forced                                   : No<br>Number of dynamic objects                : 13<br>Bed channel count                        : 1 channel<br>Bed channel configuration                : LFE</pre><pre>Audio #2<br>ID                                       : 3<br>Format                                   : DTS XLL<br>Format/Info                              : Digital Theater Systems<br>Commercial name                          : DTS-HD Master Audio<br>Codec ID                                 : A_DTS<br>Duration                                 : 2 h 15 min<br>Bit rate mode                            : Variable<br>Bit rate                                 : 4 086 kb/s<br>Channel(s)                               : 8 channels<br>Channel layout                           : C L R LFE Lb Rb Lss Rss<br>Sampling rate                            : 48.0 kHz<br>Frame rate                               : 93.750 FPS (512 SPF)<br>Bit depth                                : 24 bits<br>Compression mode                         : Lossless<br>Stream size                              : 3.88 GiB (7%)<br>Title                                    : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos<br>Language                                 : English<br>Default                                  : No<br>Forced                                   : No</pre><pre>Audio #3<br>ID                                       : 4<br>Format                                   : AC-3<br>Format/Info                              : Audio Coding 3<br>Commercial name                          : Dolby Digital<br>Codec ID                                 : A_AC3<br>Duration                                 : 2 h 15 min<br>Bit rate mode                            : Constant<br>Bit rate                                 : 640 kb/s<br>Channel(s)                               : 6 channels<br>Channel layout                           : L R C LFE Ls Rs<br>Sampling rate                            : 48.0 kHz<br>Frame rate                               : 31.250 FPS (1536 SPF)<br>Bit depth                                : 16 bits<br>Compression mode                         : Lossy<br>Stream size                              : 622 MiB (1%)<br>Title                                    : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos<br>Language                                 : English<br>Service kind                             : Complete Main<br>Default                                  : No<br>Forced                                   : No</pre><pre>Audio #4<br>ID                                       : 5<br>Format                                   : AC-3<br>Format/Info                              : Audio Coding 3<br>Commercial name                          : Dolby Digital<br>Codec ID                                 : A_AC3<br>Duration                                 : 2 h 15 min<br>Bit rate mode                            : Constant<br>Bit rate                                 : 320 kb/s<br>Channel(s)                               : 2 channels<br>Channel layout                           : L R<br>Sampling rate                            : 48.0 kHz<br>Frame rate                               : 31.250 FPS (1536 SPF)<br>Bit depth                                : 16 bits<br>Compression mode                         : Lossy<br>Stream size                              : 311 MiB (1%)<br>Title                                    : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos<br>Language                                 : English<br>Service kind                             : Complete Main<br>Default                                  : No<br>Forced                                   : No</pre><pre>Audio #5<br>ID                                       : 6<br>Format                                   : AC-3<br>Format/Info                              : Audio Coding 3<br>Commercial name                          : Dolby Digital<br>Codec ID                                 : A_AC3<br>Duration                                 : 2 h 15 min<br>Bit rate mode                            : Constant<br>Bit rate                                 : 640 kb/s<br>Channel(s)                               : 6 channels<br>Channel layout                           : L R C LFE Ls Rs<br>Sampling rate                            : 48.0 kHz<br>Frame rate                               : 31.250 FPS (1536 SPF)<br>Bit depth                                : 16 bits<br>Compression mode                         : Lossy<br>Stream size                              : 622 MiB (1%)<br>Title                                    : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos<br>Language                                 : French<br>Service kind                             : Complete Main<br>Default                                  : No<br>Forced                                   : No</pre><pre>Audio #6<br>ID                                       : 7<br>Format                                   : E-AC-3<br>Format/Info                              : Enhanced AC-3<br>Commercial name                          : Dolby Digital Plus<br>Format profile                           : Blu-ray Disc<br>Codec ID                                 : A_EAC3<br>Duration                                 : 2 h 15 min<br>Bit rate mode                            : Constant<br>Bit rate                                 : 1 024 kb/s<br>Channel(s)                               : 8 channels<br>Channel layout                           : L R C LFE Ls Rs Lb Rb<br>Sampling rate                            : 48.0 kHz<br>Frame rate                               : 31.250 FPS (1536 SPF)<br>Compression mode                         : Lossy<br>Stream size                              : 995 MiB (2%)<br>Title                                    : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos<br>Language                                 : French<br>Service kind                             : Complete Main<br>Default                                  : No<br>Forced                                   : No</pre><pre>Audio #7<br>ID                                       : 8<br>Format                                   : E-AC-3<br>Format/Info                              : Enhanced AC-3<br>Commercial name                          : Dolby Digital Plus<br>Format profile                           : Blu-ray Disc<br>Codec ID                                 : A_EAC3<br>Duration                                 : 2 h 15 min<br>Bit rate mode                            : Constant<br>Bit rate                                 : 1 024 kb/s<br>Channel(s)                               : 8 channels<br>Channel layout                           : L R C LFE Ls Rs Lb Rb<br>Sampling rate                            : 48.0 kHz<br>Frame rate                               : 31.250 FPS (1536 SPF)<br>Compression mode                         : Lossy<br>Stream size                              : 995 MiB (2%)<br>Title                                    : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos<br>Language                                 : Spanish<br>Service kind                             : Complete Main<br>Default                                  : No<br>Forced                                   : No</pre><pre>Audio #8<br>ID                                       : 9<br>Format                                   : E-AC-3<br>Format/Info                              : Enhanced AC-3<br>Commercial name                          : Dolby Digital Plus<br>Format profile                           : Blu-ray Disc<br>Codec ID                                 : A_EAC3<br>Duration                                 : 2 h 15 min<br>Bit rate mode                            : Constant<br>Bit rate                                 : 1 024 kb/s<br>Channel(s)                               : 8 channels<br>Channel layout                           : L R C LFE Ls Rs Lb Rb<br>Sampling rate                            : 48.0 kHz<br>Frame rate                               : 31.250 FPS (1536 SPF)<br>Compression mode                         : Lossy<br>Stream size                              : 995 MiB (2%)<br>Title                                    : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos<br>Language                                 : German<br>Service kind                             : Complete Main<br>Default                                  : No<br>Forced                                   : No</pre><pre>Audio #9<br>ID                                       : 10<br>Format                                   : E-AC-3<br>Format/Info                              : Enhanced AC-3<br>Commercial name                          : Dolby Digital Plus<br>Format profile                           : Blu-ray Disc<br>Codec ID                                 : A_EAC3<br>Duration                                 : 2 h 15 min<br>Bit rate mode                            : Constant<br>Bit rate                                 : 1 024 kb/s<br>Channel(s)                               : 8 channels<br>Channel layout                           : L R C LFE Ls Rs Lb Rb<br>Sampling rate                            : 48.0 kHz<br>Frame rate                               : 31.250 FPS (1536 SPF)<br>Compression mode                         : Lossy<br>Stream size                              : 995 MiB (2%)<br>Title                                    : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos<br>Language                                 : Italian<br>Service kind                             : Complete Main<br>Default                                  : No<br>Forced                                   : No</pre><pre>Audio #10<br>ID                                       : 11<br>Format                                   : E-AC-3<br>Format/Info                              : Enhanced AC-3<br>Commercial name                          : Dolby Digital Plus<br>Format profile                           : Blu-ray Disc<br>Codec ID                                 : A_EAC3<br>Duration                                 : 2 h 15 min<br>Bit rate mode                            : Constant<br>Bit rate                                 : 1 024 kb/s<br>Channel(s)                               : 8 channels<br>Channel layout                           : L R C LFE Ls Rs Lb Rb<br>Sampling rate                            : 48.0 kHz<br>Frame rate                               : 31.250 FPS (1536 SPF)<br>Compression mode                         : Lossy<br>Stream size                              : 995 MiB (2%)<br>Title                                    : Movie.Name.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos<br>Language                                 : Japanese<br>Service kind                             : Complete Main<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #1<br>ID                                       : 12<br>Format                                   : UTF-8<br>Codec ID                                 : S_TEXT/UTF8<br>Codec ID/Info                            : UTF-8 Plain Text<br>Duration                                 : 2 h 8 min<br>Bit rate                                 : 49 b/s<br>Count of elements                        : 1501<br>Stream size                              : 46.5 KiB (0%)<br>Title                                    : English-SRT<br>Language                                 : English<br>Default                                  : Yes<br>Forced                                   : No</pre><pre>Text #2<br>ID                                       : 13<br>Format                                   : UTF-8<br>Codec ID                                 : S_TEXT/UTF8<br>Codec ID/Info                            : UTF-8 Plain Text<br>Duration                                 : 2 h 8 min<br>Bit rate                                 : 51 b/s<br>Count of elements                        : 1647<br>Stream size                              : 49.0 KiB (0%)<br>Title                                    : English-SDH-SRT<br>Language                                 : English<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #3<br>ID                                       : 14<br>Format                                   : UTF-8<br>Codec ID                                 : S_TEXT/UTF8<br>Codec ID/Info                            : UTF-8 Plain Text<br>Duration                                 : 1 h 12 min<br>Bit rate                                 : 1 b/s<br>Count of elements                        : 27<br>Stream size                              : 674 Bytes (0%)<br>Title                                    : English-FORCED-SRT<br>Language                                 : English<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #4<br>ID                                       : 15<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 8 min<br>Bit rate                                 : 34.4 kb/s<br>Count of elements                        : 3300<br>Stream size                              : 31.7 MiB (0%)<br>Title                                    : English-PGS<br>Language                                 : English<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #5<br>ID                                       : 16<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 14 min<br>Bit rate                                 : 30.6 kb/s<br>Count of elements                        : 2994<br>Stream size                              : 29.5 MiB (0%)<br>Title                                    : French-PGS<br>Language                                 : French<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #6<br>ID                                       : 17<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 14 min<br>Bit rate                                 : 24.2 kb/s<br>Count of elements                        : 2934<br>Stream size                              : 23.3 MiB (0%)<br>Title                                    : French-PGS<br>Language                                 : French<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #7<br>ID                                       : 18<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 14 min<br>Bit rate                                 : 31.5 kb/s<br>Count of elements                        : 3096<br>Stream size                              : 30.4 MiB (0%)<br>Title                                    : Spanish-PGS<br>Language                                 : Spanish<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #8<br>ID                                       : 19<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 8 min<br>Bit rate                                 : 27.2 kb/s<br>Count of elements                        : 2902<br>Stream size                              : 25.1 MiB (0%)<br>Title                                    : German-PGS<br>Language                                 : German<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #9<br>ID                                       : 20<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 14 min<br>Bit rate                                 : 35.9 kb/s<br>Count of elements                        : 3076<br>Stream size                              : 34.7 MiB (0%)<br>Title                                    : Italian-PGS<br>Language                                 : Italian<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #10<br>ID                                       : 21<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 14 min<br>Bit rate                                 : 18.9 kb/s<br>Count of elements                        : 2668<br>Stream size                              : 18.2 MiB (0%)<br>Title                                    : Japanese-PGS<br>Language                                 : Japanese<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #11<br>ID                                       : 22<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 14 min<br>Bit rate                                 : 28.7 kb/s<br>Count of elements                        : 3072<br>Stream size                              : 27.7 MiB (0%)<br>Title                                    : Norwegian-PGS<br>Language                                 : Norwegian<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #12<br>ID                                       : 23<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 14 min<br>Bit rate                                 : 23.8 kb/s<br>Count of elements                        : 1950<br>Stream size                              : 23.0 MiB (0%)<br>Title                                    : Swedish-PGS<br>Language                                 : Swedish<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #13<br>ID                                       : 24<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 1 h 12 min<br>Bit rate                                 : 628 b/s<br>Count of elements                        : 56<br>Stream size                              : 333 KiB (0%)<br>Title                                    : English-FORCED-PGS<br>Language                                 : English<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #14<br>ID                                       : 25<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 12 min<br>Bit rate                                 : 381 b/s<br>Count of elements                        : 32<br>Stream size                              : 369 KiB (0%)<br>Title                                    : French-FORCED-PGS<br>Language                                 : French<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #15<br>ID                                       : 26<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 12 min<br>Bit rate                                 : 180 b/s<br>Count of elements                        : 18<br>Stream size                              : 175 KiB (0%)<br>Title                                    : French-FORCED-PGS<br>Language                                 : French<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #16<br>ID                                       : 27<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 12 min<br>Bit rate                                 : 623 b/s<br>Count of elements                        : 76<br>Stream size                              : 605 KiB (0%)<br>Title                                    : Spanish-FORCED-PGS<br>Language                                 : Spanish<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #17<br>ID                                       : 28<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 1 h 12 min<br>Bit rate                                 : 675 b/s<br>Count of elements                        : 62<br>Stream size                              : 358 KiB (0%)<br>Title                                    : German-FORCED-PGS<br>Language                                 : German<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #18<br>ID                                       : 29<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 12 min<br>Bit rate                                 : 546 b/s<br>Count of elements                        : 72<br>Stream size                              : 529 KiB (0%)<br>Title                                    : Italian-FORCED-PGS<br>Language                                 : Italian<br>Default                                  : No<br>Forced                                   : No</pre><pre>Text #19<br>ID                                       : 30<br>Format                                   : PGS<br>Muxing mode                              : zlib<br>Codec ID                                 : S_HDMV/PGS<br>Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs<br>Duration                                 : 2 h 12 min<br>Bit rate                                 : 509 b/s<br>Count of elements                        : 68<br>Stream size                              : 493 KiB (0%)<br>Title                                    : Japanese-FORCED-PGS<br>Language                                 : Japanese<br>Default                                  : No<br>Forced                                   : No</pre><pre>Menu<br>00:00:00.000                             : en:Chapter 01<br>00:03:28.666                             : en:Chapter 02<br>00:13:31.727                             : en:Chapter 03<br>00:17:57.826                             : en:Chapter 04<br>00:22:25.260                             : en:Chapter 05<br>00:33:20.415                             : en:Chapter 06<br>00:41:27.276                             : en:Chapter 07<br>00:51:37.094                             : en:Chapter 08<br>00:58:23.958                             : en:Chapter 09<br>01:07:40.347                             : en:Chapter 10<br>01:16:21.994                             : en:Chapter 11<br>01:24:42.744                             : en:Chapter 12<br>01:32:17.698                             : en:Chapter 13<br>01:37:06.237                             : en:Chapter 14<br>01:49:12.963                             : en:Chapter 15<br>01:55:03.563                             : en:Chapter 16<br>02:01:11.347                             : en:Chapter 17<br>02:06:21.991                             : en:Chapter 18</pre><p>NOTE: I use <a href="https://mediaarea.net/en/MediaInfo">MediaInfo</a> to get my metadata.</p><p>So basically every of those files will usually have the following catagories of objects: general file info, Video info, Audio Info, Subtitle info and Chapter info. That means we will have local information (at the category level) but also absolute information (at the file level), and <em>each object will have some kind of ID at both levels</em>. For example, this file has a DTS-HD MA audio track which locally is known as “Audio #2”, but it also has an absolute ID=3. Similarly, the Spanish language subtitle track has a local name as “Text #7” but ID=18. Understanding this structure is key to successfully map tracks and metadata to ffmpeg for processing.</p><p>The basic ffmpeg usage is as follows:</p><pre><em>ffmpeg -i input.file output.file</em></pre><p>I’m going to go ahead and paste most of the script here, then I will generally explain each part (be warned: I’m no expert in ffmpeg and/or video encoding):</p><pre>ffmpeg -hide_banner \<br>-i &quot;../storage/My.Source.Movie.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos.mkv&quot; \<br>-pix_fmt yuv420p10le \<br>-map_chapters 0 \<br>-metadata title=&quot;My Awesome Movie (2019)&quot; \<br>-map 0:0 -metadata:s:v:0 language=eng -metadata:s:v:0 title=&quot;My Awesome Movie (2019)&quot; \<br>-map 0:1 -metadata:s:a:0 language=eng -metadata:s:a:0 title=&quot;Dolby TrueHD 7.1 (Atmos)&quot; \<br>-map 0:7 -metadata:s:a:0 language=spa -metadata:s:a:1 title=&quot;EAC-3 7.1&quot; \<br>-map 0:2 -metadata:s:a:0 language=eng -metadata:s:a:2 title=&quot;DTS-HD MA 7.1&quot; \<br>-map 0:4 -metadata:s:a:0 language=eng -metadata:s:a:3 title=&quot;AC-3 2.0&quot; \<br>-metadata:s:t:0 filename=&quot;&quot; -metadata:s:t:0 mimetype=&quot;image/jpeg&quot; \<br>-c:v libx265 -preset fast -crf 21 \<br>-x265-params keyint=60:bframes=3:vbv-bufsize=75000:vbv-maxrate=75000:hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte-st-2084:colormatrix=bt2020nc:master-display=&quot;G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500)&quot; \<br>-c:a copy \<br>My.Movie.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos.mkv</pre><p>One thing to note here is that <em>ffmpeg indexes start at zero</em> (while on file metadata starts at one), so to map an object we will have to rely on absolute IDs. More on this later.</p><p><strong>-hide_banner</strong>: It hides tome information that ffmpeg will print to terminal and which I’m not interested in.</p><p><strong>-i</strong>: input file. Can be absolute or relative location of course. ffmpeg accepts multiple input files, where the first one always is zero (remember I mentioned ffmpeg’s indexes start at zero).</p><p><strong>-pix_fmt yuv420p101e</strong>: Sets the pixel format. I guess you could try a format with 4:4:0 cromacity, but 4:2:0 gives better compatibility</p><p><strong>-map_chapters</strong> 0: This option will create a chapters category on our destination file. Our zero parameter means copy whatever is on our first (and only) input file.</p><p><strong>-metadata</strong>: this option will add a metadata tag with parameter <em>title</em>, where we will specify our movie name. I recommend using the same name you will find on themoviedb.org</p><p><strong>-map 0:0</strong>: this option adds a metadata entry for video track (-metadata:s:v:0) then, parameter <em>language</em> will define the language of that object based on a three-character code. Then within this, we will add yet another metadata entry for video and put it on our first category track (-metadata:s:v:0). Finally, we will add a <em>title</em>, which can be the same as the file metadata title.</p><p><strong>-map 0:1</strong>: Similar to our step above, but this time this will be specifically for our Dolby TrueHD track. The zero means “take it from our firtsh input file”, the one means “take it from absolute ID=2–1=1”. Notice this time the entry is again zero on our destination track because this is a new category (now it is audio, previous step was video). After mapping that information to our first local audio track (-metadata:s:a:0), we add a <em>title</em> parameter.</p><p><strong>-map 0:7</strong>: Similar as we did before, but this time we will get track with ID=8–1=7 and then specify spanish as language to our second audio track (-metadata:s:a:1)</p><p>I will skip -map 0:2 and -map 0:4 as you may have got the idea up to this point.</p><p><strong>-metadata:s:t:0</strong>: This part is required for MKV container. A cover image can be specified on <em>filename</em> parameter. Mine is blank.</p><p><strong>-c:v libx265</strong>: This option specifies we will be encoding to a HEVC video track using libx265 library</p><p><strong>-preset</strong>: This will set our preset <a href="https://x265.readthedocs.io/en/default/presets.html">as defined by x265 library</a>. Parameter on <em>fast</em> works fine for my needs</p><p><strong>-crf</strong>: Constant Rate Factor. It is a number to help us set a subjective quality. I have balanced mine on 18-21 value. <a href="https://slhck.info/video/2017/02/24/crf-guide.html">More info here</a>.</p><p><strong>-x265-params</strong>: Specific parameters for HEVC encoding. I recommend not altering any of these as it will guarantee you will have an HDR output compatible with many devices.</p><p><strong>-c:a</strong>: This option specify we will be “encoding” a <em>copy</em> of our audio tracks to our destination file. No real encoding, just copy them as they are.</p><p>And finally we will be writing to file “My.Movie.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos.mkv”</p><p>HOWEVER (please keep reading!), before actually commiting to a long encoding job, I recommend to try first a section of your source file, just to encode a relatively quick version and check for quality. I prefer to encode exactly from 00:10:00 to 00:20:00 on every movie, so the script will end up in something like:</p><pre>ffmpeg -hide_banner \<br>-i &quot;../storage/My.Source.Movie.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos.mkv&quot; \<br><strong>-ss 00:10:00 -t 00:10:00 \</strong><br>-pix_fmt yuv420p10le \<br>-map_chapters 0 \<br>-metadata title=&quot;My Awesome Movie (2019)&quot; \<br>-map 0:0 -metadata:s:v:0 language=eng -metadata:s:v:0 title=&quot;My Awesome Movie (2019)&quot; \<br>-map 0:1 -metadata:s:a:0 language=eng -metadata:s:a:0 title=&quot;Dolby TrueHD 7.1 (Atmos)&quot; \<br>-map 0:7 -metadata:s:a:0 language=spa -metadata:s:a:1 title=&quot;EAC-3 7.1&quot; \<br>-map 0:2 -metadata:s:a:0 language=eng -metadata:s:a:2 title=&quot;DTS-HD MA 7.1&quot; \<br>-map 0:4 -metadata:s:a:0 language=eng -metadata:s:a:3 title=&quot;AC-3 2.0&quot; \<br>-metadata:s:t:0 filename=&quot;&quot; -metadata:s:t:0 mimetype=&quot;image/jpeg&quot; \<br>-c:v libx265 -preset fast -crf 18 \<br>-x265-params keyint=60:bframes=3:vbv-bufsize=75000:vbv-maxrate=75000:hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte-st-2084:colormatrix=bt2020nc:master-display=&quot;G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500)&quot; \<br>-c:a copy \<br>My.Movie.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos.mkv</pre><p>Which will produce a 10-minute sample.</p><p>Finally, it is obvious that is not a good idea to have a job this long tied to our terminal session. So, we can use the nohup command to submit this job as a backgroud task and log it’s output to a file. Like this:</p><pre>nohup ffmpeg -hide_banner \<br>-i &quot;../storage/My.Source.Movie.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos.mkv&quot; \<br>-pix_fmt yuv420p10le \<br>-map_chapters 0 \<br>-metadata title=&quot;My Awesome Movie (2019)&quot; \<br>-map 0:0 -metadata:s:v:0 language=eng -metadata:s:v:0 title=&quot;My Awesome Movie (2019)&quot; \<br>-map 0:1 -metadata:s:a:0 language=eng -metadata:s:a:0 title=&quot;Dolby TrueHD 7.1 (Atmos)&quot; \<br>-map 0:7 -metadata:s:a:0 language=spa -metadata:s:a:1 title=&quot;EAC-3 7.1&quot; \<br>-map 0:2 -metadata:s:a:0 language=eng -metadata:s:a:2 title=&quot;DTS-HD MA 7.1&quot; \<br>-map 0:4 -metadata:s:a:0 language=eng -metadata:s:a:3 title=&quot;AC-3 2.0&quot; \<br>-metadata:s:t:0 filename=&quot;&quot; -metadata:s:t:0 mimetype=&quot;image/jpeg&quot; \<br>-c:v libx265 -preset fast -crf 18 \<br>-x265-params keyint=60:bframes=3:vbv-bufsize=75000:vbv-maxrate=75000:hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte-st-2084:colormatrix=bt2020nc:master-display=&quot;G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500)&quot; \<br>-c:a copy \<br>My.Movie.2019.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos.mkv  &gt; job.log &amp;</pre><p>Then, whenever we want to check the progress of our encoding, we can use:</p><pre>tail -f job.log</pre><p>As in many video encoding things, this may be a matter of trial and error. So make sure to tweak your parameters based on your particular requirements.</p><p>NOTE: This script was tested on Linux with ffmpeg version 3.x</p><p>I hope this helps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1e2f6a16162" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Going 10G: My experience in adding 10 Gigabit networking on the cheap (sort of)]]></title>
            <link>https://medium.com/@yllanos/going-10g-my-experience-in-adding-10-gigabit-networking-on-the-cheap-sort-of-d637cccd22a?source=rss-5d5713a165ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/d637cccd22a</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[10gbe-switch]]></category>
            <category><![CDATA[10gbit]]></category>
            <dc:creator><![CDATA[Yamil Llanos]]></dc:creator>
            <pubDate>Sun, 27 Jan 2019 21:52:21 GMT</pubDate>
            <atom:updated>2019-01-27T21:52:21.504Z</atom:updated>
            <content:encoded><![CDATA[<p>So I have been toying with the idea of 10G networking. <a href="https://medium.com/@yllanos/my-perfect-2018-media-server-openmediavault-nas-storage-multimedia-services-53e74ea33af3">Specially since I built a NAS</a> for my needs, so 10Gbe seems like part of my natural progression.</p><p>I was looking at this for weeks, but most of the time this looked like difficult unless I was willing to spend quite a bit of cash into this… until I stumbled with this video:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FMDiiHN0MPdA%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DMDiiHN0MPdA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FMDiiHN0MPdA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ccb1266c86f1c39b87810d3bec5571da/href">https://medium.com/media/ccb1266c86f1c39b87810d3bec5571da/href</a></iframe><p>Which kinda suprised me in terms of low implementation complexity. Also, this idea was right around my budget (more on this later). Even my use case and setup was similar, and I immediately knew this was my starting point.</p><p>Here is a list of things I consider “reasonable” for this project:</p><ul><li>Budget: $200–$250 USD. So yes, this is the part where it might be cheap or not. To me, spending this amount is… acceptable. For you it might not. This technology doesn’t really come cheap, specially since in most cases this is not currently oriented towards home environments. Perhaps some day economy of scale will allow the transition to 10G way cheaper than now. Given I don’t live on the US, and I will have to be importing every single component, if I exchange this investment into local currency then yeah, this is hell of expensive. I don’t think I know someone personally willing to spend this on just a home network change. But to me it is worth it because is really educational and I like it. Still, I don’t have unlimited budget, so $250 USD will be all I can spend on this (hopefully less) Not including cargo forwarding to my country.</li><li>Preferably fiber instead of DAC (Direct Attached Copper) because why not. I mean, copper is fine. But to me, it is not interesting. And this an experiment anyway</li><li>The new core switch has to have PoE support. I have an access point that provides Wi-Fi to me and my family. I like that it only requires one Ethernet cable to work, and I’d like to maintain it that way. Besides, I’m thinking on adding at least one more PoE device at some point, so it is handy for me.</li><li>Less than 8 Gbe ports is unnacceptable. Since I’m currently using 7 out of my 8 Gigabit Ethernet ports available, I would like to have some room in case I need to add more devices down the line. Having said that, 48-port switches are just too much. I live in a small apartment, so having one of those bulky, loud switches is a no-go for me, unless… I compromise and do some modding, if needed (I’ll explain later).</li><li>Preferably 4 SFP+ ports. I could make it with only 2 ports, and there are excellent switch options, like Mikrotik CSS326–24G-2S+RM, which can usually be found on eBay for $150 (brand new) or less (used). But to me this is not an optimal alternative. Why would I invest more or less the same to get exactly the minimum amount of SFP+ ports and features? What if have to grow in the future? I need some headroom.</li><li>Low noise. As I mentioned before, I live in a small apartment, so having those kind of hairblower type of switch noise is not acceptable, specially since whatever I will get will sit on a shelve right in the middle of my apartment, and close to a door of another room where one of my children sleeps.</li></ul><p>So I needed to first get a picture (literally) of the current state of my network, and design my upgrade from there. Here it goes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DEk7f1U7Ee7Ipr7p-nAaOg.jpeg" /><figcaption>Before</figcaption></figure><p>BTW for those curious, my guests run through a separate wireless network, which is not pictured. Close friends and family still run through my standard wireless. I like simplicity, so for the moment, I don’t see the need to run VLANs on such a small network. That way I don’t really have to manage anything like that (for now).</p><p>So, in short, this is where I want to get to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3k_xzOHfy2JhlM3QEqJA1g.jpeg" /><figcaption>After</figcaption></figure><p>And how do I get there? Well, I set myself to do a list of what I need:</p><ul><li>A new switch</li><li>Two 10G network cards</li><li>At least two fiber cables</li><li>At least four SFP+ transceivers</li></ul><p>Most of my debate was around choosing a switch. My first option was Mikrotik CRS305–1G-4S+IN. Pros: It is small, it is quiet (passively cooled), <a href="https://www.eurodk.com/en/products/crs/mikrotik-crs305-1g-4sin">within budget</a>, low power, can run with PoE IN and it has four SFP+ ports. Cons: I would have to add yet another device to my network, it would be nice to just have one core switch to do everything (not a big deal). Now more recently I learned (from recent buyers) that when powered by PoE IN port, and all SFP+ ports are used, there may be some issues like performance degradation (maybe even package dropping?), quite possibly because running all that from just PoE might be a challenge, but this is not an issue if you just use its power cord.</p><p>My second option was Quanta LB6M. But I discarded this rather quickly. Pros: Plenty of SFP+ ports, price, PoE, manageable (if that is important to you), well documented. Cons: Too big/bulky, noisy, not enough RJ-45 ports and finally, kinda on the power hungry side. If it is within budget is a hit or miss, sometimes you can find it cheap on eBay, or not.</p><p>In the end I went with <a href="https://www.ebay.com/itm/Aruba-S2500-24P-US-24-Port-GB-PoE-4x-10G-Ethernet-Switch/123565990331?ssPageName=STRK%3AMEBIDX%3AIT&amp;_trksid=p2060353.m2749.l2649">Aruba S2500</a> (the 24-port version). Pros: within budget (actually I made an offer to eBay seller and I got it even cheaper), healthy number of RJ-45 and SFP+ ports, relatively medium power consumption, PoE, manageable, this single device can do it all for me. Cons: not very well documented, getting to EoL support, not the biggest but definetely not the smallest either and relatively noisy (loud at startup, but then there is still a hum and I need it to be dead silent). This last part made me think about my choosing for a few weeks… until someone uploaded this video:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fl5BfpDhR5ME%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dl5BfpDhR5ME&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fl5BfpDhR5ME%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/561928b3ab775ace246deda2610c2fe9/href">https://medium.com/media/561928b3ab775ace246deda2610c2fe9/href</a></iframe><p>As you see, it its perfectly possible to mod this switch to make it completely silent. But you must be willing to invest close to $60 USD just on fans! Most fans on this type of devices have a high peak RPM (11,000+) and the Noctua used in that mod are 5,000 RPM (which is part of why they are so silent) To me, this is the proper way to do it, but investing that amount just on fans would mean to possibly break my budget.</p><p>So what I did was to order <a href="https://www.ebay.com/itm/Scythe-Mini-Kaze-Ultra-Case-Fan-40mm-Silent-Fan-3500-RPM-SY124020L/171760695934?ssPageName=STRK%3AMEBIDX%3AIT&amp;_trksid=p2060353.m2749.l2649">Scythe Mini Kaze Ultra SY124020L</a> which are 3,500 RPM fans used by other people for similar projects. Those are NOT PWM fans, so you will lose the ability to dynamically control the rotational speed, but since those are such low RPM fans, you will want to ignore fan control warnings from switch and then have them running at full speed all the time anyway. For network cards I will be using <a href="https://www.ebay.com/itm/RT8N1-0RT8N1-DELL-MELLANOX-CONNECTX-2-PCIe-10GBe-ETHERNET-NIC-SERVER-ADAPTER/132756940343?ssPageName=STRK%3AMEBIDX%3AIT&amp;_trksid=p2060353.m2749.l2649">Mellanox’s ConnectX-2 NIC</a> (some people recommend going with ConnectX-3 though). As transceivers, I chose <a href="https://www.ebay.com/itm/Finisar-FTLX8571D3BCL-SFP-SR-SW-10Gb-s-850nm-Multimode-SFP-Transceiver/172962652341?ssPageName=STRK%3AMEBIDX%3AIT&amp;_trksid=p2060353.m2749.l2649">Finisar FTLX8571D3BCL</a>.</p><p>Here is a more detailed list of all the parts, including what I paid for each, totals at the end:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*2Mvm4jmgto9uIijD_y7iPw.jpeg" /><figcaption>Costs breakdown</figcaption></figure><p>Which is right on point.</p><p>Ready with all the necessary components:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yhXBDEtJaG8KN4ojkbzSgg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nrZSrqAVMdXesXCBR_F_Hw.jpeg" /></figure><p>Now, on to the fan mod. After sanding out the edges of the fan connectors I went ahead and repalced all of them:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*m9tILtNPTkMD4H_Abt3Yqw.jpeg" /></figure><p>NOTE: You wil have to use the included fan adaptors. Otherwise the fan cable will not reach the header on the switch:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cZky1A3WNHq04XFkyYd3bA.jpeg" /></figure><p>I don’t like the included fan screws (the ones from the switch). They’re bad quality.</p><p>After this, you will need to connect the first machine. Install SFP+ transceiver into NIC port:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*AlZlxKSV0glMLCY4YbhWuA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*n7XZNKmPvVf345biBfTyfQ.jpeg" /></figure><p>Then secure fiber cable into SFP+ port:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*y4lC-5IIlJqo8G--7uWsMA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*OLoszcg-0curWLL2SW5ukQ.jpeg" /></figure><p>Now do the same on Switch end:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*m9UgRBUd4GV6H8SM7_wDGw.jpeg" /></figure><p>Install NIC on PC and boot it up:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hJwwZUOKmDNpyjFk96aCbA.jpeg" /></figure><p>In my case, I did not had to install drivers from Mellanox’s website. Windows detected the device and configured it automatically:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*SUlkutXPct12t95QJQiWWw.jpeg" /><figcaption>10G NIC automatically configured on Windows 10</figcaption></figure><p>To configure the switch, I recommend watching this video:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FHegeBkglsec%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DHegeBkglsec&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FHegeBkglsec%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/604416fb546027dd8cea13dd0a1abc4b/href">https://medium.com/media/604416fb546027dd8cea13dd0a1abc4b/href</a></iframe><p>NOTE: his method for getting into GUI was not successful, so I had to download firmware onto a FAT32 USB stick and then put the file into a folder called “ arubaimage”, then go to front menu and select upload image. Then I went again into front menu, did a factory reset and I could reach the setup GUI no issues.</p><p>By this point you will need something to test out your bandwidth. You will have to have one device to act as a server and a second device (also on 10G network) to act as client. I chose iperf3 to do my benchmarking. If you want a cool explanation, go here:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F1c4W3rVctyA%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1c4W3rVctyA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F1c4W3rVctyA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/24920c632943468e4f13ba38ebce8d33/href">https://medium.com/media/24920c632943468e4f13ba38ebce8d33/href</a></iframe><p>So this is my test before the upgrade (see bold, my NAS as server, using 4 parallel threads):</p><pre>Connecting to host 10.0.0.70, port 5201<br>[  4] local 10.0.0.28 port 49962 connected to 10.0.0.70 port 5201<br>[  6] local 10.0.0.28 port 49963 connected to 10.0.0.70 port 5201<br>[  8] local 10.0.0.28 port 49964 connected to 10.0.0.70 port 5201<br>[ 10] local 10.0.0.28 port 49965 connected to 10.0.0.70 port 5201<br>[ ID] Interval           Transfer     Bandwidth<br>[  4]   0.00-1.00   sec  28.6 MBytes   240 Mbits/sec<br>[  6]   0.00-1.00   sec  28.6 MBytes   240 Mbits/sec<br>[  8]   0.00-1.00   sec  28.5 MBytes   239 Mbits/sec<br>[ 10]   0.00-1.00   sec  28.4 MBytes   238 Mbits/sec<br>[SUM]   0.00-1.00   sec   114 MBytes   957 Mbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   1.00-2.00   sec  28.2 MBytes   237 Mbits/sec<br>[  6]   1.00-2.00   sec  28.1 MBytes   236 Mbits/sec<br>[  8]   1.00-2.00   sec  28.2 MBytes   237 Mbits/sec<br>[ 10]   1.00-2.00   sec  28.2 MBytes   237 Mbits/sec<br>[SUM]   1.00-2.00   sec   113 MBytes   947 Mbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   2.00-3.00   sec  28.2 MBytes   237 Mbits/sec<br>[  6]   2.00-3.00   sec  28.4 MBytes   238 Mbits/sec<br>[  8]   2.00-3.00   sec  28.4 MBytes   238 Mbits/sec<br>[ 10]   2.00-3.00   sec  28.2 MBytes   237 Mbits/sec<br>[SUM]   2.00-3.00   sec   113 MBytes   950 Mbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   3.00-4.00   sec  28.4 MBytes   238 Mbits/sec<br>[  6]   3.00-4.00   sec  28.2 MBytes   237 Mbits/sec<br>[  8]   3.00-4.00   sec  28.2 MBytes   237 Mbits/sec<br>[ 10]   3.00-4.00   sec  28.2 MBytes   237 Mbits/sec<br>[SUM]   3.00-4.00   sec   113 MBytes   949 Mbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   4.00-5.00   sec  28.4 MBytes   238 Mbits/sec<br>[  6]   4.00-5.00   sec  28.2 MBytes   237 Mbits/sec<br>[  8]   4.00-5.00   sec  28.2 MBytes   237 Mbits/sec<br>[ 10]   4.00-5.00   sec  28.2 MBytes   237 Mbits/sec<br>[SUM]   4.00-5.00   sec   113 MBytes   949 Mbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   5.00-6.00   sec  28.2 MBytes   237 Mbits/sec<br>[  6]   5.00-6.00   sec  28.4 MBytes   238 Mbits/sec<br>[  8]   5.00-6.00   sec  28.2 MBytes   237 Mbits/sec<br>[ 10]   5.00-6.00   sec  28.4 MBytes   238 Mbits/sec<br>[SUM]   5.00-6.00   sec   113 MBytes   949 Mbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   6.00-7.00   sec  28.2 MBytes   237 Mbits/sec<br>[  6]   6.00-7.00   sec  28.2 MBytes   237 Mbits/sec<br>[  8]   6.00-7.00   sec  28.2 MBytes   237 Mbits/sec<br>[ 10]   6.00-7.00   sec  28.2 MBytes   237 Mbits/sec<br>[SUM]   6.00-7.00   sec   113 MBytes   949 Mbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   7.00-8.00   sec  28.2 MBytes   237 Mbits/sec<br>[  6]   7.00-8.00   sec  28.2 MBytes   237 Mbits/sec<br>[  8]   7.00-8.00   sec  28.2 MBytes   237 Mbits/sec<br>[ 10]   7.00-8.00   sec  28.1 MBytes   236 Mbits/sec<br>[SUM]   7.00-8.00   sec   113 MBytes   947 Mbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   8.00-9.00   sec  27.8 MBytes   233 Mbits/sec<br>[  6]   8.00-9.00   sec  27.6 MBytes   232 Mbits/sec<br>[  8]   8.00-9.00   sec  27.6 MBytes   232 Mbits/sec<br>[ 10]   8.00-9.00   sec  27.8 MBytes   233 Mbits/sec<br>[SUM]   8.00-9.00   sec   111 MBytes   929 Mbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   9.00-10.00  sec  28.4 MBytes   238 Mbits/sec<br>[  6]   9.00-10.00  sec  28.4 MBytes   238 Mbits/sec<br>[  8]   9.00-10.00  sec  28.2 MBytes   237 Mbits/sec<br>[ 10]   9.00-10.00  sec  28.2 MBytes   237 Mbits/sec<br>[SUM]   9.00-10.00  sec   113 MBytes   950 Mbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[ ID] Interval           Transfer     Bandwidth<br>[  4]   0.00-10.00  sec   283 MBytes   237 Mbits/sec                  sender<br>[  4]   0.00-10.00  sec   283 MBytes   237 Mbits/sec                  receiver<br>[  6]   0.00-10.00  sec   282 MBytes   237 Mbits/sec                  sender<br>[  6]   0.00-10.00  sec   282 MBytes   237 Mbits/sec                  receiver<br>[  8]   0.00-10.00  sec   282 MBytes   237 Mbits/sec                  sender<br>[  8]   0.00-10.00  sec   282 MBytes   237 Mbits/sec                  receiver<br>[ 10]   0.00-10.00  sec   282 MBytes   237 Mbits/sec                  sender<br>[ 10]   0.00-10.00  sec   282 MBytes   237 Mbits/sec                  receiver<br><strong>[SUM]   0.00-10.00  sec  1.10 GBytes   948 Mbits/sec                  sender<br>[SUM]   0.00-10.00  sec  1.10 GBytes   948 Mbits/sec                 receiver</strong></pre><p>And this is my test after upgrade:</p><pre>Connecting to host 10.0.0.71, port 5201<br>[  4] local 10.0.0.45 port 50670 connected to 10.0.0.71 port 5201<br>[  6] local 10.0.0.45 port 50671 connected to 10.0.0.71 port 5201<br>[  8] local 10.0.0.45 port 50672 connected to 10.0.0.71 port 5201<br>[ 10] local 10.0.0.45 port 50673 connected to 10.0.0.71 port 5201<br>[ ID] Interval           Transfer     Bandwidth<br>[  4]   0.00-1.00   sec   280 MBytes  2.34 Gbits/sec<br>[  6]   0.00-1.00   sec   278 MBytes  2.33 Gbits/sec<br>[  8]   0.00-1.00   sec   269 MBytes  2.25 Gbits/sec<br>[ 10]   0.00-1.00   sec   265 MBytes  2.22 Gbits/sec<br>[SUM]   0.00-1.00   sec  1.07 GBytes  9.15 Gbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   1.00-2.00   sec   289 MBytes  2.42 Gbits/sec<br>[  6]   1.00-2.00   sec   287 MBytes  2.41 Gbits/sec<br>[  8]   1.00-2.00   sec   277 MBytes  2.33 Gbits/sec<br>[ 10]   1.00-2.00   sec   274 MBytes  2.30 Gbits/sec<br>[SUM]   1.00-2.00   sec  1.10 GBytes  9.45 Gbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   2.00-3.00   sec   289 MBytes  2.43 Gbits/sec<br>[  6]   2.00-3.00   sec   287 MBytes  2.41 Gbits/sec<br>[  8]   2.00-3.00   sec   273 MBytes  2.29 Gbits/sec<br>[ 10]   2.00-3.00   sec   270 MBytes  2.27 Gbits/sec<br>[SUM]   2.00-3.00   sec  1.09 GBytes  9.40 Gbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   3.00-4.00   sec   290 MBytes  2.43 Gbits/sec<br>[  6]   3.00-4.00   sec   289 MBytes  2.42 Gbits/sec<br>[  8]   3.00-4.00   sec   270 MBytes  2.26 Gbits/sec<br>[ 10]   3.00-4.00   sec   268 MBytes  2.25 Gbits/sec<br>[SUM]   3.00-4.00   sec  1.09 GBytes  9.37 Gbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   4.00-5.00   sec   286 MBytes  2.40 Gbits/sec<br>[  6]   4.00-5.00   sec   286 MBytes  2.40 Gbits/sec<br>[  8]   4.00-5.00   sec   265 MBytes  2.22 Gbits/sec<br>[ 10]   4.00-5.00   sec   264 MBytes  2.22 Gbits/sec<br>[SUM]   4.00-5.00   sec  1.08 GBytes  9.23 Gbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   5.00-6.00   sec   290 MBytes  2.44 Gbits/sec<br>[  6]   5.00-6.00   sec   290 MBytes  2.43 Gbits/sec<br>[  8]   5.00-6.00   sec   270 MBytes  2.27 Gbits/sec<br>[ 10]   5.00-6.00   sec   269 MBytes  2.26 Gbits/sec<br>[SUM]   5.00-6.00   sec  1.09 GBytes  9.39 Gbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   6.00-7.00   sec   284 MBytes  2.38 Gbits/sec<br>[  6]   6.00-7.00   sec   284 MBytes  2.38 Gbits/sec<br>[  8]   6.00-7.00   sec   265 MBytes  2.23 Gbits/sec<br>[ 10]   6.00-7.00   sec   264 MBytes  2.21 Gbits/sec<br>[SUM]   6.00-7.00   sec  1.07 GBytes  9.20 Gbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   7.00-8.00   sec   287 MBytes  2.40 Gbits/sec<br>[  6]   7.00-8.00   sec   286 MBytes  2.40 Gbits/sec<br>[  8]   7.00-8.00   sec   266 MBytes  2.23 Gbits/sec<br>[ 10]   7.00-8.00   sec   265 MBytes  2.22 Gbits/sec<br>[SUM]   7.00-8.00   sec  1.08 GBytes  9.26 Gbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   8.00-9.00   sec   291 MBytes  2.44 Gbits/sec<br>[  6]   8.00-9.00   sec   290 MBytes  2.43 Gbits/sec<br>[  8]   8.00-9.00   sec   272 MBytes  2.28 Gbits/sec<br>[ 10]   8.00-9.00   sec   270 MBytes  2.26 Gbits/sec<br>[SUM]   8.00-9.00   sec  1.10 GBytes  9.42 Gbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[  4]   9.00-10.00  sec   281 MBytes  2.36 Gbits/sec<br>[  6]   9.00-10.00  sec   279 MBytes  2.34 Gbits/sec<br>[  8]   9.00-10.00  sec   265 MBytes  2.22 Gbits/sec<br>[ 10]   9.00-10.00  sec   262 MBytes  2.20 Gbits/sec<br>[SUM]   9.00-10.00  sec  1.06 GBytes  9.12 Gbits/sec<br>- - - - - - - - - - - - - - - - - - - - - - - - -<br>[ ID] Interval           Transfer     Bandwidth<br>[  4]   0.00-10.00  sec  2.80 GBytes  2.40 Gbits/sec                  sender<br>[  4]   0.00-10.00  sec  2.80 GBytes  2.40 Gbits/sec                  receiver<br>[  6]   0.00-10.00  sec  2.79 GBytes  2.40 Gbits/sec                  sender<br>[  6]   0.00-10.00  sec  2.79 GBytes  2.40 Gbits/sec                  receiver<br>[  8]   0.00-10.00  sec  2.63 GBytes  2.26 Gbits/sec                  sender<br>[  8]   0.00-10.00  sec  2.63 GBytes  2.26 Gbits/sec                  receiver<br>[ 10]   0.00-10.00  sec  2.61 GBytes  2.24 Gbits/sec                  sender<br>[ 10]   0.00-10.00  sec  2.61 GBytes  2.24 Gbits/sec                  receiver<br><strong>[SUM]   0.00-10.00  sec  10.8 GBytes  9.30 Gbits/sec                  sender<br>[SUM]   0.00-10.00  sec  10.8 GBytes  9.30 Gbits/sec                  receiver</strong></pre><p>No jumbo frames enabled (yet), no manual driver installation, no issues!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d637cccd22a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My perfect 2018 media server — Part 2: Some improvements]]></title>
            <link>https://medium.com/@yllanos/my-perfect-2018-media-server-part-2-some-improvements-dc42c8d9e04b?source=rss-5d5713a165ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc42c8d9e04b</guid>
            <category><![CDATA[openmediavault]]></category>
            <category><![CDATA[storage]]></category>
            <category><![CDATA[media-server]]></category>
            <category><![CDATA[nas]]></category>
            <dc:creator><![CDATA[Yamil Llanos]]></dc:creator>
            <pubDate>Sat, 14 Jul 2018 14:37:53 GMT</pubDate>
            <atom:updated>2018-07-14T14:37:53.427Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*VJHLeAZc2EKdKgRBP2OXMg.png" /></figure><p>Some of you liked my <a href="https://medium.com/@yllanos/my-perfect-2018-media-server-openmediavault-nas-storage-multimedia-services-53e74ea33af3">previous article</a>.</p><p>As a follow up, I should mention some configuration changes I made to make it even better:</p><ol><li>Added a Job to check data consistency</li><li>Added a job to suspend and wake the system daily</li><li>Added notification settings</li></ol><p>In the first case, you have to go to Services -&gt; SnapRAID. Under “Settings” tab, there will be a section called “Diff Script Settings”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pUkpOgsfY2oVoACTza0KzA.png" /></figure><p>The value you are looking for here is “Scrub Frequency”. This will determine how often you want your storage to be scrubbed. I personally don’t like to run those kind of jobs too often (to avoid additional I/O on disks), I’m not running a mission-critical system here anyway, and I’m using BTRFS, which has checksums for boths data and metadata. I mostly add movies with a certain frequency, but the only thing really important to me are family photos (and those are also backed-up to the cloud), so I set the scrubbing freq to every 10 days. Next, I went to System -&gt; Scheduled Jobs and created a new one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*cZhtFloWJ1jXoH3H4nMIZw.png" /></figure><p>I created a weekly job using one of the system utilities. So here’s what I think I know about the process: every time there is a file operation (creation, updating, deletion etc) a light version of a record of that operation is created (metadata). Those records are then supposed to be “Synced” across disks, to guarantee data is consistent. That system utility first runs a “Diff”, to check for differences in metadata versions, and then it runs the sync process. Later it compares the sync on the date it was run against the value of scrubbing frequency. If the date of last scrubbing is higher than the scrubbing frequency and no previous scrubbing has been made within that period, it runs a full scrub. Here’s the config for the job:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*p7qKKc9m7CTqrw-zlay8zg.png" /></figure><p>In the second case, I also added another job. I like my NAS to sleep during late night and wake up early in the morning. My idea is to save some power and also extend the life expectancy of the drives by having them to “rest” for at least a full day a month, so that means 3–4 hours a day of no operation. Don’t worry, my users are already notified about this LOL. My job looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*O13dI3oiSQhymsSYrM4LWQ.png" /><figcaption>System will shutdown at 2am and wake up at 6am (14400 seg later, or 4 hours)</figcaption></figure><p>NOTE: this will largely depend on the power management features on your motherboard. In my case, my motherboard supports this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*DE_jNP4JStUv-mgpOIh6Tw.png" /></figure><p>Not an expert here, but I believe you need at least S1. S3 is better. S4 should also work.</p><p>Lastly for case 3, I went to System-&gt; Notification and configured my notifications using Gmail like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*3XX_u55vs7dFizfqSdzJtg.png" /><figcaption>Just replace with your own email address</figcaption></figure><p>Now, I remember the first few times I tried to send notifications, I received no email, then a few minutes later Google sent me en email like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*ROjQ253pFq1KVhVhloEPNg.png" /></figure><p>When you click on that button, it will take you to a place where you can authorize some other apps to use your account (you will have to enable this), and then it will give you details on what devices are using your account. Google will send another email to confirm. From here, wait a few minutes, go to the notification settings and try sending another test email. It should work.</p><p>Hope that helps.</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc42c8d9e04b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My perfect 2018 media server. Openmediavault: NAS/storage + multimedia services]]></title>
            <link>https://medium.com/@yllanos/my-perfect-2018-media-server-openmediavault-nas-storage-multimedia-services-53e74ea33af3?source=rss-5d5713a165ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/53e74ea33af3</guid>
            <category><![CDATA[snapraid]]></category>
            <category><![CDATA[mergerfs]]></category>
            <category><![CDATA[media-server]]></category>
            <category><![CDATA[openmediavault]]></category>
            <category><![CDATA[nas]]></category>
            <dc:creator><![CDATA[Yamil Llanos]]></dc:creator>
            <pubDate>Fri, 13 Jul 2018 16:26:18 GMT</pubDate>
            <atom:updated>2018-07-14T14:39:27.925Z</atom:updated>
            <content:encoded><![CDATA[<p>So I’ve been a long time Synology user. I think their machines are great. I have had three models over the years, the latest one is a <a href="https://global.download.synology.com/download/Document/DataSheet/DiskStation/15-year/DS415+/Synology_DS415+_Data_Sheet_enu.pdf">DS415+</a></p><p>Having a pre-made NAS has its own set of drawbacks, as mentioned here:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Ft_P203uaAkU%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dt_P203uaAkU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Ft_P203uaAkU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8763607bc1bda990ca23d988f4b56511/href">https://medium.com/media/8763607bc1bda990ca23d988f4b56511/href</a></iframe><p>But considering I’m a curious person and the fact that I have some hardware from a previous PC build doing nothing, I decided to build my own NAS.</p><p>So even though I’m a big fan of Synology boxes, I decided to go in another direction because:</p><ol><li>I’m a fairly advanced user. And I’m not a SysAdmin, but I’ve had my fair share of developing scripts and I’m very familiar with the Linux console</li><li>Synology software is awesome, but honestly their machines are a bit underpowered. In some cases, this is partially justifiable: those ARM-based CPUs consume little power and in general, serving files should not require massive hardware.</li><li>When you start to heavily use a machine like this, you go beyond just serving files, and your need for both storage and processing capacity can grow overnight. Scaling on a premade NAS box can become really expensive, specially if you are interested on x86-type CPUs</li></ol><p>I have been toying with this DIY NAS idea for a long time, but there was always something that held me back. Over that time, I have had the opportunity to look at different options (I’m only considering open-source options):</p><ul><li><a href="http://www.freenas.org/">FreeNAS</a>: It may be the most popular NAS operating system. One of its strongest features may be the use of ZFS. It has a strong community. I didn’t like it: the GUI looks ancient; it is FreeBSD-based, and I feel familiar with Linux; The minimum hardware requirements and recommendations were off with my available hardware, and it doesn’t have a very well defined Docker support. You cannot fully utilize different-sized disks on a ZFS pool, and this was a deal breaker to me, as for home usage I find opportunity of adding any drives I find on sale.</li><li><a href="https://www.nas4free.org/">NAS4Free</a>: Less popular than FreeNAS but it is certainly an option. To me, it was just more of the same as it was the case of FreeNAS.</li><li><a href="https://lime-technology.com/">unRAID</a>: This may be the second most popular option. It is Debian-based (Linux). It is fast (once it loads up). It has Docker support. Nice community. You can use different-sized disks. It can use SSDs for caching. What I didn’t like: The whole thing about installing and running the OS from a USB stick didn’t feel right to me. I mean, why would I invest hundreds of dollars on SATA drives, CPU, RAM, Motherboard, Chasis, PSU and so on, when everything will boot from an USB drive? That makes no sense to me. The GUI looks like a website from the 90s. There is a lifetime fee for a license (unRAID is developed and commercially maintained by a company), and then if you scale, you have to buy licenses again (I guess this is fine, and I respect that, but I personally prefer to invest in hardware). Finally, I had some strange errors sometimes and the interface froze on me a couple times. I also remember I tried to create a boot USB and somehow my thumb drive was blacklisted, with no previous use for that.</li><li><a href="https://blog.linuxserver.io/2017/06/24/the-perfect-media-server-2017/">Ubuntu server + a bunch of packages on it</a>: I really liked this option. Almost there, I guess. I created my own Dockers using docker-compose but it had three main issues: 1) Adding/managing disks using MergerFS + SnapRAID via command line wasn’t friendly and a way to potential disaster 2) Having a dedicated GUI is nice, because script your way all the time can be overwhelming over time, specially when you want to do something quick, like setting up a new share 3) The complexity of having different (but related) packages on a system to work in concert in an integrated way can become difficult, and perhaps even too much work for a home server.</li></ul><p>Then I stumbled upon <a href="https://www.openmediavault.org/">Openmediavault</a>. It ticked all my checkboxes. I installed on a VM and I could verify it did all I am interested in.</p><p>So this is <a href="https://pcpartpicker.com/list/4yqVBb">my server part list</a>.</p><p>There are a few “lies” in that part list. The smaller SSD is from another brand that I could not find on PCPartpicker or Amazon, so I replaced with some Kingston drive. For the bigger SSD, in reality I have a Samsung CM871a that I also could not find anywhere. The 8TB drives are not really WD Red, but WD “white label”; those are disks “shucked” from WD EasyStore drives. <a href="https://www.reddit.com/r/DataHoarder/comments/7fx0i0/wd_easystore_8tb_compendium/">More info here</a>.</p><p>I basically already had all the parts, except for the ones explicitly specified. For a home NAS server, this might be a little overkill, but I think I have some other ideas down the line to take advantage of the hardware. But anyway, my general design considerations are:</p><ul><li>A case with the ability of holding up to 10 3.5&quot; HDDs (or at least 8 + my SSDs).</li><li>A CPU robust enough to do Plex transcoding</li><li>A motherboard with as much SATA ports as possible. I got 10 on that motherboard, but SSDs will use 2, so I’m down to 8. In any case, I can add <a href="http://a.co/4kk8WRc">an expansion card</a> later, if I need it.</li><li>The ability to run Docker containers</li><li>Be able to use disks of potentially different capacities and have 1-drive parity (hence MergerFS + SnapRAID)</li><li>The OS will be installed on the smaller SSD (120GB, as boot drive)</li><li>The other SSD (256GB, as “hot” drive) will be used to hold downloads and bittorrrent seeds. This is also where plex trancodes will be done and the files for Docker containers will be stored. So in essence, this will a somewhat busy drive, and that is why I wanted an SSD here. Then the files that rarely change, will go to main storage (as expected from a media server).</li></ul><p>To install OMV, I recommend this video:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FNYJCq2FwRUo%3Fstart%3D1%26feature%3Doembed%26start%3D1&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DNYJCq2FwRUo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FNYJCq2FwRUo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/83cb5bd1e885e6b5eb8934f90c67cc73/href">https://medium.com/media/83cb5bd1e885e6b5eb8934f90c67cc73/href</a></iframe><p>To set-up MergerFS + SnapRAID <a href="https://ridwankhan.com/building-an-open-media-vault-nas-part-3-configuring-omv-ee15322602be">I recommend this guide</a>.</p><p>Now, on to install Docker and a bittorrent client. I prefer Deluge over Transmission, but whatever:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FrwovJ9kUSoA%3Fstart%3D175%26feature%3Doembed%26start%3D175&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrwovJ9kUSoA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FrwovJ9kUSoA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f681ed0f3708a3194320f6ccd587310a/href">https://medium.com/media/f681ed0f3708a3194320f6ccd587310a/href</a></iframe><p>To install Plex:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FBNfk7ji4oh4%3Fstart%3D90%26feature%3Doembed%26start%3D90&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBNfk7ji4oh4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FBNfk7ji4oh4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/bca3979580efaeb8630401e408c14c2e/href">https://medium.com/media/bca3979580efaeb8630401e408c14c2e/href</a></iframe><p>And finally, Radarr, Sonarr and Jackett:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fn5pxaWy42iA%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dn5pxaWy42iA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fn5pxaWy42iA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/31fc47fbc25bca9236a9b7e78df962bc/href">https://medium.com/media/31fc47fbc25bca9236a9b7e78df962bc/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FxlzhukbuKlU%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DxlzhukbuKlU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FxlzhukbuKlU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5f26f4def93ae7136e5f402e34b3169a/href">https://medium.com/media/5f26f4def93ae7136e5f402e34b3169a/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FWM5yL53svtM%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DWM5yL53svtM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FWM5yL53svtM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/89f73d27524a36918be03890e7386f5b/href">https://medium.com/media/89f73d27524a36918be03890e7386f5b/href</a></iframe><p>So here are some pictures and screenshots of the build:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*SHmw16eP95FirNbFnnCfmA.jpeg" /><figcaption>Some of the parts before building</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*NVrmgyW5l9lL4hCP4X7lGg.jpeg" /><figcaption>The case arrived</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*zBAglDCjFH4Ry53KPxSDYw.jpeg" /><figcaption>Starting build</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*kJ_UxMCl8NzXd0Z4hWKOMA.jpeg" /><figcaption>Boot and OS install</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S6azMj8_E1A06EOLBtnrYQ.jpeg" /><figcaption>So this is how you take out the drive cages</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*ch-lWJGHCra-e3Yi5hClcg.jpeg" /><figcaption>Each drive cage can hold up to 4 3.5-inch drives</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KL1N9ZH4xQYYA9CJ3J0NhA.jpeg" /><figcaption>Everything in place, cable management only thing pending</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*AlEfxfIQPqnHe2rOpgt1og.png" /><figcaption>SysInfo right after install</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mtXDklJ4DUnq_797kv1Q7Q.png" /><figcaption>List of disks attached to the system</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OMT33zkFcwODY0UJEgZClw.png" /><figcaption>List of filesystems and their corresponding type across all disks. MergerFS on datapool01</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sAIhV64R7YOeunnhA0VoAg.png" /><figcaption>Data pool composition</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*If-48jJt1ynM6QlPnRRN5g.png" /><figcaption>SnapRAID config. 1-drive parity</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*T1uLZco1zkTuZqzaFWakXg.png" /><figcaption>My file shares</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*irUZwTyWmiUGfcovkHBlZQ.png" /><figcaption>Some performance graph. SnapRAID Sync was executing, photos were being indexed by Plex the night before</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*C9vu8LALPLSXh7Yarqt3IQ.png" /><figcaption>RAM usage. SnapRAID Sync was running</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*rORACE61S39q3CHD-ILntQ.png" /><figcaption>Network traffic stats</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oq-vE-36iRwtsZ-BG3Vfxw.png" /><figcaption>My list of Docker containers. I got everything I needed</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lqoQYntEYtm-ZXSV66fWRQ.png" /><figcaption>I installed Muximux on a Docker container, which gives me access to all those apps from a single point</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*S8NMN5BhcVUsQ3a7w6Yodw.png" /><figcaption>Typical system status after installation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*ZmV1W2qBKZWIpzUs3EHLrg.jpeg" /><figcaption>Finished product</figcaption></figure><p>To migrate all my data, I used used the “Remote mount” plugin to mount shares from my old NAS box to my new machine (all mounted shares will be under ‘/srv’ dir, just replace source and destination dir/file):</p><blockquote>rsync -rva /src /dst</blockquote><p>I really enjoyed working on this project. I already pointed most of my client devices to the server. So far so good.</p><p>Let me know if you have any questions of the comments section.</p><p>Cheers!</p><p>EDIT: There is now a part 2, <a href="https://medium.com/@yllanos/my-perfect-2018-media-server-part-2-some-improvements-dc42c8d9e04b">get it here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53e74ea33af3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Confessions of a non-web developer doing web development (again). Part 1: Old times]]></title>
            <link>https://medium.com/@yllanos/confessions-of-a-non-web-developer-doing-web-development-again-part-1-old-times-8e5caf46fd6e?source=rss-5d5713a165ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e5caf46fd6e</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[legacy]]></category>
            <dc:creator><![CDATA[Yamil Llanos]]></dc:creator>
            <pubDate>Thu, 14 Jun 2018 00:38:39 GMT</pubDate>
            <atom:updated>2018-06-14T00:38:39.566Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi.</p><p>I’m not a web designer, neither a graphics designer or even a web developer. I am just engineer who likes to do “web stuff” from time to time, whenever I can, however I can. It’s nice to be able to try to keep up with the times.</p><p>Over the years, I have had a couple experiences creating websites for personal projects, and during the last two years or so, I decided to update my knowledge, perhaps that may end up in yet another personal project released, who knows. But in the process, I have noticed a few things that have turned the tide in another direction for web development, at least in my opinion.</p><p>Disclaimer: now before I start, I would like to apologize to some of you. You see, english is not my native language, so thet <em>will</em> be ortographical and even grammatical errors, so please keep that in mind. I’ll try doing my best, as english is a way to reach out to some people that may identify with what I want to share. Also, I will try not to go too deep into technical, just to keep it simple for many non-technical folks, but eventually it <em>will</em> get technical, so keep that in mind.</p><p>Allright, so this story starts about 1997 (yes, I’m so dinosaur). One of my brothers took me to a workshop about something called “Internet”. He is a physician, but he knew I have always been interested in science and technology. One professor at his university had been using Internet to research (on microbiology) and wanted to encourage other students to start using it as well. Anyway, after understanding you had to dial in using your phone line and access “web pages”, I realized how big that idea was. I wanted to have Internet, I NEEDED TO. I asked my dad about it repeatedly, and after a couple months and a lot of convincing and explanations to him, we finally got Internet. Next year I started to go to university, to pursue a degree on Systems Engineering here in Colombia (which locally is a mix of Computer Science, Computer Engineering and IT)</p><p>Anyway, I wanted to have a project that would motivate me and also forced me to practice the skills I was getting while studying. Since Carl Sagan was my childhood hero, I wanted something that allowed me to spread science principles but in a fun way. Back then, there was a site called GeoCities.com (no longer active) where you could create your own “pages” and publish them. Technically, I would develop a static set of HTML pages and upload them via FTP (which was a new protocol for me that I had to learn). It actually started as a spanish version of <a href="https://www.howstuffworks.com/">https://www.howstuffworks.com/</a> (which is still active to this day) but then I decided I could not just copy content, in part because I did not wanted any trouble with them. So I started creating my own content, with new articles that I would choose and research myself.</p><p>Around 1998–1999 after learning some HTML from official docs and a couple books, and after 6 months or so of having a few articles published, I was watching TV with my dad at night and there was a TV Show on Discovery Channel Latin America about technology (cannot recall the name, but I used to watch it all the time). There was a section where they recommended interesting sites to people: they gave the site’s name, the URL and they explained what it was about so people can visit. To my surprise, <em>my “website” got featured</em>. I was in shock 😳 Somehow I was on TV, LOL. My dad only knew about my project from that moment on. However, the first question my dad asked was: OK nice, why didn’t I hear your name like the other websites they recommended? The answer was simple: I never specified my name <em>anywhere</em>. I guess I was nervous of “stealing the idea” from the guys at How Stuff Works, even when I had my own content. So, lesson learned: if you are willing to create something, you better also take credit for it.</p><p>I don’t think there is anything left from “Cómo Funcionan Las Cosas” (that was the site’s name BTW), except maybe this URL where I said goodbye to it and started a new one: <a href="http://www.oocities.org/sunsetstrip/amphitheatre/5064/">http://www.oocities.org/sunsetstrip/amphitheatre/5064/</a></p><p>I moved on and a few years later (maybe around 2005–2006) I decided to reboot the same idea. I spoke to my girlfriend about it (now my wife) and she suggested me to work with one of her sisters, who was (is) a graphics designer, so after presenting the project informally we decided to team up and start a new project. This is how Saberaldedillo.com was born.</p><p>I don’t really know how I got to that name, specially because the expression “al dedillo” (with details) is not really used in latin america, but in Spain. Anyway, when we started the planning phase of this website we identified a few things we needed to be very clear about it: what team did we have? (spoiler: me, my wife and my sister in law), who would design UXP? (BTW UXP wasn’t really a term back then), who would suggest and approve new features? who will operate and maintain? who will pay for domain and hosting, who would be in charge of content and its quality? and so on. The only part clear to me, is that I would be actually developing, since I was the only one with some of the skills to make it happen (or so I thought)</p><p>Eventually we decided the following overall design for our website:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*WtnVzID5ZuynYBjkpi6fjA.png" /></figure><p>A “banner” on top. Some kind of “Footer/About” on bottom. To the left there was a browsing feature, depending on the clasification, articles should be hosted within a category. I’m prety sure we did have search functionality, I just don’t remember where it was. To the right of categories, there were three sections with previews to the content. Section A had four articles. Those were the 4 most accessed articles. Section B pointed to “article of the week” (a random article). Section C had previews to four more articles: newest articles.</p><p>We started implementing using Macromedia’s Dreamweaver (now Adobe Dreamweaver) on my home PC. It was a resource hog on my machine, plus it generated a lot of code I didn’t really wanted, so I scraped that and we started doing it ourselves, no tools. It was a real manual process, but in the end, let me make a list of some technologies I had to learn or improve to make it happen</p><ul><li>HTML: so we could view our page</li><li>PHP: basically this ran our business logic</li><li>SQL (MySQL): where we stored our data</li><li>CSS: still to this day haven’t really got the hang of this to be honest</li></ul><p>All those four main technologies together had us covered for the most part. The part really new to me was to translate what my sister in law wanted to see (according to her design) into what I was able to implement via code. You see, I’m an engineer, we don’t usually build things to “be pretty”. I feel I can code a lot of things, but I can never make it pretty, I just lack either the skills or the education. Your see, I was trained to build reliable, efficient, fast. Even concepts like security or escalability came later as mayor concerns.</p><p>We put too much enphasis on presentation and it looked good fairly good for that time, but the “backend” (if you could call it like that) was a complete mess. We didn’t really had a form or any kind of CRUD system in place. At the beggining, I had to insert or update rows directly into our MySQL database just to make orthographic corrections to our articles! 😨</p><p>Eventually the CRUD setup was partially improved and it was way easier to add content. But now I want to write about a few implementation details that may provide an idea on what we did, how and how long it took us (remember, apart from some pages, this was my very first website project).</p><p>Everytime the user accessed an full article page, I increased in internal counter on the main article table that corresponded with the amount of visits for that particular article. By that time, the concept of <a href="https://www.webopedia.com/TERM/C/client_server_architecture.html">client-server architecture</a> was hot. You would send a request via POST method to PHP service, and basically business rules happened, after that a response was triggered, in which you usually showed results.</p><p>For Section A, I came up with a SQL query that sorted articles on that counter and then limited to only four picks. You would include the SQL query into PHP code within the same HTML file. Yes, all that in a single file.</p><p>Section B seemed the most straightforward, but it ended up being the most complex one. I had a separate secondary table that had two columns: one that pointed to an ID from the articles table, and a date. Every time a user visited the website, I compared the current server date against the one on the secondary table. If there was a difference of less than 7 days (a week), nothing will happen. But if it was more than 7 days, then I would randomly pick one article, then store the current one on secondary table.</p><p>Section C always showed the most recent additions by creation date, that’s it. That was our whole website. When we stabilized the website about six months after going live on some cheap domain/hosting provider, we reached out around 5k visits per month. Not bad I guess. At its peak, we had about 10k visits per month or so.</p><p>The project lasted for about 2 to 3 years. We abandoned it because the effort required to research and publish each article was massive, as we wanted quality. Some concerns also were raised, as we felt comfortable with some topics, but we were not experts in <em>every</em> field. We received a couple proposals for pubibity on our site, but nothing concrete. And finally, our monetization strategy was never clear.</p><p>In retrospect, I believe we did a lot with just those four technologies. Right after that, I went to study and work abroad and got a job where I did a lot of PHP coding. I also had the opportunity to try a bit of Ruby on Rails (around 2007)</p><p>On my next post, I will write about how I noticed how things started to change for web dev after years without actually working on it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e5caf46fd6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>