View Full Version : Help me out with encoding of huge amount of similair files.
junglemike
8th April 2009, 09:57
Hello fellas. Hope somebody can help me.
I have a simple camcoder camera, which is full now. It has 850 files (40gb tatal) which have all the same parameters:
Complete name : N:\Den rozdenija 19\MOV055.MOD
Format : MPEG-2 Program
Format/Family : MPEG-2
File size : 136 MiB
PlayTime : 2mn 54s
Bit rate : 6525 Kbps
Video #0
Codec : MPEG-2 Video
Codec profile : Main@Main
Codec settings/Matri : Custom
PlayTime : 2mn 54s
Bit rate : 8400 Kbps
Bit rate mode : CBR
Width : 720 pixels
Height : 576 pixels
Aspect ratio : 4/3
Frame rate : 25.000 fps
Standard : PAL
Chroma : 4:2:0
Interlacement : Top Field First
Bits/(Pixel*Frame) : 0.810
Audio #0
Codec : AC3
PlayTime : 2mn 54s
Bit rate : 384 Kbps
Bit rate mode : CBR
Channel(s) : 2 channels
Sampling rate : 48 KHz
They are typical mpeg-2 interlaced home videos.
In the past, i processed them this way:
a)I compressed audio using batch encoding ability of VirtualDubMOd (i know it's old tool)
b)I prepared the .avs files with Gordian Knot, I opened each file, applied deinterlacing filter in gordian knot (btw, which is best), than adjusted resolution if needed, and saved .avs file for each video w/o encoding with GK.
c)I loaded each file in Megui , pressed on AutoEncode, and choose desired bitrate.
d) After encoding i would put file processed with Megui(for video) and file processed with VDMod (for audio) into MKVMerge gui, and would choose x264 video and .mp3 audio and save them as .mkv file.
As you see, this is somewhat long process, even for a small amount of files. I would really like to simplify it , even at expence of lower quality if needed, or learning new programs.
Any Suggestions.
audyovydeo
8th April 2009, 10:27
I have a simple camcoder camera, which is full now. It has 850 files (40gb tatal) which have all the same parameters:
Any Suggestions.
Hello
I have struggled with the temptation of converting my camcorder files to some other format, deinterlacing it on the way. Finally, I have come to the conclusion that it should be kept as the reference source material.
That's irrespective of any future editing I may/may not do on any of it.
I'm just not confortable with throwing away originals, no matter how big, no matter what format.
Since you decided to transcode :
- carefully test & choose the best deinterlacing method. You're obviously going to deinterlace only once.
- why convert AC3 to MP3 ? just stuff AC3 into target file.
There was a recent thread where windows batch scripts were posted using DGMPGdec to demux in batch mode, then encode via x264 cli. That's probably the best way to automate your procedure.
cheers
audyovydeo
ajp_anton
8th April 2009, 12:55
To avoid creating lots of .avs files, create only one where you join all the clips and set the --seek and --frames parameters in x264. I do this a lot using Excel:
- Make a list of the frames where a new clip starts.
- "Drag" one column so that it says x264.exe [--options] --seek ?? --frames ?? where "??" are calculated from the frame list.
- Make another column for bepipe.exe + neroaacenc.exe (or whatever encoder you use) where you use script mode so that you can add an avisynth trim parameter using the same "seek" and "frames" numbers as for x264.
- And a 3rd column for the muxer - just make sure the output filenames above are numbered (or else different) =)
Then copy these columns to a batch file.
junglemike
8th April 2009, 17:09
Not sure i understood the method how to create avs files using excel.
But I know there is a way to perform a simple operation in command prompt that would create a script files automatically. I just don't have enough knowledge.
For example, When i want to extract audio from lots of .avi files i write this command.
for %f in (*.avi) do avi2wavcmd %f d\audio\%f.mp3
I believe something similair should be done to create a bunch of scripts our of these camera files.
I can create one script for one file, and just somehow duplicate this script, changing only names of the name of files avisynth opens.
How can I do it?
J_Darnley
8th April 2009, 17:23
FOR %A IN (*.mod) DO (
echo First line
echo Second line
) > file.avs
or
FOR %A IN (*.mod) DO (
echo First line > file.avs
echo Second line >> file.avs
other command
)
junglemike
8th April 2009, 21:54
J_Darnley, I feel that I'm close, but still something doesn't work.
I've managed to run DGindex in a batch mode, so i have now about 800 .d2v files. I've created a single script that 100% works, and i'm trying to use this as a template.
This is a script:
LoadPlugin("c:\progra~1\gordia~1\dgmpgdec\DGDecode.dll")
LoadPlugin("c:\progra~1\gordia~1\AviSynthPlugins\UnDot.dll")
LoadPlugin("c:\progra~1\gordia~1\AviSynthPlugins\TomsMoComp.dll")
mpeg2source("G:\todo\mov0174.vob.d2v")
TomsMoComp(1,5,1)
crop(0,0,720,576)
LanczosResize(576,320)
Undot()
I've tried adding the commands you suggested - also replace mpeg2source line with mpeg2source("%a")
and at the end I wrote >%a.avs
And it doesn't work. It only tries to process only first line of the text.
I also tried saving the file as .bat, and running it, but with the same result.
Don't know what's wrong....
junglemike
8th April 2009, 22:24
Ok guys, I managed to create appropriate scripts.
Now I only need to figure out how to encode the scripts in Megui using batch operation.
audyovydeo
9th April 2009, 07:42
Ok guys, I managed to create appropriate scripts.
Now I only need to figure out how to encode the scripts in Megui using batch operation.
now that you got the scripts, you can forget megui ;-)
cheers
a/v
smok3
9th April 2009, 08:02
my approach has been to work on avisynth templates and then loop a batch around another batch, like this one;
copy t:\path\template.avs "%~n1.avs"
SearchAndReplace "%~n1.avs" "film.avi" %1
SearchAndReplace "%~n1.avs" "film.wav" %~d1%~p1%~n1.wav
ajp_anton
9th April 2009, 20:00
Not sure i understood the method how to create avs files using excel.The point was to create *one* avs file which joins all of the clips, and use x264's --seek xx --frames yy and bepipe's script+trim(xx,-yy) to encode each clip. Excel is used generate the commands and calculate the xx and yy values.
junglemike
10th April 2009, 21:18
Thanks guys for the info. I've created the scripts, Now i'm trying to work with x264.exe, b/c looks like Megui won't help me batch process lot of files at once. I've already asked the related quation in another thread. Thanks.
stax76
29th August 2009, 04:19
Using StaxRip's file batch mode should be much easier.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.