dotfiles

<-- duh.
git clone https://hhvn.uk/dotfiles
git clone git://hhvn.uk/dotfiles
Log | Files | Refs | Submodules | LICENSE

set (348B)


      1 #!/bin/rc
      2 #
      3 # Add cover art to audio.
      4 #
      5 # usage: tag/cover/set <cover> files...
      6 
      7 cover = $1
      8 shift
      9 
     10 fn sigexit {
     11 	rm $tmp
     12 }
     13 
     14 for (f in $*) {
     15 	tmp = /tmp/$pid.cover.`$nl{echo $f | tr / _}
     16 	ffmpeg -i $f -i $cover -map 0:0 -map 1:0 -codec copy -id3v2_version 3 -metadata:s:v title='Album cover' -metadata:s:v comment='Cover (front)' $tmp
     17 	mv $tmp $f
     18 }