echo "${dup}"
}
+function generate_video()
+{
+ if which ffmpeg 1> /dev/null 2>&1; then
+ if [ -f ${dest}/${group}-f1.png ]; then
+ if [ ${dry_run} -eq 0 ]; then
+ # Conversion vidéo:
+ ffmpeg ${FFMPEG_OPTS} -r ${fps} -start_number 1 -i ${dest}/${group}-f%d.png ${dest}/${group}.mp4
+ fi
+ fi
+ fi
+}
+
print_usage()
{
echo "${PROG_NAME} -- Générateur de séquence d'images PNG à partir d'un fichier Photoshop (PSD)."
# Only change group if ng is set...
if [ x"${ng}" != x"" ]; then
- if which ffmpeg 1> /dev/null 2>&1; then
- if [ -f ${dest}/${group}-f1.png ]; then
- if [ ${dry_run} -eq 0 ]; then
- # Conversion vidéo:
- ffmpeg ${FFMPEG_OPTS} -r ${fps} -start_number 1 -i ${dest}/${group}-f%d.png ${dest}/${group}.mp4
- fi
- fi
- fi
+ generate_video
group="${ng}"
log_dbg "New group: ${ng}"
fi
done <${layers}
fi
+
+# Special case for last group...
+generate_video