Linux photo

From miki
Revision as of 07:49, 16 July 2017 by Mip (talk | contribs)
Jump to navigation Jump to search

Duplicate finder

From [1]:

  • Use ExifTool + own script
  • See findimagedupes in Debian (works even if file is modified a bit)
  • See fdupes (files must identical)
  • See fslint
  • See ssdeep
  • See Geeqie (fuzzy matching), new vesion of gqview
  • Use a photo manager (shotwell,

Thumbnails

ffmpegthumbnailer

Requires ffmpegthumbnailer:

THUMBDIR=thumbnails
THUMBSUMMARY=summary.png

make_thumbnails()
{
	if [ -d $THUMBDIR ]; then
		mv $THUMBDIR $THUMBDIR-$(date +"%Y%m%d%H%M%S")
	fi
	# sudo apt install ffmpegthumbnailer
	SIZE=512
	mkdir -p "$THUMBDIR"

	i=0
    for f in *; do 
    	[ "$f" = "$THUMBDIR" ] && continue
    	echo -- "$f"
    	ffmpegthumbnailer -s $SIZE -i "$f" -o "$THUMBDIR/$f-10.png" -c png -t 10
    	ffmpegthumbnailer -s $SIZE -i "$f" -o "$THUMBDIR/$f-20.png" -c png -t 20
    	((i++))
    	# [ $i -lt 5 ] || break
    done
    echo "Doing montage..."
    montage -label %f -frame 5 -geometry "$SIZEx$SIZE+2+2>" $THUMBDIR/*.png $THUMBSUMMARY
    mv $THUMBSUMMARY $THUMBDIR/
}

Note that the thumbnail summary can be quite big. Use viewer like feh to view it. The same application can be used to view thumbnails easily:

THUMBDIR=thumbnails
THUMBSUMMARY=summary.png

view_thumbnails()
{
	# sudo apt intall feh
	feh -dF --zoom fill $THUMBDIR
}

view_thumbnails_summary()
{
	# sudo apt intall feh
	feh $THUMBDIR/$THUMBSUMMARY
}

ffmpeg

ffmpeg -itsoffset -5 -i "$srcimg" -vcodec mjpeg -vframes 1 -an -f rawvideo -s 200x200 -loglevel quiet "$dest"