Log in

View Full Version : How to get avisynth working through pipes


multimediaman
13th March 2009, 12:46
I am long time mencoder user. But this time there is no filter aviable for my needs.

Avisynth works after following procedure
mplayer file -ao -null -speed 4 -vo yuv4mpeg:file=a.y4m
mencoder -nosound a.y4m -ovc copy -o a.avi
wine avs2yuv.exe test -o - | mencoder - -cache 500 -profile x264medium -o file.264
Problem is quite obvious: huge files.

When I create pipes a.y4m and a.avi avisynth is not able to process it.

I have tried to search but didn't find solution.

However I tried FFVH codec via mencoder but avisynth is not able open it. ffdshow won't install. I am nowadays pretty lost when it comes to windows stuff...

Or are pipes out of question when it comes to avisynth?
:stupid:

nm
13th March 2009, 15:17
What kind of sources do you encode? DGMPGDec and DGAVCDec should work with Wine.

multimediaman
16th March 2009, 09:30
Thanks!

fahr
18th March 2009, 16:26
Or are pipes out of question when it comes to avisynth?


In avidemux2 (instead mencoder) for linux you must be able to use avsproxy (http://avidemux.org/admWiki/index.php?title=Avsproxy), or avsfilter (http://avsfilter.berlios.de) for use avisynth scripts under wine without create/write/read huge files.

multimediaman
20th March 2009, 14:48
Thanks for the tip. I am going to check that later.
I am pretty much mencoder fan, though :cool:

I just made a little script to automate that makes life little bit easier for me.
It works for mpg files and uses DGIndex and DGDecode.

#!/bin/bash

#Public Domain

#Plugin path
ppath="$HOME/.wine/drive_c/Program Files/AviSynth 2.5/plugins"
#Plugin path for wine
wppath="C:\Program Files\AviSynth 2.5\plugins"

if [ $# -eq 0 ] ; then
echo "Creates index file and simple modifiable avisynth script"
echo "Usage: mpgindex file yadif=[0-3]"
echo "yadif deinterlacer is optional"
exit 0
fi

cd $(dirname "$1")
in="$(basename "$1")"

if ! [ -f "$in" ] ;then
echo "No such file"
exit 1
fi

out=""$in".d2v"
a=0
while [ -f "$out" ] || [ -f "${out%.d2v}".avs ] ; do
a=$(expr $a + 1 )
out=""$in"-"$a".d2v"
done
out="${out%.d2v}"

echo DGindex -AIF=["$in"] -OF=["$out"] -OM=0 -minimize -exit
wine "$ppath"/DGIndex.exe -AIF=["$in"] -OF=["$out"] -OM=0 -minimize -exit

echo -e 'LoadPlugin("'"$wppath\DGDecode.dll"'")
MPEG2Source("'"$out.d2v"'")'\
>> "$out".avs

if [ $(echo "$2"| cut -d = -f 1) = "yadif" ] ; then
mode=$(echo "$2"| cut -d = -f 2)
if [ $mode -lt 4 ] && [ $mode -gt -1 ] ; then
echo -e 'LoadCPlugin("'"$wppath\yadif.dll"'")
yadif(mode='"$mode"')'\
>> "$out".avs
else
echo "no such mode for yadif: $mode"
fi
fi
echo script: "$out".avs
echo index: "$out".d2v

exit 0