snipt

Ctrl+h for KB shortcuts

Text only

crop mp3 using ffmpeg

ffmpeg -i source.mp3 -acodec copy -t 00:03:15 -ss 00:00:00 target.mp3 
https://snipt.net/embed/7c3572cc1dcd52b2162125c3cd1ab671/
https://snipt.net/raw/7c3572cc1dcd52b2162125c3cd1ab671/
7c3572cc1dcd52b2162125c3cd1ab671
text
Text only
1
2016-09-29T21:53:57
True
False
False
Jan 26, 2013 at 01:09 AM
/api/public/snipt/54529/
crop-mp3-using-ffmpeg
<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 id="L-1"><a name="L-1"></a>ffmpeg -i source.mp3 -acodec copy -t 00:03:15 -ss 00:00:00 target.mp3 </span></pre></div> </td></tr></table>
bash, ffmpeg, mp3

Text only

Mp3 tagging format (Mp3Tag)

$if(%track%,$if($and(%discnumber%,$neql(%totaldiscs%,$num(%discnumber%,1))),$num(%discnumber%,1).,)$num(%track%,2) - ,)$if($and(%albumartist%,$neql(%albumartist%,%artist%)),%artist% - ,)%title%
https://snipt.net/embed/37bcf8b28b9f2dba47135c304e2c6c27/
https://snipt.net/raw/37bcf8b28b9f2dba47135c304e2c6c27/
37bcf8b28b9f2dba47135c304e2c6c27
text
Text only
1
2016-09-29T00:41:53
True
False
False
Oct 16, 2012 at 10:35 AM
/api/public/snipt/45677/
mp3-tagging-format-mp3tag
<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 id="L-1"><a name="L-1"></a>$if(%track%,$if($and(%discnumber%,$neql(%totaldiscs%,$num(%discnumber%,1))),$num(%discnumber%,1).,)$num(%track%,2) - ,)$if($and(%albumartist%,$neql(%albumartist%,%artist%)),%artist% - ,)%title% </span></pre></div> </td></tr></table>
mp3, tagz

Bash

A Script for Nautilus Convert To Mp3 Quality 128kbps

1
2
3
4
5
6
7
8
#!/bin/bash
C=0;
for MUSICA in "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"; do
    ARQUIVO=$(basename "$MUSICA");
	NOME=`echo "$ARQUIVO" | cut -d "." -f1`;
	x=`mv "$ARQUIVO" '.'"${NOME}"'_old' && ffmpeg -i '.'"${NOME}"'_old' -ab 128k -ac 2 -ar 44100 "$NOME"'.mp3' && rm '.'"${NOME}"'_old'` && C=$(($C+1));
done
y=`zenity --info --title="Conversão mp3 concluída" --text="Total de Arquivos convertidos: $C"`
https://snipt.net/embed/7c9ae918482de9cbf30486cfab538053/
https://snipt.net/raw/7c9ae918482de9cbf30486cfab538053/
7c9ae918482de9cbf30486cfab538053
bash
Bash
8
2016-09-21T08:26:12
True
False
False
/api/public/snipt/38584/
converterparamp3q128k
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c">#!/bin/bash</span> </span><span id="L-2"><a name="L-2"></a><span class="nv">C</span><span class="o">=</span>0<span class="p">;</span> </span><span id="L-3"><a name="L-3"></a><span class="k">for</span> MUSICA in <span class="s2">&quot;</span><span class="nv">$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS</span><span class="s2">&quot;</span><span class="p">;</span> <span class="k">do</span> </span><span id="L-4"><a name="L-4"></a> <span class="nv">ARQUIVO</span><span class="o">=</span><span class="k">$(</span>basename <span class="s2">&quot;</span><span class="nv">$MUSICA</span><span class="s2">&quot;</span><span class="k">)</span><span class="p">;</span> </span><span id="L-5"><a name="L-5"></a> <span class="nv">NOME</span><span class="o">=</span><span class="sb">`</span><span class="nb">echo</span> <span class="s2">&quot;</span><span class="nv">$ARQUIVO</span><span class="s2">&quot;</span> <span class="p">|</span> cut -d <span class="s2">&quot;.&quot;</span> -f1<span class="sb">`</span><span class="p">;</span> </span><span id="L-6"><a name="L-6"></a> <span class="nv">x</span><span class="o">=</span><span class="sb">`</span>mv <span class="s2">&quot;</span><span class="nv">$ARQUIVO</span><span class="s2">&quot;</span> <span class="s1">&#39;.&#39;</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">NOME</span><span class="si">}</span><span class="s2">&quot;</span><span class="s1">&#39;_old&#39;</span> <span class="o">&amp;&amp;</span> ffmpeg -i <span class="s1">&#39;.&#39;</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">NOME</span><span class="si">}</span><span class="s2">&quot;</span><span class="s1">&#39;_old&#39;</span> -ab 128k -ac <span class="m">2</span> -ar <span class="m">44100</span> <span class="s2">&quot;</span><span class="nv">$NOME</span><span class="s2">&quot;</span><span class="s1">&#39;.mp3&#39;</span> <span class="o">&amp;&amp;</span> rm <span class="s1">&#39;.&#39;</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">NOME</span><span class="si">}</span><span class="s2">&quot;</span><span class="s1">&#39;_old&#39;</span><span class="sb">`</span> <span class="o">&amp;&amp;</span> <span class="nv">C</span><span class="o">=</span><span class="k">$((</span><span class="nv">$C</span><span class="o">+</span><span class="m">1</span><span class="k">))</span><span class="p">;</span> </span><span id="L-7"><a name="L-7"></a><span class="k">done</span> </span><span id="L-8"><a name="L-8"></a><span class="nv">y</span><span class="o">=</span><span class="sb">`</span>zenity --info --title<span class="o">=</span><span class="s2">&quot;Conversão mp3 concluída&quot;</span> --text<span class="o">=</span><span class="s2">&quot;Total de Arquivos convertidos: </span><span class="nv">$C</span><span class="s2">&quot;</span><span class="sb">`</span> </span></pre></div> </td></tr></table>
"convert to mp3", convert, mp3

