<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Script on Bill Glover</title>
		<link>https://old.bill.dev/tags/script/</link>
		<description>Recent content in Script on Bill Glover</description>
		<generator>Hugo</generator>
		<language>en-gb</language>
		
			<managingEditor>hello@bill.dev (Bill)</managingEditor>
		
		
			<webMaster>hello@bill.dev (Bill)</webMaster>
		
		
		
			<lastBuildDate>Fri, 11 Oct 2024 17:34:21 +0100</lastBuildDate>
		
			<atom:link href="https://old.bill.dev/tags/script/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>FFmpeg Cheat Sheet</title>
				<link>https://old.bill.dev/notes/ffmpeg-cheat-sheet/</link>
				<pubDate>Fri, 11 Oct 2024 17:17:25 +0100</pubDate><author>hello@bill.dev (Bill)</author>
				<guid>https://old.bill.dev/notes/ffmpeg-cheat-sheet/</guid>
				<description>&lt;p&gt;Using &lt;a href=&#34;https://ffmpeg.org/about.html&#34;&gt;FFmpeg&lt;/a&gt; is more art than science. Every time I reach for it, I find myself trawling the internet for various incantations of the command that result in a playable video. These are commands that have worked for me.&lt;/p&gt;&#xA;&lt;h3 id=&#34;blu-ray&#34;&gt;Blu-ray&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ffmpeg -i input.mkv -c:v libx265 -crf &lt;span class=&#34;m&#34;&gt;18&lt;/span&gt; -c:a aac -b:a 160k -tag:v hvc1 -ac &lt;span class=&#34;m&#34;&gt;6&lt;/span&gt; output.mp4&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This results in an mp4 container with h265 video and aac sound. The file should be playable on Apple devices. The resulting file will also be significantly smaller than the original.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Replace Environment Variables in a File</title>
				<link>https://old.bill.dev/notes/replace-environment-variables-in-a-file/</link>
				<pubDate>Mon, 21 Mar 2022 20:17:59 +0000</pubDate><author>hello@bill.dev (Bill)</author>
				<guid>https://old.bill.dev/notes/replace-environment-variables-in-a-file/</guid>
				<description>&lt;p&gt;Every now and again you stumble across a command that solves a problem you didn&amp;rsquo;t realise you had. Recently, I discovered &lt;code&gt;envsubst&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;ldquo;Substitutes the values of environment variables.&amp;rdquo;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve found myself substituting environment variables in configuration files increasingly often (see: Kubernetes). On more than one occasion I&amp;rsquo;ve tied myself in knots trying to do this with scripts. It turns out that &lt;code&gt;envsubst&lt;/code&gt; does most of what I need.&lt;/p&gt;&#xA;&lt;p&gt;Take the following file, example.yaml:&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
