Log in

View Full Version : avs2pipe


Pages : 1 2 3 [4]

shae
7th August 2017, 14:33
Sure it's doesn't matter to audio, but having separate scripts for audio and video is messier and more error-prone. The video processing parts don't seem to affect speed when only the audio is used. At least, I haven't seen any difference.

The mystery is why it gets stuck due to QTGMC.

poisondeathray
8th August 2017, 04:37
What about using ffmpeg instead ? You can compile with libfdkaac and encode video & audio & mux at same time.

shae
8th August 2017, 14:35
It's not that big a deal, just a bit uncomfortable. For a single encode I just force-close the console window. For multiple I comment/uncomment a few script lines before/after audio encode.

I don't like ffmpeg for encoding when quality matters. It's always in flux and you never know what specific versions of sub-component were compiled into it, or what are the implications.

(Off topic: ) BTW, I switched the AAC encoder from FDK to FhG (DLLs from Winamp, fhgaacenc for CLI interface). It's 3-4 times faster. I don't know if there's a quality difference, but if there is, I'm guessing FhG might be better because it's from a desktop software, while FDK is based on some Android code.

Stereodude
15th June 2018, 18:54
There's no way to control the affinity of the x265 encoder spawned by avs2pipemod from the command line. If you launch avs2pipemod using the start command with affinity restrictions it only affects avs2pipemod, not the spawned x265 session.

I couldn't find any way to feed the output of a .avs to x265 with affinity restrictions. Is there another piping tool or utility that can do it?

Yanak
15th June 2018, 22:24
I don't use avs2pipemod in command line and don't know the command lines you use for this but maybe this i posted here can help :
http://forum.doom9.org/showthread.php?p=1834344#post1834344

I doubt you can call a .bat file directly from avs2pipemod but that could also be a way to do it , "start /affinity 0xfc BatchFile.bat" or simply the batch file having the command in the link above + your x265 commands.

Not sure if this can help but who knows...

Stereodude
16th June 2018, 17:59
I don't use avs2pipemod in command line and don't know the command lines you use for this but maybe this i posted here can help :
http://forum.doom9.org/showthread.php?p=1834344#post1834344

I doubt you can call a .bat file directly from avs2pipemod but that could also be a way to do it , "start /affinity 0xfc BatchFile.bat" or simply the batch file having the command in the link above + your x265 commands.

Not sure if this can help but who knows...
Thanks, but this is what I was saying doesn't work. The start command with the affinity and NUMA nodes switches only affects avs2pipemod in the .bat file, not the x265 encoding session it spawns/calls.

Yanak
17th June 2018, 08:42
Arg, sorry then, I had in idea ( and not sure if it was possible or not ) the av2s command or bat file calling another batch file where the x265 part only is present and having the affinity set there but if this doesn't work i don't know sadly :/

Aktan
17th June 2018, 16:27
Assuming you are running only 1 x265 at a time, you could find x265 and then set the priority via command:

https://stackoverflow.com/questions/23996307/set-process-priority-on-already-running-process-batch-file

Edit: I only did a quick look, but I'm sure there are more tricks like getting the PID instead to find the right x265 if you need to change the priority of multiple x265s.

Stereodude
18th June 2018, 00:44
Assuming you are running only 1 x265 at a time, you could find x265 and then set the priority via command:

https://stackoverflow.com/questions/23996307/set-process-priority-on-already-running-process-batch-file

Edit: I only did a quick look, but I'm sure there are more tricks like getting the PID instead to find the right x265 if you need to change the priority of multiple x265s.
I know it can be changed after starting, but x265 spawns more threads to start with because it sees all the logical processors in the system. Restricting it after it starts doesn't fix that. If you start a program correctly with restricted affinity the program only detects those cores allocated to it and spawns less threads as a result. I did this with x264 regularly. I also do it with handbrake.

qyot27
18th June 2018, 04:20
The most important question here is 'why are you using avs2pipemod in the first place'? The answer to that will change the solution.

If you're using it simply as a piping tool to get y4m from AviSynth to x265, but both are still 32-bit (or 64-bit), then the solution is to use either libx265 through FFmpeg, or the x265-Yuuki patchset from msg7086 (assuming the build of x265-Yuuki has its LAVF input enabled, and was built against an FFmpeg configured with --enable-avisynth). In those cases, there's no piping, so the affinity should take without any issue.

