Hi
I use AviSynth and ffmpeg (ffmpegsource2) to open almost all formats with VirtualDub. Because of I am editing hundrets of Videos a week, I need a quick, comfortable way to create AviSynth scripts for VDub.
At moment, I created a button for my commander (Directory Opus), which creates through the windows shell .avs-files for all marked videos. This is the batch command I use with the button:
With this command I get script files looking like this:C:\windows\system32\cmd.exe /C echo ffmpegsource2("{file$}", atrack=-1) > "{sourcepath}\{file$|noext}.avs"
This is quite comfortable. But it's not dynamic enough. When I try to open an automatically created .avs file of an video without an audio stream, I get following message from VirtualDub:ffmpegsource2("example.wmv", atrack=-1)
Then I open the video with the direct show plugin.Avisynth open failure:
FFAudioSource: No Audio track found
(FFMS2.avsi, line 38)
(C:\example.avs, line1)
Could you help me a little find a way how to detect videos without sound to automatically adjust the AviSynth scripts for them? Possibly with MediaInfo or something? Or do you have complete other ideas how I could open up non-avi files in VDub with maximum comfort?
The batch script above is simple and I was able to create it, but I have no clue how to use it with MediaInfo or something to detect audio streams and adjust the output script.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 8 of 8
Thread
-
Last edited by klischee; 28th Oct 2010 at 16:54.
-
Good and simple idea! But DirectShow source has also problems with files without audio streams. But I can open it with ffmpeg too, when I don't use the atrack parameter.
This is now my batch script (with variables (grey) given from Directory Opus):
C:\windows\system32\cmd.exe /C echo try { ffmpegsource2("{file$}", atrack=-1) } catch (err) { ffmpegsource2("{file$}") } > "{sourcepath}\{file$|noext}.avs"Last edited by klischee; 28th Oct 2010 at 16:56.
-
I use a bunch of batch files in my Send To folder. That way I can just right click on a file and select Send To... For example AVS_AviSource.bat contains:
echo AviSource("%~d1%~p1%~n1%~x1") > "%~d1%~p1%~n1.avs" -
Sounds like the same I already do (with a button of my Commander tool). What I am interested in is to create those avs completely dynamic, to prevent errors. But the if/else string is quite cool, I have to look more into the syntax of avisynth it seems.
From what are these variables? -
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx
Same as your {file$} and {file$|noext}.avs
Similar Threads
-
Improve performance with VirtualDub & AviSynth
By ziggy1971 in forum Video ConversionReplies: 5Last Post: 26th Jan 2012, 18:17 -
Batch create simple ("DirectShowSource") .AVS files?
By Asterra in forum Newbie / General discussionsReplies: 8Last Post: 10th May 2011, 01:46 -
Ways to speed up rendering with VirtualDub + Avisynth?
By Asterra in forum Newbie / General discussionsReplies: 6Last Post: 18th Apr 2011, 11:20 -
Batch Test AVISynth (avs) files
By tevert in forum Video ConversionReplies: 9Last Post: 2nd Apr 2010, 11:38