vampiricwulf / tanoshiine

Real-time imageboard in node v14.5.0 and redis
MIT License
5 stars 1 forks source link

Cover for music #124

Open tanosuggests opened 3 years ago

tanosuggests commented 3 years ago

Get cover from the music file instead of spec

vampiricwulf commented 3 years ago
  1. ffprobe check for cover art (pick first) and grab image dimensions
  2. rip out the image and spectrogram
  3. overlay the two
ffmpeg -i 01-Delusionalism.mp3  -an -c:v copy cover.jpg
ffmpeg -f lavfi -ss 110.675 -i "amovie=01-Delusionalism.mp3, asplit [a][out1];[a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]" -f image2 -vframes 1 -c:v png cover2.png
magick composite cover2.png cover.jpg -compose add test.png

If we can combine this all into one action, maybe. Also edit the last line to shrink the larger of the two images to fit within the smaller OR change line 2 to output in the dimensions of the cover.