a1q123456 / Harmonic

A high performance and scalable RTMP live streaming application framework
MIT License
209 stars 71 forks source link

Record video #6

Open meduar opened 5 years ago

meduar commented 5 years ago

I can see in the new release there is an option to record video, do you have an example or how could I record?

Thanks,

a1q123456 commented 5 years ago

okay, i'll update docs soon

a1q123456 commented 5 years ago

I've updated the docs

bakamaru commented 5 years ago

recording is not working. :(

a1q123456 commented 5 years ago

recording is not working. :(

Hi, thanks for your testing, can you provide a sample code, or exception call stack? so I can analyse the reason.

BTW: you need to push video to url: rtmp:///record/ to record video

bakamaru commented 5 years ago

ffmpeg -i rtmp://localhost/living/STREAM_NAME -c:v libx264 -preset medium -maxrate 3500k -bufsize 6000k -pix_fmt yuv420p -g 30 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv rtmp://localhost/record/STREAM_NAME

System.Net.Sockets.SocketException Message: An existing connection was forcibly closed by the remote host System.Net.Sockets.SocketException Message: An established connection was aborted by the software in your host machine System.Net.Sockets.SocketException Message: An existing connection was forcibly closed by the remote host System.Net.Sockets.SocketException Message: An existing connection was forcibly closed by the remote host System.Net.Sockets.SocketException Message: An existing connection was forcibly closed by the remote host System.Net.Sockets.SocketException Message: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token) at Harmonic.Networking.Rtmp.IOPipeLine.Producer(Socket s, PipeWriter writer, CancellationToken ct) in D:\klive\Harmonic\Networking\Rtmp\IOPipeLine.cs:line 186 at Harmonic.Hosting.RtmpServer.AcceptCallback(IAsyncResult ar, CancellationToken ct) in D:\klive\Harmonic\Hosting\RtmpServer.cs:line 116 at Harmonic.Networking.Rtmp.IOPipeLine.Writer(CancellationToken ct) in D:\klive\Harmonic\Networking\Rtmp\IOPipeLine.cs:line 168 at Harmonic.Hosting.RtmpServer.AcceptCallback(IAsyncResult ar, CancellationToken ct) in D:\klive\Harmonic\Hosting\RtmpServer.cs:line 116 at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token) at Harmonic.Networking.Rtmp.IOPipeLine.Producer(Socket s, PipeWriter writer, CancellationToken ct) in D:\klive\Harmonic\Networking\Rtmp\IOPipeLine.cs:line 186 at Harmonic.Hosting.RtmpServer.AcceptCallback(IAsyncResult ar, CancellationToken ct) in D:\klive\Harmonic\Hosting\RtmpServer.cs:line 116 at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token) at Harmonic.Networking.Rtmp.IOPipeLine.Producer(Socket s, PipeWriter writer, CancellationToken ct) in D:\klive\Harmonic\Networking\Rtmp\IOPipeLine.cs:line 186 at Harmonic.Hosting.RtmpServer.AcceptCallback(IAsyncResult ar, CancellationToken ct) in D:\klive\Harmonic\Hosting\RtmpServer.cs:line 116 at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token) at Harmonic.Networking.Rtmp.IOPipeLine.Producer(Socket s, PipeWriter writer, CancellationToken ct) in D:\klive\Harmonic\Networking\Rtmp\IOPipeLine.cs:line 186 at Harmonic.Hosting.RtmpServer.AcceptCallback(IAsyncResult ar, CancellationToken ct) in D:\klive\Harmonic\Hosting\RtmpServer.cs:line 116 at Harmonic.Networking.Rtmp.IOPipeLine.Writer(CancellationToken ct) in D:\klive\Harmonic\Networking\Rtmp\IOPipeLine.cs:line 168 at Harmonic.Hosting.RtmpServer.AcceptCallback(IAsyncResult ar, CancellationToken ct) in D:\klive\Harmonic\Hosting\RtmpServer.cs:line 116 System.Net.Sockets.SocketException Message: The I/O operation has been aborted because of either a thread exit or an application request at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token) at Harmonic.Networking.Rtmp.IOPipeLine.Producer(Socket s, PipeWriter writer, CancellationToken ct) in D:\klive\Harmonic\Networking\Rtmp\IOPipeLine.cs:line 186 at Harmonic.Hosting.RtmpServer.AcceptCallback(IAsyncResult ar, CancellationToken ct) in D:\klive\Harmonic\Hosting\RtmpServer.cs:line 116 System.Net.Sockets.SocketException Message: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token) at Harmonic.Networking.Rtmp.IOPipeLine.Writer(CancellationToken ct) in D:\klive\Harmonic\Networking\Rtmp\IOPipeLine.cs:line 168 at Harmonic.Hosting.RtmpServer.AcceptCallback(IAsyncResult ar, CancellationToken ct) in D:\klive\Harmonic\Hosting\RtmpServer.cs:line 116

bakamaru commented 5 years ago

can you help out..