I've maxed the storage space I have and I would like to make some space.
I've thought of converting all files to mkv and down-scaling high resolution files to a lower resolution.
So to convert mp4 to mkv there is
ffmpeg -i input.mp4 -vcodec copy -acodec copy output.mkv
And to downscale there is
ffmpeg -i input.mp4 -vf scale=$w:$h <encoding-parameters> output.mp4
but I need to convert all files not a single mp4 one, I need to remove the input file after done processing it and I have to do this only for files above a given resolution. Also I would like to keep the aspect ratio and I don't know if this is doing that.
There is a tool called video-diet that does part of this.
This is what I would like to do
Recursively find every file under the current directory
If the file resolution has a height equal or greater to a given height.
Convert the file to mkv if it's in another format avi, mp4, flv, etc
Downscale to a lower resolution height, keeping the aspect ratio.
Maybe I should also lower the frame rate to 24 fps?
If there is a better way, I would like to hear it.