Author Topic: avisynth port corrections  (Read 2648 times)

hinterwaeldler

  • Newbie
  • *
  • Posts: 31
avisynth port corrections
« on: January 10, 2015, 12:12:42 AM »
Hi

After using avidemux 2.6 and avisynth a bit more again, i've noticed that parts of my original implementation do not work as expected.
The following two patches will correct the behaviour (always ask acts as no-op before and only the first digit of the avisynth port was read)

AQUAR

  • Hero Member
  • *****
  • Posts: 955
Re: avisynth port corrections
« Reply #1 on: January 10, 2015, 10:00:14 AM »
Maybe slightly off topic.

I've always been curious as to how you set the Port that Avisynth serves the frames too.
As I've never been able to use anything else than setting avidemux to listen to the default port of 9999 when using avsproxyGUI.

Maybe the OP could shed some light on how to pair ADM and Avisynth to a port of choice.
« Last Edit: January 11, 2015, 02:22:03 AM by AQUAR »

hinterwaeldler

  • Newbie
  • *
  • Posts: 31
Re: avisynth port corrections
« Reply #2 on: January 12, 2015, 09:21:32 PM »
Hi,

as far as I know, nobody has appended the possibility within the avsproxy GUI yet. The easy way is to use the command line tool and specify the port via --port
Code: [Select]
PATH/TO/avisproxy.exe --port 1234 PATH/TO/AVS_SCRIPT.avsor as short bash script which first calls the editor of your choice (replace vim accordingly), and run avisynth after exit (should work within cygwin/...; but only tested under linux) if you replace AVSPROXY_PATH accordingly and pre append wine if run from linux
Code: [Select]
#!/bin/bash
AVSPROXY_PATH="/path/to/avsproxy/avsproxy.exe"
DEFAULT_PORT=9999
if [ $# -eq 3 ];then
parA=$(echo $1 | tr A-Z a-z)
if [ "$parA" = "--port" ]; then
shift
if [ ! -z "$1" -a "$1" -eq "$1" 1> /dev/null ];then
if [ $1 -lt 0 ];then
echo "Port Is not allowed t obe less then zero!"
exit 2
fi
port=$1
else
echo "$1 is not a number"
exit 2
fi
else
echo "Unkown parameter"
exit 2
fi
shift
else
port=$DEFAULT_PORT
fi

if [ $# -eq 1 ]; then
        vim $1
$AVSPROXY_PATH --port $port $1
else
printf "\t$0\t[--port PORT_NUMBER]\tFILE\n"
exit 2
fi

As i currently don't have access to windows at all, i am not able to append the necessary parts accordingly. And a short find/grep did not result in avsproxy gui code to try a blind shot or at least append the command line parameter, if not present yet

Hope this helps
« Last Edit: January 12, 2015, 09:26:33 PM by hinterwaeldler »

AQUAR

  • Hero Member
  • *****
  • Posts: 955
Re: avisynth port corrections
« Reply #3 on: January 13, 2015, 09:18:16 AM »
Thanks for the info and script.

I usually just use the GUI version from Mulder as its convenient for basic avisynth use.
I wasn't aware of the port setting on the command line of avsproxy but that now seems obvious.

The bash script is an interesting approach,  maybe can be ported to batch (predominantly a Windows user!).

hinterwaeldler

  • Newbie
  • *
  • Posts: 31
Re: avisynth port corrections
« Reply #4 on: January 15, 2015, 12:18:23 AM »
Hope i've collected all information correctly in [ur=http://avidemux.org/smuf/index.php?topic=16330.msg71652#msg71652]here[/url] so they have a better place