<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Get Info: #synology</title>
    <description>Posts tagged “synology” — Blog of independent game and app developer Matt Sephton. Featuring vintage Macintosh, game development, digital artwork, Japanese esoterica, video game reviews, hacks and tips, and much more.</description>
    <link>https://blog.gingerbeardman.com/tag/synology/</link>
    <atom:link href="https://blog.gingerbeardman.com/tag/synology/index.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Tue, 30 Jun 2026 01:15:23 +0000</pubDate>
    <lastBuildDate>Tue, 30 Jun 2026 01:15:23 +0000</lastBuildDate>
    <generator>Jekyll v4.4.1</generator>

    
      
        <item>
          <title>Script to quickly and automatically remux videos on Synology NAS</title>
          <description>&lt;p&gt;I recently set up an old HP ProLiant Microserver N54L as a NAS running Xpenology (Synology DSM 6) and it’s a great little device capable of a lot. It’s also fun to write scripts and configure things to add automation and extra capabilities!&lt;/p&gt;

&lt;p&gt;Here’s a script I wrote that will look for mkv and avi files and quickly copy-remux them as mp4. I do this because my playback setup across Apple devices seems to have an easier time with that type of container.&lt;/p&gt;

&lt;p&gt;As it’s only the container that is being changed: the video content remain the same so there is no change in quality, the remux process takes only seconds, and the file size remains effectively the same. I also set the faststart flag on the mp4 to help it start playing more quickly.&lt;/p&gt;

&lt;h2 id=&quot;outline&quot;&gt;Outline&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Find mkv and avi files&lt;/li&gt;
  &lt;li&gt;Remux the files with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ffmpeg&lt;/code&gt; to mp4&lt;/li&gt;
  &lt;li&gt;If successful move the old file to Recycle Bin (so it can be recovered if needed)&lt;/li&gt;
  &lt;li&gt;Log results to a file and fire off some notifications&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;/h2&gt;

&lt;p&gt;I have set this script to run daily using &lt;em&gt;Task Scheduler &amp;gt; Scheduled Task &amp;gt; User-defined script&lt;/em&gt; using the full path to the script, which should be located in a Scripts sub-directory inside your video directory.&lt;/p&gt;

&lt;p&gt;After the first successful run I decided to comment out all notifications except the failure one, as that’s all I really need to act on. But feel free to set it up as you wish. You could even change it to remux from mp4 to mkv.&lt;/p&gt;

&lt;h2 id=&quot;source&quot;&gt;Source&lt;/h2&gt;

&lt;noscript&gt;&lt;p&gt;&lt;a href=&quot;https://gist.github.com/gingerbeardman/508fccef1827e717d6100b2ac6dcfc37&quot;&gt;View the source code as a Gist&lt;/a&gt;&lt;/p&gt;&lt;/noscript&gt;
&lt;script src=&quot;https://gist.github.com/gingerbeardman/508fccef1827e717d6100b2ac6dcfc37.js&quot;&gt;&lt;/script&gt;

&lt;h2 id=&quot;bonus&quot;&gt;Bonus&lt;/h2&gt;

&lt;p&gt;I’ve only recently begun to set the faststart movflag on my mp4 files, which meant my older videos did not have it set. So here’s an additional script, &lt;a href=&quot;https://gist.github.com/gingerbeardman/59413f3b9d06e0d7a8ccbf3119e7dbdf&quot;&gt;faststart.sh&lt;/a&gt;, to set the faststart movflag on all mp4 files.&lt;/p&gt;

&lt;p&gt;Note: if you have a lot of videos this script will take a long time to complete. You can estimate about 30 seconds per video, for a total of (all your videos divided by two) minutes.&lt;/p&gt;
</description>
          <author>by Matt Sephton</author>
          <pubDate>Wed, 12 Jan 2022 00:00:00 +0000</pubDate>
          <link>https://blog.gingerbeardman.com/2022/01/12/script-to-quickly-and-automatically-remux-videos-on-synology-nas/</link>
          <guid isPermaLink="true">https://blog.gingerbeardman.com/2022/01/12/script-to-quickly-and-automatically-remux-videos-on-synology-nas/</guid>
        </item>
      
    

  </channel>
</rss>
