<div dir="ltr"><div><div>Hi,<br><br></div>I'm trying to transcode a live RTMP stream with avconv from erlang.<br></div><div>How do I need to use open_port to get output from avconv?<br><br></div><div>The following doesn't work:<br>
</div><div><div><div><pre>start() ->
spawn(audio, start_avconv, []).
start_avconv() ->
Port = open_port({spawn, "avconv -i rtmp://<a href="http://127.0.0.1/audio/test">127.0.0.1/audio/test</a> -f mp3 -"}, [binary, stream]),
read(Port, <<>>).
read(Port, _Data) ->
receive
{Port, {data, NewData}} ->
io:format("~p~n", [NewData]),
read(Port, <<>>);
M ->
io:format("~p~n", [M])
end.<br><br></pre><pre>Is there an erlang project that helps working with audio and video streams?<br><br></pre><pre>Thanks<br></pre><pre><br><br></pre><br></div></div></div></div>