snipt

Ctrl+h for KB shortcuts

Bash

Convert png frames into an mpeg4 movie

# -qscale <quality>[1, 31], -r <frame-rate> -b <bit-rate>
ffmpeg -qscale 1 -r 2 -b 9600 -i %03d.png movie.mp4
https://snipt.net/embed/4fb89a7398caef2c7bd9113fe8ce60e9/
/raw/4fb89a7398caef2c7bd9113fe8ce60e9/
4fb89a7398caef2c7bd9113fe8ce60e9
bash
Bash
2
2019-06-24T23:51:59
True
False
False
/api/public/snipt/28023/
convert-png-frames-into-an-mpeg4-movie
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1"># -qscale &lt;quality&gt;[1, 31], -r &lt;frame-rate&gt; -b &lt;bit-rate&gt;</span> </span><span id="L-2"><a name="L-2"></a>ffmpeg -qscale <span class="m">1</span> -r <span class="m">2</span> -b <span class="m">9600</span> -i %03d.png movie.mp4 </span></pre></div> </td></tr></table>
ffmpeg, movie, mp4, png

Bash

Convert videos to MP4 format (suitable for Android devices)

mencoder <INPUTFILE> -o <OUTPUTFILE>.mp4 -vf dsize=480:352:2,scale=-8:-8,harddup -oac faac -faacopts mpeg=4:object=2:raw:br=128 -of lavf -lavfopts format=mp4 -ovc x264 -sws 9 -x264encopts nocabac:level_idc=30:bframes=0:bitrate=512:threads=auto:turbo=1:global_header:threads=auto:subq=5:frameref=6:partitions=all:trellis=1:chroma_me:me=umh
https://snipt.net/embed/2eef0b83288728dc5efec0074b581579/
/raw/2eef0b83288728dc5efec0074b581579/
2eef0b83288728dc5efec0074b581579
bash
Bash
1
2019-06-03T21:48:50
True
False
False
/api/public/snipt/8949/
convert-videos-to-mp4-format-suitable-for-android-devices
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>mencoder &lt;INPUTFILE&gt; -o &lt;OUTPUTFILE&gt;.mp4 -vf <span class="nv">dsize</span><span class="o">=</span>480:352:2,scale<span class="o">=</span>-8:-8,harddup -oac faac -faacopts <span class="nv">mpeg</span><span class="o">=</span>4:object<span class="o">=</span>2:raw:br<span class="o">=</span><span class="m">128</span> -of lavf -lavfopts <span class="nv">format</span><span class="o">=</span>mp4 -ovc x264 -sws <span class="m">9</span> -x264encopts nocabac:level_idc<span class="o">=</span>30:bframes<span class="o">=</span>0:bitrate<span class="o">=</span>512:threads<span class="o">=</span>auto:turbo<span class="o">=</span>1:global_header:threads<span class="o">=</span>auto:subq<span class="o">=</span>5:frameref<span class="o">=</span>6:partitions<span class="o">=</span>all:trellis<span class="o">=</span>1:chroma_me:me<span class="o">=</span>umh </span></pre></div> </td></tr></table>
android, bash, mencoder, mp4, video

Bash

make iphone version of video

handbrakecli -Z "iPhone & iPod Touch" -i input.avi -o ouptut.mp4
https://snipt.net/embed/05ef39b8ec3b684e40fd5c56c9f4c99c/
/raw/05ef39b8ec3b684e40fd5c56c9f4c99c/
05ef39b8ec3b684e40fd5c56c9f4c99c
bash
Bash
1
2019-06-23T14:36:12
True
False
False
/api/public/snipt/6785/
make-iphone-version-of-video
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>handbrakecli -Z <span class="s2">&quot;iPhone &amp; iPod Touch&quot;</span> -i input.avi -o ouptut.mp4 </span></pre></div> </td></tr></table>
handbrake, iphone, mp4, video