|
|
| MJ Peg |
| Posted: Sep 29 2009, 02:40 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 38
Member No.: 26241
Joined: 29-September 09

|
Hi I've been trying to get help on http://forum.videohelp.com/topic373535.html but I figured I might as well ask here
I would love to be able to drag-n-drop a bunch of mts files (which open fine in VirtualDub with FFMpegSource2("example.mts",atrack=-1) onto some utility prog and have VirtualDub+deshaker process them all to individual avi files.
Can that be done, unattended, with a 2-pass filter like deshaker? At the moment all I can do is manually process each file, which is extremely tiresome... or go down the route of making one long mts file (if only I could find a good free way that actually works!) to deshake in one long go and manually separate it out into the original clips when editing. The videhelp.com topic would show you that I'm not having a great deal of luck processing more than a handful of clips at a time with the script method I've come up with so far with their help. I've tried so much freeware it's getting silly, but I remain hopeful!
There must be a way, surely... if only someone could tell me? PLEASE?!! |
 |
| spapakons |
| Posted: Sep 29 2009, 03:19 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 521
Member No.: 20179
Joined: 7-November 06

|
As far as I understand you open each file do your processing and then save it. Why don't you add them to a list to process them all? Open the first file, apply the settings you want, including compression etc. Then File->Queue Batch Operation->Save as AVI will put it in the job list instead of processing it immediately. Then load the next file. Assuming the processing settings are the same, don't change anything, add the file to the job list. When you have loaded and added all the files to the list, go to File->Job Control and click START to begin... By the way, what do you mean "Deshaker"? What this filter does? Stabilizes shaky video? |
 |
| MJ Peg |
| Posted: Sep 29 2009, 03:30 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 38
Member No.: 26241
Joined: 29-September 09

|
Thanks
Deshaker is a filter (Deshaker.vdf) from http://www.guthspot.se/video/deshaker.htm which does a great job of making my wobbly camerawork look stable! I'd like to run all my clips through it, as it doesn't do any harm and I convert from the original AVCHD Lite MTS format into mp4 AVI files with a converter (Prism) before editing in VideoPad (because that NLE doesn't get on well with AVCHD but works well with the AVI files).
Basically I'd be using VirtualDub instead of the Prism converter (both save to AVI with FFDSHOW) with the added advantage of deshaking.
Unfortunately I've no idea how to get the 2-pass filter applied and automated for a batch of 50 or more files.... |
 |
| spapakons |
| Posted: Sep 29 2009, 04:01 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 521
Member No.: 20179
Joined: 7-November 06

|
Do the first pass in all files and then add the files to the list again for the second pass. Thanks for the filter! I didn't know there is such a thing! "I grow wiser as I grow older", as Socrates has said. |
 |
| MJ Peg |
| Posted: Sep 29 2009, 04:14 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 38
Member No.: 26241
Joined: 29-September 09

|
> Do the first pass in all files and then add the files to the list again for the second pass.
I might need that spelled out for me in greater detail, please Is there a guide anywhere online that would show me how to do that?
thanks |
 |
| spapakons |
| Posted: Sep 29 2009, 04:38 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 521
Member No.: 20179
Joined: 7-November 06

|
Maybe I'm wrong here, I haven't done it, but I'll try to explain it:
Well, open the first file and configure the codec for the first pass, then add all the files in the list. Process them to create the intermediate files. Now open the first intermediate, configure it for the second pass and add it to a new list. Open the next intermediate files and add them to the list. Process them and you are done. By they way, I think some codecs when you specify two passes do them automatically without user's attention. As a last resort try only one-pass. If you are using Divx Pro setting the quality to "insane quality" does in effect a dual pass automatically, you only have to specify single pass and enough bitrate (over 700 for full definition). Probably there are similar settings in Xvid and other codecs, so you don't need to use explicitly two-pass. |
 |
| MJ Peg |
| Posted: Sep 29 2009, 04:50 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 38
Member No.: 26241
Joined: 29-September 09

|
Thanks... but that sounds like it will save the files after each pass, and I'd rather avoid a generation loss? I'd rather script it than try to figure out the arcane GUI method - the batch/jobs parts of the program look baffling!
I've been rooting around the interwebs and I've found some automation methods using vdub.exe with scary parameters, and also there seems to be a batch control method with commands like VirtualDub.Open(U"e:\test\test.avi"); ( http://www.virtualdub.org/docs/vdscript.txt ) which I suppose I would do well to study.
I can handle DOS batch files and a bit of light programming, so a script method would be really good.
I never thought it would be easy |
 |
| stephanV |
| Posted: Sep 29 2009, 05:13 PM |
 |
|
Spam killer ;)
  
Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04

|
I created a batch script that does 2-pass xvid on a bunch of mpg files. It can be found here -> http://forums.virtualdub.org/index.php?act...12929&hl=script
With a little modification and creation of your own vcf files you could suit it to your own needs.
-------------------- useful links: VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ |
 |
| MJ Peg |
| Posted: Sep 30 2009, 09:34 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 38
Member No.: 26241
Joined: 29-September 09

|
Thank you Stephan, interesting script. It looks like it's running the vcf scripts for pass 1 and 2 with a save to AVI in between, so the final result per clip has been through 2 saves? i.e. there will be a generation loss? Or have I got the wrong end of the stick?
My understanding of the Deshaker 2 pass technique is that the first pass writes a log file and only the 2nd pass actually applies the changes... and then it needs the save operation to actually write to an AVI file (just the once). I'm keen to duplicate this exactly by scripting, not have 2 AVI writes per clip...?
Thanks |
 |
| stephanV |
| Posted: Sep 30 2009, 09:50 AM |
 |
|
Spam killer ;)
  
Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04

