commit 906feeab3b1048389ee3d26ad6b29df5e6bcd4cc Author: Valentin Korenjak Date: Thu Jan 16 21:20:16 2025 +0100 prvi commit diff --git a/NarediFilmček b/NarediFilmček new file mode 100644 index 0000000..9f2a881 --- /dev/null +++ b/NarediFilmček @@ -0,0 +1,50 @@ +#!/bin/bash +# +# Naredi filmček -> (iz izbranih datotek naredi kratek animiran filmček) +# +# Author : Valentin Korenjak +# +# Licence : GNU GPL +# +# Copyright (C) Korenjak +# +# Dependency : mencoder imagemagick zenity Nautilus +# +# Encoding UTF-8 +# +# Vers.: 1.00 23.11.2010 +# +# Initial release + +# zenity --title "Kje smo" --info --text="$NAUTILUS_SCRIPT_CURRENT_URI" + +frame_rate=$(zenity --scale --text "Izberi hitrost" --min-value=2 --max-value=10 --value=6 --step 1);echo $ans +output_file_name=$(zenity --file-selection --save --confirm-overwrite);echo $output_file_name + +tmp_dir=/tmp/narediflmcek-`whoami` +if ! [ -d $tmp_dir ] +then + mkdir $tmp_dir +fi + +COUNTER=1 +TOTAL=$# +DATE="$(date +%Y_%m%d_%H%M)" + +( +for arg +do + echo 100*$COUNTER/$TOTAL | bc + image_file="$arg" + new_name=$tmp_dir/temp_`printf %06d $COUNTER`_$image_file.jpg + convert $image_file -level 2%,95%,1.0 -resize 640x480\! -quality 100 $new_name + COUNTER=$(( $COUNTER + 1)) +done +) | +zenity --progress --title="Obdelava sličic" --text="Pretvarjam posamezne fotografije..." --auto-kill --auto-close --percentage=0 + +cd $tmp_dir +(mencoder "mf://temp_*.jpg" -mf fps=$frame_rate -o $output_file_name.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=16000 +rm temp_*.jpg ) | +zenity --progress --title="Obdelava sličic" --text="Generiram filmček..." --pulsate --auto-kill --auto-close +