After many years of trial and error, someone on here taught me how to deinterlace my uncompressed AVIs using AviSynth. It's for the purpose of capturing VHS.
It's the best result I've found so far.
I want to compress to MP4 but I'm unsure how much quality I'm losing whilst trying different settings in Davinci Resolve, Handbrake & VidCoder.
If there's a thread here, or maybe a process somebody could share using virtualdub or ffmpeg perhaps, I'd be really grateful.
I'm hoping to keep the file size down, whilst retaining as much audio and video quality as possible. In Davinci Resolve they average around 20GB per file, (3 hours video, from a lossless AVI of about 600GB after deinterlacing). I've really tried hard using Davinci & it's the best I can achieve. I managed to do well with Handbrake, but without trial & error with as many combinations as I can attempt, it's a bit of a minefield as is ffmpeg too.
+ Reply to Thread
Results 1 to 15 of 15
-
-
If it's SD (720x576, 720x480), shoot for around an average bitrate of 6000kbps max. You can either set the bitrate or use CRF, which most people use, as Dave suggested.
from a lossless AVI of about 600GB after deinterlacing -
-
Thanks for the help everyone, I've been away from home for a few days but just letting you all know I appreciate your help very much.
I'll get onto trying out these suggestions when I return in a couple of days, thanks again! -
Thanks Lollo, & especially for helping me get this far with deinterlacing.
Since I'm so new to coding in general, I lack most basic understanding.
[/QUOTE]
Once you have your final .avs script you can simply run a cmd line:
Code:ffmpeg.exe -i <input>.avs -c:v libx264 -crf 17 -preset slow -aspect 4:3 -c:a aac -b:a 128k <output>.mp4
Is this what I should do:
1) Create a new .AVS file
2) Type in the code you quoted above
3) open and run in VirtualDub for the AVI to MP4 Converting process to start ?
As I lack knowledge of the basics, I'm just a little unclear, eg, if the Deinterlaced AVI file was called 'Silver.AVI', would that make the above coding look like this in my .AVS file.. ?
ffmpeg.exe -i <Silver>.avs -c:v libx264 -crf 17 -preset slow -aspect 4:3 -c:a aac -b:a 128k <output>.mp4
I'm sorry if it's too much to explain, I'm just unsure exactly which program I'd type this in, unless you mean Windows Command Prompt? -
once you have your avisynth script (which deinterlace, denoise, etc.) you can use it as input to ffmpeg encoder to generate the final output file:
Code:ffmpeg.exe -i Silver.avs -c:v libx264 -crf 17 -preset slow -aspect 4:3 -c:a aac -b:a 128k Silver.mp4
Code:ffmpeg.exe -i Silver.avi -c:v libx264 -crf 17 -preset slow -aspect 4:3 -c:a aac -b:a 128k Silver.mp4
-
Hello again,
I'm almost there, I tried to research more about ffmpeg as for what I might not be understanding, in order to complete this step.
Do I type this code into CMD prompt? Apologies, how ffmpeg works isn't too obvious to me.
I'm guessing that the first part of the code would include the exact path where ffmpeg.exe is located, so would it be something like this:
[ FFmpeg exe file (application) is kept in Local Disk (Cin a folder called FFmpeg ]
C:/ffmpeg.exe -i Silver.avs -c:v libx264 -crf 17 -preset slow -aspect 4:3 -c:a aac -b:a 128k Silver.mp4
I followed a guide to install ffmpeg in CMD Prompt, I think its installed correctly. I just want to see if I'm doing this in the right way. -
-
do I need to do anything with AviSynth before I use CMD prompt to type in this code?
In the folder you made for me called Neil-Betamax, I have the file called de-interlace.avs which worked in virtual dub to create the deinterlaced AVI.
The deinterlaced AVI file is called silver.AVI and is located in the folder, Neil-Betamax.
So the location for it at present, is C:\Videos\Video Software\Neil-Betamax
When I start to type in CMD Prompt, anything I type seems to need to begin with
C:\Users\User>
So it looks like this:
C:\Users\User>FFmpeg\ffmpeg.exe -i Silver.avs -c:v libx264 -crf 17 -preset slow -aspect 4:3 -c:a aac -b:a 128k Silver.mp4
I haven't touched AviSynth or made a different avs file since the one you made in the Neil-Betamax folder. I'm wondering if I'm understanding this right when you say 'once you have your avisynth script (which deinterlace, denoise, etc.) ' - this means I need to have already created another avs file in order for the ffmpeg code to work in CMD Prompt? -
1- either you apply the Avisynth processing, obtaining the filtered output .avi file and then you compress with ffmpeg using as input the .avi file, or you do not do the first step and compress with ffmpeg using as input the .avs script
2- when you open the command prompt, you should mode to the directory where the files and the scripts are located and call ffmpeg with its absolute path or you move where the ffmpeg.exe is located and call the input file or the input script with their absolute paths.
In general you should get familiar with Windows commands and basic architecture -
Originally Posted by Lollo
Are you implying use the "cd" command?
@Neil, if you end up with this in the command prompt window:
C:\Users\User>FFmpeg\ffmpeg.exe -i Silver.avs -c:v libx264 -crf 17 -preset slow -aspect 4:3 -c:a aac -b:a 128k Silver.mp4
Just use the keyboard L and R arrow keys to move along to the start of the command and delete, with the DEL or Backspace keys, the characters you don't want, in this case, all of this: "Users\User>".
You'll then end up with the command in post #10 ie without the "users" stuff in it. The hit Enter to run it.
If I'm reading it right, you'll need to put in the full path (use quotes) to your AVS file, not just "silver.avs", because it's not in the ffmpeg folder. So, with ffmpeg in it's folder on the C drive and silver.avs in the Neil folder, your command should be:
C:\FFmpeg\ffmpeg.exe -i "C:\Videos\Video Software\Neil-Betamax\Silver.avs" -c:v libx264 -crf 17 -preset slow -aspect 4:3 -c:a aac -b:a 128k Silver.mp4
and Silver.mp4 will appear in your ffmpeg folder.
You should just need to copy that command, then paste it into the command line you get in the cmd prompt window and hit Enter to run it. You shouldn't have to remove that "user" stuff.
Not that I'm an expert, but see how that goes.Last edited by Alwyn; 15th Jun 2025 at 05:38. Reason: fixed typo: changed Silver.avi to Silver.mp4
-
Myself I have ffmpeg.exe in the "Environmental Variables" "Path".
Like this: C:\Program Files\ffmpeg\bin
This is the location of ffmpeg.exe on my computer.
That way using the code you posted all I have to put in the command window is .
Code:ffmpeg.exe -i "C:\Videos\Video Software\Neil-Betamax\Silver.avs" -c:v libx264 -crf 17 -preset slow -aspect 4:3 -c:a aac -b:a 128k Silver.mp4
I also do it this way so Windows does not need to use "Environmental Variables" "Path".
In the command prompt for my OS :
cd \Program Files\ffmpeg\bin Enter.
For you cd \you'll need to put in the full path to your ffmpeg.exe .
I prefer my ffmpeg folder uncluttered so I also put the full path for the output file.
In your case C:\Videos\Video Software\Neil-Betamax\Silver.mp4 -
Thanks Lollo, I appreciate your help. I've read back your reply many times & I'm still pretty lost as I lack a lot of basic understanding, whilst do I understand a small amount on how it works in general. I've done a little bit of coding in STOS for the Atari ST EG, I had to step back for a week till I can dedicate time to try to understand. I guess once I have my head around it, it will make life easier in the long run when it comes to other tasks.
I'll take a good look at this today
Similar Threads
-
Compress MP4 File
By Jezzz in forum Newbie / General discussionsReplies: 5Last Post: 12th Jan 2025, 13:12 -
AVI > MP4 x264 Problem Losing Quality in StaxRip
By mike981 in forum RestorationReplies: 19Last Post: 10th Mar 2024, 13:27 -
avisynth/ffmpeg with variable framerate MP4 source and audioDissync problem
By marcorocchini in forum Newbie / General discussionsReplies: 10Last Post: 12th Jul 2023, 19:57 -
FFmpeg: Lossless video conversion from AVI to MP4 possible for ALL codecs ?
By pxstein in forum Video ConversionReplies: 1Last Post: 8th Feb 2022, 01:20 -
Compress Mpeg2 to H.264 MP4
By Ferggue in forum Capturing and VCRReplies: 2Last Post: 10th Dec 2021, 04:46