Deinterlacing a whole folder

Questions involving a Windows version of FFmpeg.
Post Reply
Posts: 1
Joined: Sun Oct 20, 2019 12:05 pm

Deinterlacing a whole folder

Post by Nadneg » Sun Oct 20, 2019 12:17 pm

Hello everyone,
I‘m completely new to this forum and to Ffmpeg so I‘m not sure whether my question has already been dealt with. If so, I‘m sorry. Still I am desperate and after many hours of research I figured I need some help.So...

I have over 1000 videos from my Sony camera in .MTS format. On my camera they looked fine but now that I wanted to edit them in DaVinci Resolve I found out that they are all interlaced and I cannot use them like that. So I installed Ffmpeg and found this phrase to convert them:

Ffmpeg -i input_file.MTS -vf yadif=1 -acodec ac3 -ab 192k -vcodec mpeg4 -f mp4 -y -qscale 0 output_file.mp4

The outcome looked fine so I wanted to deinterlace the whole folder. Everything I tried failed completely, could someone please tell me how to add the folder to this? :cry:

The folder‘s name is C:\Users\HP\Desktop\DEINTERLACED and I do not really care where the output is.
I have WINDOWS installed and as I read it is important that my files all have names with a space in them (I could rename them, though, if necessary)

Thank you in advance!

Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Re: Deinterlacing a whole folder

Post by pandy » Tue Oct 22, 2019 4:05 pm

Try to run this (didn't modified your script, i would wrote it in a different way but if it works for you then OK):

Code: Select all


@set OUTDIR="out"

@if not exist %cd%\%OUTDIR% (mkdir %cd%\%OUTDIR%)

@FOR %%a IN (*.mts) DO (@%FFMPEG% -y -hide_banner -i "%%a" -vf yadif=1 -acodec ac3 -ab 192k -vcodec mpeg4 -f mp4 -qscale 0 "%OUTDIR%\%%~na.mp4")


Post Reply