I have about 300 videos, on a Debian server, stored in the following manner:
/mediaroot/1/m32.mp4
/mediaroot/2/m421.mp4
/mediaroot/n/mx.mp4
They all need to be deinterlaced, and I want to do it with FFmpeg.
With the assistance of another helpful sole, I have reached a somewhat tolerable result with the following steps:
- extract audio
transcode video, example
ffmpeg -y -i m148.mp4 -pix_fmt yuv420p -an -pass 1 -passlogfile m148.x600.1351896878.log -an -vcodec libx264 -b:v 600k -preset medium -tune film -threads 0 m148.x600.1351896878.mp4 ffmpeg -y -i m148.mp4 -pix_fmt yuv420p -an -pass 2 -passlogfile m148.x600.1351896878.log -an -vcodec libx264 -b:v 600k -preset medium -tune film -threads 0 m148.x600.1351896878.video.mp4
mux new video with audio extracted in step 1.
use qt-faststart to move the atoms
ffmpeg/qt-faststart m148.x600.1351896878.mp4 m148.x600.1351896878.atom.mp4
My question is then: How do I make it automatically deinterlace and replace all the videos?