Buenas. Ante todo decir que uso Linux.
Estoy buscando la manera de convertir unos archivos (son unos cuantos) flv a mp4 (formato PSP 480x272).
Se hacerlo mediante la interfaz gráfica de 1 en 1, pero quisiera hacerlo mediante un script, aunque como estoy pez en esto del scripting no consigo llegar a saber muy bien cómo hacerlo.
Investigando en el wiki he encontrado un script para pasar todos los archivos de una carpeta MP4 a AVI, lo cual es muy similar ra lo que yo quiero:
#!/bin/bash
VAR="files.txt"
ls *.mp4 | sort > $VAR # Collect the files in the current directory
cat $VAR | while read line; do # Loop read the filenames from the file
INPUT=$(echo ${line}) # Grab the nxt new filename
OUTPUT=${INPUT%.*4} # Remove shortest match of characters between the '. ' and the '4' at end of string
OUTPUT+=".avi" # Append new extension
avidemux2 --force-alt-h264 --load "$INPUT" --save "$OUTPUT" --output-format AVI --quit
done
rm $VAR # Remove the text file with the file names
Alguien me puede ayudar a retocarlo para este fin?