|
| QUOTE (MJ Peg @ Sep 30 2009, 11:34 AM) | | Thank you Stephan, interesting script. It looks like it's running the vcf scripts for pass 1 and 2 with a save to AVI in between, so the final result per clip has been through 2 saves? i.e. there will be a generation loss? Or have I got the wrong end of the stick? |
You have the wrong end of the stick. Two files are saved, but the first is simply discraded, you use the same source file for the first and second pass.
It should be possible to have VirtualDub not write a file at all for the first pass, but I don't know enough of VirtualDub's scripting language to know how.
-------------------- useful links: VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ |
 |
| MJ Peg |
| Posted: Sep 30 2009, 10:16 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 38
Member No.: 26241
Joined: 29-September 09

|
Brilliant! Thank you so much, I've had a play and that seems to have done the trick
I set up deshake1.vcf and deshake2.vcf ready to go, and script2.avs containing
| CODE | FFMpegSource2("00634.MTS",atrack=-1)++\ FFMpegSource2("00637.MTS",atrack=-1) DelayAudio(1.2) |
I then wrote a quick batch file as follows
| CODE | C:\Data\Progs\virtdub196\vdub.exe /c C:\Data\Progs\virtdub196\vdub.exe /s deshake1.vcf /p script2.avs test1.avi C:\Data\Progs\virtdub196\vdub.exe /s deshake2.vcf /p script2.avs test1.avi C:\Data\Progs\virtdub196\vdub.exe /r pause |
and the resulting test1.avi looks every bit as good as doing it manually!
I want to try to "roll my own" batch method of implementing drag-n-drop for a bunch of selected MTS files, rather than process an entire folder structure as you do, but that's a great starting point... you're a star, many thanks!!! |
 |
| MJ Peg |
| Posted: Sep 30 2009, 11:36 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 38
Member No.: 26241
Joined: 29-September 09

|
Something's gone horribly wrong
I've tried it with another avs file based upon a different MTS clip, and it's applied the deshake from the first run I did... it's made a relatively stable clip into a wobbly one because the first clip I ran it with was very wobbly.
And I've got a drag-n-drop batch file working, but if I drag 2 MTS files onto it then it's doing something like (shorthand pseudo code) ...
| CODE | vdub /c vdub /s pass 1 file 1 vdub /s pass 2 file 1 vdub /s pass 1 file 2 vdub /s pass 2 file 2 vdub /r |
- BUT I get 2 new wobbly AVI files both done with the same deshaking profile - they both wobble in the same way!
I'm so close... but it needs to reset something before each deshake, somehow... I scream inwardly |
 |
| stephanV |
| Posted: Sep 30 2009, 11:44 AM |
 |
|
Spam killer ;)
  
Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04

|
Check the settings for the deshaker log file and make sure "append to file" is not enabled. It should overwrite the log file with the first pass.
-------------------- useful links: VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ |
 |
| MJ Peg |
| Posted: Sep 30 2009, 12:11 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 38
Member No.: 26241
Joined: 29-September 09

|
Thanks, but it is as you said - set to no append.
I deleted the log file to be sure, and ran my batch with 3 files, all 3 came out with a blank screen saying "This frame was not processed in pass 1" and there's still no log file present!
If I do it manually it creates the log file, from the batch it doesn't
And unless there's some way to clear the log file before each clip in the job queue, it looks like this approach is a dead duck. I've joined the doom9 forum to ask there, but I can't post for a few days because I'm a newbie and they've got a bizarre forum policy I've never seen elsewhere
Gah...! |
 |
| MJ Peg |
| Posted: Sep 30 2009, 01:29 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 38
Member No.: 26241
Joined: 29-September 09

|
Why are we using batch jobs within VirtualDub when we're already in a batch file? Surely I just need something like this for each clip, but without needing the /c and /r lines because something other than /s /p would process a file in one hit using the specified vcf/avs/avi names?
| CODE | C:\Data\Progs\virtdub196\vdub.exe /c C:\Data\Progs\virtdub196\vdub.exe /s deshake1.vcf /p 00667.MTS.avs 00667.MTS.avi C:\Data\Progs\virtdub196\vdub.exe /r
C:\Data\Progs\virtdub196\vdub.exe /c C:\Data\Progs\virtdub196\vdub.exe /s deshake2.vcf /p 00667.MTS.avs 00667.MTS.avi C:\Data\Progs\virtdub196\vdub.exe /r
pause rem delete the log file manually (perhaps?) and do other files...
|
Unfortunately that doesn't work for some reason - pass 1 isn't working (and if we could get it to work then the original approach would probably work anyway!)
So.. can we get the above to work, or can we issue one immediate command per clip and pass, in some other way without using job batch queueing? |
 |