#!/bin/bash vcodec="mp4v" acodec="mp4a" bitrate="3072" arate="192" ext="mp4" mux="mp4" vlc="/Applications/VLC.app/Contents/MacOS/clivlc" fmt="MPG" dst="/Dest/Path/" for a in *$fmt; do $vlc -I dummy -vvv "./$a" --sout "#transcode{vcodec=$vcodec,\ vb=$bitrate,acodec=$acodec,ab=$arate}:standard{mux=$mux,\ dst=\"$dst$a.$ext\",access=file}" vlc://quit touch -m -r $a $dst$a.$ext done
If you want to try this on Linux or Windows, you should use
vlc
instead of clivlc
. I included the touch
command so that the transcoded videos would still have the original capture date/time as their last modified date.