Avs2pipemod

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (Changelog)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Filter3
 
{{Filter3
 
| {{Author/Chikuzen}}
 
| {{Author/Chikuzen}}
| 0.4.2m
+
| 1.3.0
| [http://www.mediafire.com/download/alg424t3kx7ak5d/avs2pipemod-0.4.2m.7z avs2pipemod-0.4.2m.7z]
+
| [https://github.com/chikuzen/avs2pipemod/releases/download/1.3.0/avs2pipemod-1.3.0.zip]
 
| Utilities
 
| Utilities
| [http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
+
| [http://www.gnu.org/licenses/gpl-3.0.txt GPLv3]
 
|6=[http://forum.doom9.org/showthread.php?p=1611905#post1611905 Doom9 Thread]}}
 
|6=[http://forum.doom9.org/showthread.php?p=1611905#post1611905 Doom9 Thread]}}
 
<br>
 
<br>
 
== Description ==
 
== Description ==
:avs2pipemod is a continued development of [[avs2pipe]]. Thanks to Chris Beswick for releasing avs2pipe under GPL.
+
Given an AviSynth script as input, '''avs2pipemod''' can send video, audio, or information of various types to [http://en.wikipedia.org/wiki/Standard_streams stdout] for consumption by command-line encoders or other tools. It is a continued development of [http://forum.doom9.org/showthread.php?t=160383 avs2pipe]. Thanks to Chris Beswick for releasing avs2pipe under [http://www.gnu.org/licenses/gpl-3.0.html GPL 3.0].
 
<br>
 
<br>
:'''Differences compared to the original''':
+
<br>
::* Display total elapsed time.
+
===Differences compared to the original:===
::* contents of 'info'
+
* Display total elapsed time.
::* New option 'benchmark'.
+
* contents of 'info'
::* New option 'trim'.
+
* New option 'benchmark'.
::* New option 'x264raw'
+
* New option 'trim'.
::* New option 'dumptxt'
+
* New option 'x264raw'
::* 'y4mp', 'y4mt', 'y4mb' and 'rawvideo' options instead of 'video'.
+
* New option 'dumptxt'
::* FieldBased input will be corrected to framebased on yuv4mpeg2 output modes.
+
* 'y4mp', 'y4mt', 'y4mb' and 'rawvideo' options instead of 'video'.
::* Colorspace conversion that takes colormatrix and interlace into consideration.
+
* FieldBased input will be corrected to framebased on yuv4mpeg2 output modes.
::* 'wav', 'extwav' and 'rawaudio' option instead of 'audio'.
+
* Colorspace conversion that takes colormatrix and interlace into consideration.
::* Convert bit depth function in audio output mode.
+
* 'wav', 'extwav' and 'rawaudio' option instead of 'audio'.
::* Only the compilation with mingw/msys is supported.
+
* Convert bit depth function in audio output mode.
 +
* Only the compilation with mingw/msys is supported.
 
<br>
 
<br>
  
 
== Requirements ==
 
== Requirements ==
:- AviSynth 2.5.8 or [http://forum.doom9.org/showthread.php?t=168764 AviSynth 2.6.0 Alpha5]
+
* [http://sourceforge.net/projects/avisynth2/ AviSynth 2.6.0] or greater
:- Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]
+
* Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]
:: <span style="color:red">**</span> If you're using AviSynth 2.5.8, [[YV12]] will be the only colorspace supported.
+
 
<br>
 
<br>
 +
 
== Usage ==
 
== Usage ==
avs2pipemod  ver 0.4.2m
+
<pre>avs2pipemod  ver 1.3.0
built on Jan 20 2013 15:04:37<br>
+
built on Dec 19 2025 08:15:34
Usage: avs2pipemod [option] input.avs
+
 
  e.g. avs2pipemod -wav=24bit input.avs > output.wav
+
Usage: avs2pipemod [option] input.avs
        avs2pipemod -y4mt=10:11 input.avs | x264 - --demuxer y4m -o tff.mkv
+
  e.g. avs2pipemod -wav=24bit input.avs > output.wav
        avs2pipemod -rawvideo -trim=1000,0 input.avs > output.yuv<br>
+
      avs2pipemod -y4mt=10:11 input.avs | x264 - --demuxer y4m -o tff.mkv
   {{Template:FuncDef|-wav}}[=8bit|16bit|24bit|32bit|float  default unset]
+
      avs2pipemod -rawvideo -trim=1000,0 input.avs > output.yuv
 +
 
 +
   -wav[=8bit|16bit|24bit|32bit|float  default unset]
 
         output wav format audio(WAVEFORMATEX) to stdout.
 
         output wav format audio(WAVEFORMATEX) to stdout.
 
         if optional arg is set, audio sample type of input will be converted
 
         if optional arg is set, audio sample type of input will be converted
         to specified value.<br>
+
         to specified value.
   {{Template:FuncDef|-extwav}}[=8bit|16bit|24bit|32bit|float  default unset]
+
 
 +
   -extwav[=8bit|16bit|24bit|32bit|float  default unset]
 
         output wav extensible format audio(WAVEFORMATEXTENSIBLE) containing
 
         output wav extensible format audio(WAVEFORMATEXTENSIBLE) containing
 
         channel-mask to stdout.
 
         channel-mask to stdout.
 
         if optional arg is set, audio sample type of input will be converted
 
         if optional arg is set, audio sample type of input will be converted
         to specified value.<br>
+
         to specified value.
   {{Template:FuncDef|-rawaudio}}[=8bit|16bit|24bit|32bit|float  default unset]
+
 
 +
   -rawaudio[=8bit|16bit|24bit|32bit|float  default unset]
 
         output raw pcm audio(without any header) to stdout.
 
         output raw pcm audio(without any header) to stdout.
 
         if optional arg is set, audio sample type of input will be converted
 
         if optional arg is set, audio sample type of input will be converted
         to specified value.<br>
+
         to specified value.
   {{Template:FuncDef|-y4mp}}[=sar  default 0:0]
+
 
 +
   -y4mp[=sar  default 0:0]
 
         output yuv4mpeg2 format video to stdout as progressive.
 
         output yuv4mpeg2 format video to stdout as progressive.
   {{Template:FuncDef|-y4mt}}[=sar  default 0:0]
+
   -y4mt[=sar  default 0:0]
 
         output yuv4mpeg2 format video to stdout as tff interlaced.
 
         output yuv4mpeg2 format video to stdout as tff interlaced.
   {{Template:FuncDef|-y4mb}}[=sar  default 0:0]
+
   -y4mb[=sar  default 0:0]
         output yuv4mpeg2 format video to stdout as bff interlaced.<br>
+
         output yuv4mpeg2 format video to stdout as bff interlaced.
   {{Template:FuncDef|-rawvideo}}[=vflip default unset]
+
 
         output rawvideo(without any header) to stdout.<br>
+
   -rawvideo[=vflip default unset]
  {{Template:FuncDef|-x264bdp}}[=4:3  default unset(16:9)]
+
         output rawvideo(without any header) to stdout.
        suggest x264(r1939 or later) arguments for bluray disc encoding
+
 
        in case of progressive source.
+
   -info - output information about aviscript clip.
        set optarg if DAR4:3 is required(ntsc/pal sd source).
+
 
   {{Template:FuncDef|-x264bdt}}[=4:3 default unset(16:9)]
+
   -filters - output external plugin filters/functions list to stdout.
        suggest x264(r1939 or later) arguments for bluray disc encoding
+
 
        in case of tff interlaced source.
+
   -benchmark - do benchmark avs script, and output results to stdout.
        set optional arg if DAR4:3 is required(ntsc/pal sd source).<br>
+
 
  {{Template:FuncDef|-x264raw}}[=input-depth(8 to 16) default 8]
+
   -dumptxt - dump pixel values as tab separated text to stdout.
        suggest x264 arguments in case of -rawvideo output.
+
 
        set optional arg when using interleaved output of dither hack.
+
  -dumpprops - dump frame properties as JSON string to stdout.
   {{Template:FuncDef|-x264rawtc}}[=input-depth(8 to 16) default 8]
+
 
        suggest x264 arguments in case of -rawvideo output with --tcfile-in.
+
   -trim[=first_frame,last_frame  default 0,0]
        set optional arg when using interleaved output of dither hack.<br>
+
   {{Template:FuncDef|-info}} - output information about aviscript clip.<br>
+
  {{Template:FuncDef|-benchmark}} - do benchmark aviscript, and output results to stdout.<br>
+
   {{Template:FuncDef|-dumptxt}} - dump pixel values as tab separated text to stdout.<br>
+
   {{Template:FuncDef|-trim}}[=first_frame,last_frame  default 0,0]
+
 
         add Trim(first_frame,last_frame) to input script.
 
         add Trim(first_frame,last_frame) to input script.
         in info, this option is ignored.<br>
+
         in info, this option is ignored.
  note1 : in yuv4mpeg2 output mode, RGB input that has 720pix height or more
+
 
        will be converted to YUV with Rec.709 coefficients instead of Rec.601.
+
  -dll[=path to avisynth.dll default "avisynth"]
        and, if your avisynth version is 2.5.x, YUY2 input will be converted
+
        specify which avisynth.dll is used.
        to YV12.<br>
+
 
note2 : '-x264bd(p/t)' supports only for primary stream encoding.<br>
+
note1 : in yuv4mpeg2 output mode, RGB input that has 720pix height or more
note3 : in fact, it is a spec violation to use WAVEFORMATEX(-wav option)
+
        will be converted to YUV with Rec.709 coefficients instead of Rec.601.
        except 8bit/16bit PCM.
+
 
        however, there are some applications that accept such invalid files
+
note2 : in fact, it is a spec violation to use WAVEFORMATEX(-wav option)
        instead of supporting WAVEFORMATEXTENSIBLE.<br>
+
        except 8bit/16bit PCM.
note4 : '-extwav' supports only general speaker positions.<br>
+
        however, there are some applications that accept such invalid files
 +
        instead of supporting WAVEFORMATEXTENSIBLE.
 +
 
 +
note3 : speaker positions in files output by '-extwav' are set using
 +
        the clip property from avs+.
 +
        if it is not set, general speaker positions are used instead.
 +
 
 
  Chan. MS channels                Description
 
  Chan. MS channels                Description
 
  ----- -------------------------  ----------------
 
  ----- -------------------------  ----------------
Line 97: Line 104:
 
   6    FL FR FC LF BL BR          Standard Surround
 
   6    FL FR FC LF BL BR          Standard Surround
 
   7    FL FR FC LF BL BR BC      With back center
 
   7    FL FR FC LF BL BR BC      With back center
   8    FL FR FC LF BL BR FLC FRC  With front center left/right<br>
+
   8    FL FR FC LF BL BR FLC FRC  With front center left/right
note5 : in '-x264raw(tc)' with dither hack, output format needs to be
+
 
        interleaved(not stacked).
+
 
 +
 
 
<br>
 
<br>
 
== Examples ==
 
== Examples ==
 
'''TO DO'''
 
'''TO DO'''
 +
 +
* Dump pixel values[http://forum.doom9.org/showthread.php?t=164146].
 +
#colorbars.avs
 +
ColorBars(320, 240, "YV12").Trim(0, -1)
 +
 +
$ avs2pipemod -dumpyuv colorbars.avs > dump.txt
 
<br>
 
<br>
 
<br>
 
<br>
 +
 
== Changelog ==
 
== Changelog ==
 
  Version      Date            Changes<br>
 
  Version      Date            Changes<br>
 +
1.3.0        12/19/2025      - Add new option '-dumpprops'.
 +
1.1.1        08/13/2016      - support [[Avisynthplus_color_formats|AviSynth+ new pixel types]]
 +
                              - also add new option 'filters'<br>
 +
1.0.3        07/23/2016      - fix possibility of memory leaks
 +
                              - also add version resource<br>
 +
1.0.0        07/10/2016      - change avisynth_c.h to Avisynth+MT's avisynth.h.
 +
                              - change C99 to C++11.
 +
                              - change mingw-w64 to VisualC++2015.
 +
                              - drop Avisynth 2.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.<br>
 
  0.4.2m        01/20/2013      - Add progress indicator for audio output(experimental)<br>  
 
  0.4.2m        01/20/2013      - Add progress indicator for audio output(experimental)<br>  
 
  0.4.1        03/14/2012      - Fix wrong error handling in '-x264raw(tc)'.<br>
 
  0.4.1        03/14/2012      - Fix wrong error handling in '-x264raw(tc)'.<br>
Line 128: Line 156:
 
  20110507      05/07/2011      - initial release
 
  20110507      05/07/2011      - initial release
 
<br>
 
<br>
 +
 +
== Archived Downloads ==
 +
{| class="wikitable" border="1"; width="500px"
 +
|-
 +
!!width="100px"| Version
 +
!!width="200px"| Download
 +
!!width="200px"| Mirror
 +
|-
 +
!v1.0.0
 +
|[http://github.com/chikuzen/avs2pipemod/releases/download/1.0.0/avs2pipemod-1.0.0.zip avs2pipemod-1.0.0.zip]
 +
|N/A
 +
|-
 +
!v0.4.2m
 +
|[http://www.mediafire.com/download/alg424t3kx7ak5d/avs2pipemod-0.4.2m.7z avs2pipemod-0.4.2m.7z]
 +
|N/A
 +
|}
 +
<br>
 +
  
 
== External Links ==
 
== External Links ==
 
*[http://github.com/chikuzen/avs2pipemod GitHub] - Source code repository.
 
*[http://github.com/chikuzen/avs2pipemod GitHub] - Source code repository.
 
*[http://forum.doom9.org/showthread.php?p=1611905#post1611905 Doom9 Forum] - avs2pipemod discussion.
 
*[http://forum.doom9.org/showthread.php?p=1611905#post1611905 Doom9 Forum] - avs2pipemod discussion.
<br>
 
 
<br>
 
<br>
 
<br>
 
<br>
 
-----------------------------------------------
 
-----------------------------------------------
 
'''Back to [[Utilities]] &larr;'''
 
'''Back to [[Utilities]] &larr;'''
 +
[[Category:Utilities]]
 +
[[Category:Piping]]

Latest revision as of 00:42, 19 December 2025

Abstract
Author Chikuzen
Version 1.3.0
Download [1]
Category Utilities
License GPLv3
Discussion Doom9 Thread


Contents

[edit] Description

Given an AviSynth script as input, avs2pipemod can send video, audio, or information of various types to stdout for consumption by command-line encoders or other tools. It is a continued development of avs2pipe. Thanks to Chris Beswick for releasing avs2pipe under GPL 3.0.

[edit] Differences compared to the original:

  • Display total elapsed time.
  • contents of 'info'
  • New option 'benchmark'.
  • New option 'trim'.
  • New option 'x264raw'
  • New option 'dumptxt'
  • 'y4mp', 'y4mt', 'y4mb' and 'rawvideo' options instead of 'video'.
  • FieldBased input will be corrected to framebased on yuv4mpeg2 output modes.
  • Colorspace conversion that takes colormatrix and interlace into consideration.
  • 'wav', 'extwav' and 'rawaudio' option instead of 'audio'.
  • Convert bit depth function in audio output mode.
  • Only the compilation with mingw/msys is supported.


[edit] Requirements


[edit] Usage

avs2pipemod  ver 1.3.0
built on Dec 19 2025 08:15:34

Usage: avs2pipemod [option] input.avs
  e.g. avs2pipemod -wav=24bit input.avs > output.wav
       avs2pipemod -y4mt=10:11 input.avs | x264 - --demuxer y4m -o tff.mkv
       avs2pipemod -rawvideo -trim=1000,0 input.avs > output.yuv

   -wav[=8bit|16bit|24bit|32bit|float  default unset]
        output wav format audio(WAVEFORMATEX) to stdout.
        if optional arg is set, audio sample type of input will be converted
        to specified value.

   -extwav[=8bit|16bit|24bit|32bit|float  default unset]
        output wav extensible format audio(WAVEFORMATEXTENSIBLE) containing
        channel-mask to stdout.
        if optional arg is set, audio sample type of input will be converted
        to specified value.

   -rawaudio[=8bit|16bit|24bit|32bit|float  default unset]
        output raw pcm audio(without any header) to stdout.
        if optional arg is set, audio sample type of input will be converted
        to specified value.

   -y4mp[=sar  default 0:0]
        output yuv4mpeg2 format video to stdout as progressive.
   -y4mt[=sar  default 0:0]
        output yuv4mpeg2 format video to stdout as tff interlaced.
   -y4mb[=sar  default 0:0]
        output yuv4mpeg2 format video to stdout as bff interlaced.

   -rawvideo[=vflip default unset]
        output rawvideo(without any header) to stdout.

   -info  - output information about aviscript clip.

   -filters - output external plugin filters/functions list to stdout.

   -benchmark - do benchmark avs script, and output results to stdout.

   -dumptxt - dump pixel values as tab separated text to stdout.

   -dumpprops - dump frame properties as JSON string to stdout.

   -trim[=first_frame,last_frame  default 0,0]
        add Trim(first_frame,last_frame) to input script.
        in info, this option is ignored.

   -dll[=path to avisynth.dll  default "avisynth"]
        specify which avisynth.dll is used.

note1 : in yuv4mpeg2 output mode, RGB input that has 720pix height or more
        will be converted to YUV with Rec.709 coefficients instead of Rec.601.

note2 : in fact, it is a spec violation to use WAVEFORMATEX(-wav option)
        except 8bit/16bit PCM.
        however, there are some applications that accept such invalid files
        instead of supporting WAVEFORMATEXTENSIBLE.

note3 : speaker positions in files output by '-extwav' are set using
        the clip property from avs+.
        if it is not set, general speaker positions are used instead.

 Chan. MS channels                Description
 ----- -------------------------  ----------------
  1    FC                         Mono
  2    FL FR                      Stereo
  3    FL FR BC                   First Surround
  4    FL FR BL BR                Quadro
  5    FL FR FC BL BR             like Dpl II (without LFE)
  6    FL FR FC LF BL BR          Standard Surround
  7    FL FR FC LF BL BR BC       With back center
  8    FL FR FC LF BL BR FLC FRC  With front center left/right



<br>
== Examples ==
'''TO DO'''

* Dump pixel values[http://forum.doom9.org/showthread.php?t=164146].
 #colorbars.avs
 ColorBars(320, 240, "YV12").Trim(0, -1)

 $ avs2pipemod -dumpyuv colorbars.avs > dump.txt
<br>
<br>

== Changelog ==
 Version       Date            Changes<br>
 1.3.0         12/19/2025      - Add new option '-dumpprops'.
 1.1.1         08/13/2016      - support [[Avisynthplus_color_formats|AviSynth+ new pixel types]]
                               - also add new option 'filters'<br>
 1.0.3         07/23/2016      - fix possibility of memory leaks
                               - also add version resource<br>
 1.0.0         07/10/2016      - change avisynth_c.h to Avisynth+MT's avisynth.h.
                               - change C99 to C++11.
                               - change mingw-w64 to VisualC++2015.
                               - drop Avisynth 2.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.<br>
 0.4.2m        01/20/2013      - Add progress indicator for audio output(experimental)<br> 
 0.4.1         03/14/2012      - Fix wrong error handling in '-x264raw(tc)'.<br>
 0.4.0         03/04/2012      - Change '-dumpyuv' to '-dumptxt', and support all colorspaces.<br>
 0.3.0         02/17/2012      - Add new option '-dumpyuv'<br>
 0.2.1         01/30/2012      - Add new options '-x264raw', '-x264rawtc'.<br>
 0.1.2         01/28/2012      - Fix crash when importing invalid avs.<br>
 0.1.1         01/05/2012      - Rewrite code.
                               - avs2pipemod detects avisynth version, and changes the actions. 
                                 (thus, avs2pipe26mod was removed.)
                               - avisynth.lib is unnecessary any longer.
                               - win64 builds can also be compiled now.<br> 
 20111130      11/30/200       - Port video output processing from latest avs2pipe.<br>
 20110919      09/19/2011      - Add new option 'trim'.<br>
 20110703-2    07/03/2011      - Changed -audio to -extwav.<br>
 20110703      07/03/2011      - Add new options '-wav' and '-extwav', and remove '-audio'.
                               - '-wav' outputs audio with normal riff-wave header.
                               - '-extwav' outputs audio with wave extensible header containing channel-mask.<br>
 20110510      05/10/2011      - Fix incorrect output of 'x264bd', and some modified.
                               - Correct a bug in '-audio' and '-rawaudio'.<br>
 20110507      05/07/2011      - initial release
<br>

== Archived Downloads ==
{| class="wikitable" border="1"; width="500px"
|-
!!width="100px"| Version
!!width="200px"| Download
!!width="200px"| Mirror
|-
!v1.0.0
|[http://github.com/chikuzen/avs2pipemod/releases/download/1.0.0/avs2pipemod-1.0.0.zip avs2pipemod-1.0.0.zip]
|N/A
|-
!v0.4.2m
|[http://www.mediafire.com/download/alg424t3kx7ak5d/avs2pipemod-0.4.2m.7z avs2pipemod-0.4.2m.7z]
|N/A
|}
<br>


== External Links ==
*[http://github.com/chikuzen/avs2pipemod GitHub] - Source code repository.
*[http://forum.doom9.org/showthread.php?p=1611905#post1611905 Doom9 Forum] - avs2pipemod discussion.
<br>
<br>
-----------------------------------------------
'''Back to [[Utilities]] ←'''
[[Category:Utilities]]
[[Category:Piping]]
Personal tools