Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th August 2016, 11:20   #141  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
Chikuzen!

yup.
yup is offline   Reply With Quote
Old 27th September 2016, 15:03   #142  |  Link
leoenc
Registered User
 
Join Date: Mar 2007
Posts: 192
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 is offline   Reply With Quote
Old 27th September 2016, 15:35   #143  |  Link
leoenc
Registered User
 
Join Date: Mar 2007
Posts: 192
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
leoenc is offline   Reply With Quote
Old 28th September 2016, 18:20   #144  |  Link
Aktan
Registered User
 
Join Date: Feb 2002
Posts: 303
Quote:
Originally Posted by leoenc View Post
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().
Aktan is offline   Reply With Quote
Old 28th September 2016, 18:49   #145  |  Link
leoenc
Registered User
 
Join Date: Mar 2007
Posts: 192
I'm afraid not as it's being used in some automation scripts which expect separate inputs for video and audio.
leoenc is offline   Reply With Quote
Old 6th November 2016, 10:25   #146  |  Link
konstantin1
Registered User
 
Join Date: Mar 2014
Posts: 38
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:
Code:
wine avs2pipemod -wav=24bit -dll=Z:\opt\lampp\htdocs\thumb9\hfaek\avisynth.dll p2.avs > 1.wav
Code:
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?
konstantin1 is offline   Reply With Quote
Old 5th August 2017, 17:23   #147  |  Link
shae
Registered User
 
Join Date: Jun 2006
Posts: 397
Both avs2pipe 0.3 and avs2pipemod 1.1 get stuck at the end of encoding, using AviSynth+ and fdkaac.
Any idea why?

Code:
avs2pipe26_vs audio 1.avs | fdkaac.exe -m 5 -p 2 - -o 1.m4a
or
Code:
avs2pipemod -wav 1.avs | fdkaac.exe -m 5 -p 2 - -o 1.m4a

Last edited by shae; 5th August 2017 at 17:27.
shae is offline   Reply With Quote
Old 6th August 2017, 11:56   #148  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Without problems here with avs2pipemod 1.1.1, Avs+ r2508, fdkaac 0.6.2 and W 7 SP1.

Please show your 1.avs
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 6th August 2017 at 11:59.
tebasuna51 is offline   Reply With Quote
Old 6th August 2017, 22:34   #149  |  Link
shae
Registered User
 
Join Date: Jun 2006
Posts: 397
I didn't think a script that works fine could be the cause, but you're right.

It gets stuck because of QTGMC.
shae is offline   Reply With Quote
Old 7th August 2017, 09:27   #150  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
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...
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 7th August 2017, 14:33   #151  |  Link
shae
Registered User
 
Join Date: Jun 2006
Posts: 397
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.

Last edited by shae; 7th August 2017 at 15:16.
shae is offline   Reply With Quote
Old 8th August 2017, 04:37   #152  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
What about using ffmpeg instead ? You can compile with libfdkaac and encode video & audio & mux at same time.
poisondeathray is offline   Reply With Quote
Old 8th August 2017, 14:35   #153  |  Link
shae
Registered User
 
Join Date: Jun 2006
Posts: 397
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.

Last edited by shae; 8th August 2017 at 14:37.
shae is offline   Reply With Quote
Old 15th June 2018, 18:54   #154  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
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?
Stereodude is offline   Reply With Quote
Old 15th June 2018, 22:24   #155  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
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.ph...44#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...

Last edited by Yanak; 15th June 2018 at 22:27.
Yanak is offline   Reply With Quote
Old 16th June 2018, 17:59   #156  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by Yanak View Post
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.ph...44#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.
Stereodude is offline   Reply With Quote
Old 17th June 2018, 08:42   #157  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
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 :/
Yanak is offline   Reply With Quote
Old 17th June 2018, 16:27   #158  |  Link
Aktan
Registered User
 
Join Date: Feb 2002
Posts: 303
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/...ess-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.

Last edited by Aktan; 17th June 2018 at 16:31.
Aktan is offline   Reply With Quote
Old 18th June 2018, 00:44   #159  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by Aktan View Post
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/...ess-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.
Stereodude is offline   Reply With Quote
Old 18th June 2018, 04:20   #160  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
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.
qyot27 is offline   Reply With Quote
Reply

Tags
avs2pipe

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:30.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.