Hey everyone!!
I was recently guided toward ffmpeg for batch re-sizing video files and I've almost perfected it, but am running into a stumbling block with some files..
I have a folder containing many .flv and .mp4 files with varying resolutions.
All files need to be re-sized to 320 pixels in width, while maintaining the original aspect ratio, so frame heights will vary from file to file.
Included in the folder is the following batch file:
This works almost perfectly except for two issues..
1. A number of files in the destination folder are 0kb, and upon investigating I noticed ffmpeg returned the following error for each:
(sorry about the image.. i was having difficulty pasting the text)
... is there anyway to modify the command line so it doesn't error out when processing these files?
2. I've also noticed a slight affect to the framerates on the re-sized files.. its most noticeable when there is a long pan or steady movement across the screen.. Is this an unavoidable degradation due to the lossy nature of what im doing? .. or can the command line be tweaked to make the results as fluid as the original files?
Any help is greatly appreciated!!
Thanks!!
I was recently guided toward ffmpeg for batch re-sizing video files and I've almost perfected it, but am running into a stumbling block with some files..
I have a folder containing many .flv and .mp4 files with varying resolutions.
All files need to be re-sized to 320 pixels in width, while maintaining the original aspect ratio, so frame heights will vary from file to file.
Included in the folder is the following batch file:
Code:
set ffmpeg="C:\Program Files\ffmpeg\bin\ffmpeg.exe"
for %%f in (*.flv) do %ffmpeg% -i "%%f" -vf scale=w=320:h=-1 -crf:v 20 -acodec copy -vcodec libx264 -threads 0 -f flv -y ".\RESIZED\%%f_resized.flv"
for %%f in (*.mp4) do %ffmpeg% -i "%%f" -vf scale=w=320:h=-1 -crf:v 20 -acodec copy -vcodec libx264 -threads 0 -f mp4 -y ".\RESIZED\%%f_resized.mp4"
This works almost perfectly except for two issues..
1. A number of files in the destination folder are 0kb, and upon investigating I noticed ffmpeg returned the following error for each:

... is there anyway to modify the command line so it doesn't error out when processing these files?
2. I've also noticed a slight affect to the framerates on the re-sized files.. its most noticeable when there is a long pan or steady movement across the screen.. Is this an unavoidable degradation due to the lossy nature of what im doing? .. or can the command line be tweaked to make the results as fluid as the original files?
Any help is greatly appreciated!!
Thanks!!