Batchfile

Make a m3u playlist

1
2
3
@ echo off
REM usage: plist "My favorite music" mp3
dir *.%2 /b > %1.m3u
https://snipt.net/embed/9a11f5fee40ca034e171c6bef7de7c60/
https://snipt.net/raw/9a11f5fee40ca034e171c6bef7de7c60/
9a11f5fee40ca034e171c6bef7de7c60
bat
Batchfile
3
2016-08-22T05:42:19
True
False
False
/api/public/snipt/20546/
make-a-m3u-playlist
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="p">@</span> <span class="k">echo</span> <span class="k">off</span> </span><span id="L-2"><a name="L-2"></a><span class="c">REM usage: plist &quot;My favorite music&quot; mp3</span> </span><span id="L-3"><a name="L-3"></a>dir *.<span class="nv">%2</span> <span class="n">/b</span> &gt; <span class="nv">%1</span>.m<span class="m">3</span>u </span></pre></div> </td></tr></table>
batch, explorer, mp3

Bash

Use vbrfix to repair MP3 variable bitrate headers recursively.

nohup find . -type f -name '*.mp3' -exec vbrfix {} {} \;
https://snipt.net/embed/0b2c38c58392a3029ece88da46cd7b2b/
https://snipt.net/raw/0b2c38c58392a3029ece88da46cd7b2b/
0b2c38c58392a3029ece88da46cd7b2b
bash
Bash
1
2016-09-29T12:21:32
True
False
False
/api/public/snipt/6486/
use-vbrfix-to-repair-mp3-variable-bitrate-headers-recursively
<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 id="L-1"><a name="L-1"></a>nohup find . -type f -name <span class="s1">&#39;*.mp3&#39;</span> -exec vbrfix <span class="o">{}</span> <span class="o">{}</span> <span class="se">\;</span> </span></pre></div> </td></tr></table>
mp3

SQL

install amarok and mp3 codecs

yum -y install amarok xine-lib-extras-freeworld
https://snipt.net/embed/69fa7df25e46ea4666f1566aa33f0b17/
https://snipt.net/raw/69fa7df25e46ea4666f1566aa33f0b17/
69fa7df25e46ea4666f1566aa33f0b17
sql
SQL
1
2016-09-19T01:10:42
True
False
False
/api/public/snipt/1198/
install-amarok-and-mp3-codecs
<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 id="L-1"><a name="L-1"></a><span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">amarok</span> <span class="n">xine</span><span class="o">-</span><span class="n">lib</span><span class="o">-</span><span class="n">extras</span><span class="o">-</span><span class="n">freeworld</span> </span></pre></div> </td></tr></table>
amarok, kde, mp3, music
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.