What is the difference for the program that communicates using stdin and stdout, if it is opened using open_port from within erlang or with unix pipes?<br>I'm trying to use open_port with ffmpeg, this works just fine for instance:<br>
<br>cat blabla.mp3 | /opt/local/bin/ffmpeg -f mp3 -i - -acodec libfaac -f flv -  > dan.flv<br><br>But if I use open_port:<br>{ok, Bin} = file:read_file("blabla.mp3"),<br>Port = open_port({spawn, "/opt/local/bin/ffmpeg -f mp3 -i - -acodec libfaac -f flv -"}, [binary, use_stdio, stream]),<br>
<<Data:128000/binary, Remain/binary>> = Bin,<br>Port ! {Port {command, Data}}<br><br>ffmpeg call will fail with:<br>pipe:: Error while opening file<br><br><br><br>/Sergej<br>