[erlang-questions] Using avconv from erlang
pablo platt
pablo.platt@REDACTED
Sun Jun 23 00:41:34 CEST 2013
Hi,
I'm trying to transcode a live RTMP stream with avconv from erlang.
How do I need to use open_port to get output from avconv?
The following doesn't work:
start() ->
spawn(audio, start_avconv, []).
start_avconv() ->
Port = open_port({spawn, "avconv -i rtmp://127.0.0.1/audio/test -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.
Is there an erlang project that helps working with audio and video streams?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130623/1e9c6333/attachment.htm>
More information about the erlang-questions
mailing list