title: Output filename extension in fswatch and ffmpeg
body: <p>I'm having issue with the file-naming extension output. My input is JPG files that needs to convert to MP4 using FFMPEG. However, when I run the code below it output as <code>img1.jpg.mp4</code> including the input file extension instead of just <code>img1.mp4</code>.</p>
  <pre><code>fswatch -e &quot;.*&quot; -i &quot;\\.jpg$&quot; . |xargs -n1 basename|xargs -n1 -t -I {} sh -c 'pwd;[[ -f {} ]] &amp;&amp; ffmpeg -y -loop 1 -i &quot;{}&quot; -vf &quot;fade=t=in:st=0:d=1,fade=t=out:st=2:d=1&quot; -preset &quot;ultrafast&quot; -c:v libx264 -t 3 -pix_fmt yuv420p &quot;{}.mp4&quot;'
  </code></pre>
  <p>Any help is much appreciated.</p>
  <p>Running on MAC, SH/BASH</p>
  <p><strong>EDITED:</strong></p>
  <p>BTW I also tried a loop to do the trick like the code below, but I'm looking to more neat solution to fix it in the same line of code above or call function after <code>FSWATCH</code> successful operation.</p>
  <pre><code> for file in
       *.jpg.mp4; do
          mv &quot;$file&quot; &quot;$(basename &quot;$file&quot; .jpg.mp4).mp4&quot;
      done
  </code></pre>