
#!/bin/bashįind "$OrDir" -type f -exec /bin/bash -c \įfmpeg -i "$1" -c:v libx264 -crf 23 -preset ultrafast -c:a aac -strict experimental -b:a 192k -ac 2 "$", '.m4v', 0, NOW()) Also how to add in a check to skip the conversion on files that are already m4v's.

If anyone has any tips on that I'd be very appreciative. I'd then like for it in the future to add the file name and details to a MySQL database. Then once it has done that to remove the original file (ideally if it is smaller than the original - however I haven't figured out this bit yet.) I am very new to shell scripts so any help would be most appreciated. Then once it has been converted, to generate a thumbnail from a supposedly 'relevant' part of the converted file. The idea is to find and convert all files in a directory to m4v's. Can anyone tell me where I'm going wrong doing this.
