View Single Post
Old 27th March 2018, 11:24   #20  |  Link
zdoe
Registered User
 
Join Date: Mar 2018
Posts: 9
ok - i'm getting close, i think, but still errors

avs:
Code:
SetWorkingDir("C:\Program Files (x86)\AviSynth\plugins\")
LoadPlugin("ffms2.dll")
LoadPlugin("AutoAdjust.dll")
LoadPlugin("depanestimate.dll")
LoadPlugin("depan.dll")
LoadPlugin("GetSystemEnv.dll")

BlankClip()
zname=GetSystemEnv("zname")
subtitle(getsystemenv("zname"))
FFvideoSource(zname)

Lanczos4Resize(1920,1080)
i = ConvertToYV12(matrix="rec709")
mdata = DePanEstimate(i)
vectors=MSuper().MAnalyse(isb=false,blksize=8, overlap=0,search=5) globalmotion=MDepan(vectors,pixaspect=1,thSCD1=500) 
DePanStabilize(i, data=mdata)
AutoAdjust(auto_gain=true, auto_balance=true)

vid=last

aud1=FFAudioSource("H:\economist-03-12\video\A011C001_1803129K.MXF", track=1)
aud2=FFAudioSource("H:\economist-03-12\video\A011C001_1803129K.MXF", track=2)
aud3=FFAudioSource("H:\economist-03-12\video\A011C001_1803129K.MXF", track=3)

audR=MixAudio(aud2, aud3, 0.75, 0.075)

aud=mergechannels(aud1,audR)
audiodub(vid,aud)
bat:
Code:
for /r %%f in (\video\*) do (
set zname=h:\video\%%~nxf
:: timeout 1
goto ffcommand
)

:ffcommand
"C:\Program Files (x86)\FFmpeg\ffmpeg.exe" -threads 1 -i "H:\03-12\callsavariable.AVS" -vf lut3d="SLog3SGamut3CineToLC-709.cube" -c:v libx265 -preset fast -b:v 1600k -c:a aac -b:a 128k -metadata:s:a:0 lang=en
pause
goto end

:end
set
pause
error message running the .bat:
Trailing options were found on the commandline.
[avisynth @ 00168460] FFVideoSource: Can't open 'h:\video\A011C001_1803129K.MXF'

(H:\03-12\callsavariable.AVS, line 11)
H:\03-12\callsavariable.AVS: Unknown error occurred

e.g. even though the .AVS can read the variable if run on its own, when used in a batch it doesn't.

"Trailing options were found on the commandline." i assume is caused by the fact that target file is not defined for ffmpeg.

all hail to GetSystemEnv author @stickboy, by the way.
zdoe is offline   Reply With Quote