Convertir formatos de imagen vectorial a .jpg

Cómo convertir lista de archivos .svg a .jpg usando Inkscape

Crea un listado de archivos .svg y

Fijate en estos enlaces:

https://superuser.com/questions/1621950/how-to-convert-svg-to-png-with-ffmpeg

	      You can also use Inkscape's --shell mode:

The input file (let's call it input.txt) should look something like this:

file-open:0001.svg;export-filename:0001.png;export-do;file-close;
file-open:0002.svg;export-filename:0002.png;export-do;file-close;
file-open:0003.svg;export-filename:0003.png;export-do;file-close;
file-open:0004.svg;export-filename:0004.png;export-do;file-close;
quit-inkscape;

Put as many input and output files into it as you'd like (though I found around 300 files was as much as I was comfortable doing at once, since sometimes it hangs). The SVG files have to exist already, and the PNG files will be created.

And you run it something like:

cd /path/to/folder/with/svgs
cat input.txt | inkscape --shell
	    

Con un script en bash vamos a generar el listado al que llamaremos milista.txt:

#!/bin/bash
# Generar lista de conversion de .svg a .jpg usando inkscape --shell
start=`date +%s`
for f in *.svg  # asigna a f todos los archivos .svg del directorio
	 # quitar ultimos 4 caracteres y poner al final .jpg ${f%????}
	     
	      do
	      echo "file-open:$f;export-filename:${f%????}.jpg;export-do;file-close;" >>milista.txt
	      done
end=`date +%s`
runtime=$((end-start))

echo "Tiempo de ejecución: $runtime segundo(s)"

	    
cat milista.txt | inkscape --shell

A mi me dio errores, pero lo estoy haciendo manualmente. Entro a Inkscape, abro el archivo .svg lo exporto a .jpg y salir.

Preparar slideshow de fotos con duracion para ffmpeg a video

Usaremos un script en bash para generar el listado que llamaremos slidetime.sh:

#!/bin/bash
# Generar slides  de .jpg con duracion en segundos para ffmpeg 

start=`date +%s`
audio=pcdc.m4a
# empezar el audio y simultaneamente mostrar las imagenes
ffplay -autoexit $audio &
for f in *.jpg  # asigna a f todos los archivos .jpg del directorio
	 # quitar ultimos 4 caracteres y poner al final .jpg ${f%????}

do
    ini=`date +%s` # comienza a medir el tiempo
    feh $f
    fin=`date +%s` # marca el fin del tiempo
    lapso=$((fin-ini))
    echo "file '$f'" >>slidest.txt
    echo "duration $lapso" >>slidest.txt
    ini=0
    fin=0
done
end=`date +%s`
runtime=$((end-start))

echo "Tiempo total de ejecución: $runtime segundo(s)"
	    

Ahora el archivo generado por el script se llama slidest.txt lo puedes usar para generar un video de esas imagenes con duraciones específicas para cada foto. Se genera tecleando en la terminal en la carpeta donde se alojan las imagenes:

ffmpeg -f concat -i slidest.txt output.mp4

Puedes agregarle audio de fondo. usaremos al audio pcdb.m4a:

	      ffmpeg -f concat -i slidest.txt -i pcdb.m4a output.mp4