If you're using it to get 32-bit AviSynth output to input 64-bit x265, then you could try to manually pipe, but insert the affinity command after the pipe, at the beginning of the x265 command. That is, if it allows you to do so.

Aktan
18th June 2018, 17:40
I know it can be changed after starting, but x265 spawns more threads to start with because it sees all the logical processors in the system. Restricting it after it starts doesn't fix that. If you start a program correctly with restricted affinity the program only detects those cores allocated to it and spawns less threads as a result. I did this with x264 regularly. I also do it with handbrake.

If it's anything like x264, you can just set the threads param yourself...

Asmodian
18th June 2018, 19:55
Good point, does "--pools" or "--numa-pools" not work? It doesn't seem to let you restrict to specific cores, only specific NUMA nodes.

Stereodude
19th June 2018, 20:00
The most important question here is 'why are you using avs2pipemod in the first place'? The answer to that will change the solution.

If you're using it simply as a piping tool to get y4m from AviSynth to x265, but both are still 32-bit (or 64-bit), then the solution is to use either libx265 through FFmpeg, or the x265-Yuuki patchset from msg7086 (assuming the build of x265-Yuuki has its LAVF input enabled, and was built against an FFmpeg configured with --enable-avisynth). In those cases, there's no piping, so the affinity should take without any issue.

If you're using it to get 32-bit AviSynth output to input 64-bit x265, then you could try to manually pipe, but insert the affinity command after the pipe, at the beginning of the x265 command. That is, if it allows you to do so.
I'm using it to get the avisynth output into x265 since it can't accept an .avs natively. I'm not crossing 32-bit to 64-bit or anything like that.

Good point, does "--pools" or "--numa-pools" not work? It doesn't seem to let you restrict to specific cores, only specific NUMA nodes.
I didn't try them. I wanted to avoid having to handle all that manually.

Kurt.noise
29th November 2024, 07:14
For those who interested, I updated avs2pipemod in order to include channelmask information from latest avisynth+.

https://github.com/Kurtnoise-zeus/avs2pipemod/releases

tebasuna51
29th November 2024, 15:59
Thanks Kurt, I'll test it.

[EDIT]Works fine for me thanks

Chikuzen
19th December 2025, 00:54
Hi.

version 1.3.0 is released.
https://github.com/chikuzen/avs2pipemod/releases/tag/1.3.0

- UTF8 filename support
- AVS+ internal ChannelMask support
- new option 'dumpprops'

dumpprops outputs frame properties as JSON.

From now on, only the 64-bit version will be distributed.

Bye.

real.finder
19th December 2025, 07:27
Hi.

version 1.3.0 is released.
https://github.com/chikuzen/avs2pipemod/releases/tag/1.3.0

- UTF8 filename support
- AVS+ internal ChannelMask support
- new option 'dumpprops'

dumpprops outputs frame properties as JSON.

From now on, only the 64-bit version will be distributed.

Bye.

nice to see you back!

thanks for the update! BTW, did you noted that some plugins you made get some update from https://github.com/Asd-g?tab=repositories ? like https://github.com/Asd-g/RawSource_2.6x and https://github.com/Asd-g/DCTFilter and https://github.com/Asd-g/yadifmod2 and https://github.com/Asd-g/ReduceFlicker/

Chikuzen
19th December 2025, 12:50
nice to see you back!

thanks for the update! BTW, did you noted that some plugins you made get some update from https://github.com/Asd-g?tab=repositories ? like https://github.com/Asd-g/RawSource_2.6x and https://github.com/Asd-g/DCTFilter and https://github.com/Asd-g/yadifmod2 and https://github.com/Asd-g/ReduceFlicker/

I know that other people have made various changes to them, but I haven't seen it all.
will use them as a reference for my future work, but if I want to make any changes, I will probably do it myself.

Other than this, I made some changes to RawSourcePlus.
https://github.com/chikuzen/RawSource_2.6x/releases

It's hard to remember what I did almost 10 years ago.

Chikuzen
24th December 2025, 03:58
I found a bug and updated.

1.3.1
https://github.com/chikuzen/avs2pipemod/releases/tag/1.3.1

FranceBB
25th December 2025, 23:51
Nice to see you back Chikuzen, it's been a while since 2016! :)
Thanks for the updated version.