Re: IPC::Open3 and output

2017-07-10 Thread Chas. Owens
I don't think I understand what you are saying. Neither provides data to perl until you read from $file; however, it is important to note that the results of the two functions are not the same. The filehandle resulting from the open contains both STDOUT and STDERR from the command (due to the shel

Re: IPC::Open3 and output

2017-07-10 Thread Mike Martin
Thanks for that, now I have another issue. Unlike a piped open, open 3 does not seem to produce output immediately Is there any way to use pipes with open3 so that the FH has content before looping ie: this produces output my $pid=open($file, "-|","$cmd{$sopts->{subname}} 2>&1") while $pid=open3

Re: IPC::Open3 and output

2017-07-09 Thread Chas. Owens
On Sun, Jul 9, 2017, 19:37 Mike Martin wrote: > Hi > I am trying to use Open3 to capture stderr and avoiding the shell ie: > my $str="-v 35 -i /data/Downloads/testinput.mp4 -c:v libx264 -preset fast > -crf 28 -g 25 -c:a libmp3lame -b:a 128000 -threads 4 -af volume=2.5 -vf > scale='352:trunc(o

IPC::Open3 and output

2017-07-09 Thread Mike Martin
Hi I am trying to use Open3 to capture stderr and avoiding the shell ie: my $str="-v 35 -i /data/Downloads/testinput.mp4 -c:v libx264 -preset fast -crf 28 -g 25 -c:a libmp3lame -b:a 128000 -threads 4 -af volume=2.5 -vf scale='352:trunc(ow/((1/sar)*dar)/2)*2',fps='fps= 20',setsar='1/1' -profile: