View Full Version : avs2pipe
SamKook
6th January 2012, 18:40
I guess I'll forget about it then. It wasn't very important to begin with anyway since I haven't had any crash yet encoding to Xvid straight from avisynth.
I figured that maybe it wouldn't be too hard since it can already do both separately so I might as well ask.
kemuri-_9
7th January 2012, 04:27
it is relatively impossible to pipe both streams uncompressed simultaneously, without utilizing a container, to a single stream without the other side knowing exactly what bytes belong to the audio and what bytes belong to the video.
these kinds of scenarios are why container formats exist to multiplex the different streams together into a single stream - the format adds the necessary overhead to indicate which bytes belongs to what stream.
and the amount of effort required here is way beyond what the value added would be.
Chikuzen
28th January 2012, 15:08
update
avs2pipemod-0.1.2.7z (http://www.mediafire.com/download.php?47ordinmatla8md)
* fix crash when importing invalid avs.
b66pak
28th January 2012, 15:44
thanks a lot...
_
Chikuzen
30th January 2012, 12:10
update
avs2pipemod-0.2.1.7z (http://www.mediafire.com/download.php?kbdle1du25hkzqj)
* add new options '-x264raw', '-x264rawtc'.
Chikuzen
17th February 2012, 18:14
update
avs2pipemod-0.3.0.7z (http://www.mediafire.com/download.php?ilpfc0m89c95apv)
*add new option '-dumpyuv'
Aktan
17th February 2012, 18:42
Thanks for the tool, doobry, and thanks for the modifications, Chikuzen. They work great!
Bob Wya
26th February 2012, 12:14
update
avs2pipemod-0.3.0.7z (http://www.mediafire.com/download.php?ilpfc0m89c95apv)
*add new option '-dumpyuv'
Uhmmm not being one to complain - about the great works you are doing - but I believe the GPL v3.0 requires you to distribute the modified source code for this filter as well as the binaries!
Quoting from the license you included with the binaries (only)...
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
I only make this pedantic point as I am developing my own Avisynth filter (and I'm poking about in the source code for other filters!) :cool:
Also this filter looks like it would be useful to play about with in Wine (on ARCH-Linux)...
Thanks
Bob
the_weirdo
26th February 2012, 12:22
@Bob Wya:
From README.txt:
source code : https://github.com/chikuzen/avs2pipemod
Bob Wya
26th February 2012, 15:16
@Bob Wya:
From README.txt:
source code : https://github.com/chikuzen/avs2pipemod
Ahh yes RTFM :readguid:
Apologies to Chikuzen. :D
If I can get it working with ARCH I'll update the WineHQ AppDB page for dependent Windows apps - to use this filter - for a bit of extra publicity! MeGui, for example, is very out of date!! (http://appdb.winehq.org/objectManager.php?sClass=version&iId=16968)
Thanks for helping out an idiot :rolleyes:
Bob
Chikuzen
4th March 2012, 12:36
update
avs2pipemod-0.4.0.7z (http://www.mediafire.com/download.php?c6dbv3f2q4pq1w5)
https://github.com/chikuzen/avs2pipemod
* change '-dumpyuv' to '-dumptxt', and support all colorspace.
Chikuzen
14th March 2012, 14:56
update
avs2pipemod-0.4.1.7z (http://www.mediafire.com/download.php?33fpx9bibdk8y4j)
https://github.com/chikuzen/avs2pipemod/
* fix wrong error handling in '-x264raw(tc)'
b66pak
14th March 2012, 20:00
thanks a lot...
_
active1
17th March 2012, 18:47
hi
can i compile it on linux ??
Chikuzen
18th March 2012, 08:07
hi
can i compile it on linux ??
avs2pipe/avs2pipemod is a Windows application.
you can compile it with mingw/mingw-w64.
and, I sometimes cross-compile avs2pipemod on Ubuntu.
Atak_Snajpera
18th January 2013, 23:41
chikuzen could you add progress indicator similar to bepipes?
sl1pkn07
19th January 2013, 03:54
with flag to occult any info (or log to archive). like avs2yuv
Chikuzen
19th January 2013, 08:42
Although I had received the request about adding progress indicator from Japanese users several times, they all refused.
The reason is that speed falls by adding it, and it can substitute mostly if the 'frames' option is added to the encoder side.
However, each of these is only the cases of video and is not once requested about case of audio until now.
'similar to bepipes' ... is this case of audio ?
Atak_Snajpera
19th January 2013, 12:08
yes i'm looking for something what could replace bepipe for audio only encoding. so far only old bepipe can show progress during processing audio but it requires .net.
Chikuzen
20th January 2013, 07:25
avs2pipemod-0.4.2m.7z (http://www.mediafire.com/download.php?alg424t3kx7ak5d)
* add progress indicator for audio output(experimental)
@Atak_Snajpera
Since progress indicators competes when this uses together with some encoders(e.g. QAAC), I'm not going to commit this modified into my repository.
But, I think that it becomes instead of bepipes.
Atak_Snajpera
20th January 2013, 12:29
you can always add optional --show-audio-progress switch.
besides most of audio encoders have --quiet switch (opusenc,fhg aac,aften ac3, vorbis,flac)
btw thanks for quick response. i wil test it as soon as i can.
SamKook
10th October 2013, 00:18
I'm having a little problem when converting wav that would be over 4GB.
I'm piping audio from an avs script to neroaacencoder, but if I leave the default -wav setting and the audio is too long, it will say the following thing:
avs2pipemod[info]: writing 14504.948 seconds of 44100 Hz, 2 channel audio.
avs2pipemod[warning]: audio size over 32bit limit (4GB), clients may truncate audio.
ERROR: could not parse WAV file
avs2pipemod[info]: finished, wrote 0.011 seconds [0%].
avs2pipemod[info]: total elapsed time is 0.000 sec.
avs2pipemod[error]: only wrote 506 of 639668224 samples.
I know I can fix it by lowering the bitrate, but I'd like to keep the default setting when that's not necessary in my batch files.
Now my problem is that even if avs2pipemod gives an error message, the return value is still 0 meaning there was no errors for DOS so I can't check the %ERRORLEVEL% variable for errors and try again with a lower bitrate. Is there any chance that this could be fixed?
Unless it's me who does something wrong when I test it with the following:
"C:\Program Files (x86)\avs2pipemod-0.4.1\avs2pipemod.exe" -wav test.avs | "C:\Program Files (x86)\NeroAACCodec-1.5.1\neroAacEnc.exe" -q 0.42 -if - -of test.aac & ECHO %ERRORLEVEL%
tebasuna51
10th October 2013, 08:47
To allow than NeroAacEnc.exe accept wav files greater than 4 GB you need add the parameter -ignorelength:
...neroAacEnc.exe" -ignorelength -q 0.42 -if - -of test.aac ...
Edit:
BTW the correct extension for output is test.m4a
NeroAacEnc can only output audio AAC in mp4 container.
SamKook
10th October 2013, 13:18
Thanks, that make things a lot simpler. I'm not sure how I haven't tried it before since it seem so obvious now that I re-read the help for it.
A different errorlevel in case of errors would still be nice, but much less important now.
Thanks for letting me know about the extension. It doesn't change much since it get muxed right after, but it's always better to do things right.
_argos
31st December 2013, 00:04
@Chikuzen (or doobry?, i am confused)
First, let me thank you for your great effort. Nice tool.
I encountered a strange behaviour while trying to capture output of "avs2pipemod.exe -info somescript.avs" in Python. When the script had audio (via DirectShowSource( ... audio=true)) the output could be captured, but without audio (via DirectShowSource( ... audio=false)) thge cpatured output was always empty. Using the command from commandline showed output everytime. So my question ist:
Do you do something to stdout when audio is absent or use different output for info?
Update: Well I looked into the source code. And I don't get it. There is nothing done differently, just an additional if-block for audio, put to sdtout the same way as video. Okay, my new crazy theory: The program exits to fast for Python to capture the output somehow if audio is not present, which then would be a problem of Python not your program. This is weird.
Greetings
Malte
PS I do use -info to probe with different scripts to find out which scripts can be used to render a file.
feos
21st April 2014, 18:46
I'm using avs2pipemod to put the video info to file:
avs2pipemod -info encode.avs > info.txt
and right after creating the info file, it freezes. I also did it from the command line without output to file, and it prints the file info in the cmd and then freezes.
Extracting the audio works well. Using the latest version from the above.
Groucho2004
21st April 2014, 18:52
I'm using avs2pipemod to put the video info to file:
avs2pipemod -info encode.avs > info.txt
and right after creating the info file, it freezes. I also did it from the command line without output to file, and it prints the file info in the cmd and then freezes.
Extracting the audio works well. Using the latest version from the above.
Post your script and/or try using avsmeter (https://forum.doom9.org/showthread.php?t=165528) (with "-i" switch).
feos
21st April 2014, 20:40
Post your script and/or try using avsmeter (https://forum.doom9.org/showthread.php?t=165528) (with "-i" switch).
A note before I do so:
The script alone loads very well into virtualdub, and audio/video processing works from the normal x264 command line. Also, what's notable is that the same batch and the same avs worked together very well for years. Then it stopped working. I installed another OS and it works on neither.
EDIT:
F:\Encode\TASEncodingPackage>AVSMeter encode.avs -i
AVSMeter 1.7.7 (AVS 2.6, x86) by Groucho2004
AviSynth 2.60, build:Sep 18 2013 [17:36:36]
Number of frames: 235326
Length (hhh:mm:ss.ms): 001:05:22.100
Frame width: 320
Frame height: 224
Framerate: 60.000 (60/1)
Interlaced: No
Colorspace: YV12
Then it also froze :/
Here's the script: http://pastebin.com/CNAzMuxj
Groucho2004
21st April 2014, 21:48
Also, what's notable is that the same batch and the same avs worked together very well for years. Then it stopped working.
You have to figure out what change causes the script to freeze. Since you mentioned that the script worked for years, you at least changed the avisynth version. It might be a incompatibility between Avisynth and one of the plug-ins.
feos
21st April 2014, 22:27
Reverting to older Avisynth version (2010) doesn't help. But It seems the problem may be in using pass=1. The batch sets that before taking info. And when I set pass=1, the script won't load into virtualdub, telling "ExactDedup: failed to open dupinfo file". However the file is where the script reads it, and it looks ok. So the problem is with ExactDedup plugin. But I backupped the dll too, and it doesn't work, while it did (with whatever avisynth version).
Groucho2004
21st April 2014, 23:17
"ExactDedup: failed to open dupinfo file".
Try fully qualified paths for the (txt) files.
feos
22nd April 2014, 20:16
It got loaded into virtualdub at pass=1 now, but avs2pipemod still freezes at the same line.
EDIT: It appears even when I do pass=0 (no ExactDedup used), avs2pipemod still freezes after creating the info file...
EDIT: Using "info" instead of "-info" prints info into cmd window, but creates only the blank file. Which isn't what I need, because that file is read from, to set SAR according to clip parameters.
EDIT: Had to solve it by dropping the FreeSub plugin use. avs2pipemod+freesub+ffmpeg were hanging. Here's some gdb trace: http://pastebin.com/QbPWLqwG.
The issue got its workaround.
Chikuzen
10th July 2016, 06:40
new version released
avs2pipemod-1.0.0 (https://github.com/chikuzen/avs2pipemod/releases)
- change avisynth_c.h to Avisynth+MT's avisynth.h.
- change C99 to C++11.
- change mingw-w64 to VisualC++2015.
- drop Avisynth2.5x support.
- drop WindowsXP support.
- drop x264bd and x264raw options.
- add Avisynth+MT's new 16/32bit formats support.
- add FFmpeg's extended Y4M formats output support.
- add '-dll' option.
now, avs2pipemod requires VC++2015 runtime (because I decided to avoid avisynth_c.h).
Chikuzen
18th July 2016, 13:20
updated.
avs2pipemod-1.0.1 (https://github.com/chikuzen/avs2pipemod/releases)
- fix video output when avs has no audio (reported by stax76).
Chikuzen
22nd July 2016, 15:11
updated.
avs2pipemod-1.0.2 (https://github.com/chikuzen/avs2pipemod/releases)
- fix calculating video duration of -info.
- show avisynth's VersionString() on -info.
Chikuzen
26th July 2016, 02:50
updated.
avs2pipemod-1.0.3 (https://github.com/chikuzen/avs2pipemod/releases)
- fix memory leak possibility.
- add version resource.
ultim
28th July 2016, 22:35
updated.
avs2pipemod-1.0.3 (https://github.com/chikuzen/avs2pipemod/releases)
- fix memory leak possibility.
- add version resource.
Just being curious: Did you find the memory leak by chance, or were you made aware of it by Avs+'s new warning logs?
Chikuzen
29th July 2016, 03:58
Just being curious: Did you find the memory leak by chance, or were you made aware of it by Avs+'s new warning logs?
by Avs+'s warning.
yup
18th August 2016, 10:49
Hi all!
Please advice how use avs2pipe with x265.
I can write command for rawvideo:
avs2pipemod64 -rawvideo test.avs | x265_64 --input - --input-res 960x720 --fps 50.0 --output video.h265
How can write for y4m, script output progressive video.
yup.
Chikuzen
18th August 2016, 11:09
avs2pipemod64 -y4mp test.avs | x265_64 --input - --y4m --output video.h265
yup
18th August 2016, 11:20
Chikuzen!
:thanks:
yup.
leoenc
27th September 2016, 15:03
Is it possible to use both a pipe and a standard input?
I'm trying to pipe the video to ffmbc and specifying audio input for the ffmbc side:
avs2pipemod.exe -y4mp video_source.avs | ffmbc_64.exe -i - -y -i audio_source.avs -vcodec prores aspect 16:9 -threads 8 -profile hq -acodec pcm_s16le output.mov -acodec pcm_s16le -newaudio -map_audio_channel 1:1:0:0:1:0 -map_audio_channel 1:1:1:0:2:0
But it fails with the following message:
audio_source.avs: Invalid data found when processing input
leoenc
27th September 2016, 15:35
Ok, the error I got above is because I was trying to load 32-bit AVS into 64-bit ffmbc.
Is there a way to load multiple avs files?
E.g.:
avs2pipemod.exe -y4mp video.avs audio.avs | ffmbc_64.exe -i - -y -vcodec prores aspect 16:9 -threads 8 -profile hq -acodec pcm_s16le output.mov -acodec pcm_s16le -newaudio -map_audio_channel 1:1:0:0:1:0 -map_audio_channel 1:1:1:0:2:0
Aktan
28th September 2016, 18:20
Ok, the error I got above is because I was trying to load 32-bit AVS into 64-bit ffmbc.
Is there a way to load multiple avs files?
E.g.:
avs2pipemod.exe -y4mp video.avs audio.avs | ffmbc_64.exe -i - -y -vcodec prores aspect 16:9 -threads 8 -profile hq -acodec pcm_s16le output.mov -acodec pcm_s16le -newaudio -map_audio_channel 1:1:0:0:1:0 -map_audio_channel 1:1:1:0:2:0
Can't you just combine the video and audio in one AVS? The function is AudioDub().
leoenc
28th September 2016, 18:49
I'm afraid not as it's being used in some automation scripts which expect separate inputs for video and audio.
konstantin1
6th November 2016, 10:25
When I try to use this utility I get only an error message: "avs2pipemod[error]: failed to create avisynth script environment."
Till now I used the makeavis.exe utility from an ffmpeg version. But I often got zero division error in Wine.
In fact I can't install avisynth, because I use it on a headless virtual server. So I usually copy the avisynth.dll and devil.dll files to the actual directory, and make programs pick them up from there. This scenario worked with makeavis.exe and avs2yuv.exe too.
When I use the option -dll I get an error message again:
wine avs2pipemod -wav=24bit -dll=Z:\opt\lampp\htdocs\thumb9\hfaek\avisynth.dll p2.avs > 1.wav
avs2pipemod[error]: failed to load avisynth.dll
My avisynth.dll is from a 2.6 version install.
What can I do in this special case to make the utility work?
shae
5th August 2017, 17:23
Both avs2pipe 0.3 and avs2pipemod 1.1 get stuck at the end of encoding, using AviSynth+ and fdkaac.
Any idea why?
avs2pipe26_vs audio 1.avs | fdkaac.exe -m 5 -p 2 - -o 1.m4a
or
avs2pipemod -wav 1.avs | fdkaac.exe -m 5 -p 2 - -o 1.m4a
tebasuna51
6th August 2017, 11:56
Without problems here with avs2pipemod 1.1.1, Avs+ r2508, fdkaac 0.6.2 and W 7 SP1.
Please show your 1.avs
shae
6th August 2017, 22:34
I didn't think a script that works fine could be the cause, but you're right.
It gets stuck because of QTGMC.
tebasuna51
7th August 2017, 09:27
Any video management in the script is usseless (and time consuming) for audio conversion.
You must use a simplified script taking care only if video duration is changed in the script, for instance:
OpenAudioVideoSource("movie")
Trim(x,y) # or other functions than change duration
KillVideo() # the video is ignored after that
...Only audio functions...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.