encode videos

This current COVID19 has given me ample of time to take backups and cleanup pics and videos from my camera. Just a few commands to convert between formats to save space and archive.

converting between containers:

ffmpeg -i <my-video.mkv> -c:v copy -c:a copy <my-video.mp4>

for bulk converting in a directory:

for %f in (*.mkv) do (echo "ffmpeg -i %f -c:v copy -c:a copy %~nf.mp4")

encoding m4v to mkv/mp4 (hbcli is handbrake-cli):

hbcli -i <my-video.m4v> -o <my-video.mkv/mp4>

extracting audio from video:

ffmpeg -i <my-video.mp4> -f mp3 -ab 192000 -vn <my-audio.mp3>

links: