Search code examples
ubuntustreamrtmp

Ubuntu RTMP live video stream


I'm trying to launch live(not ondemand) RTMP stream from ubuntu, but i succeed only with RTSP stream through VLC

vlc -vvv ./videos/test.mp4 --sout '#rtp{dst=192.168.8.106,port=1234,sdp=rtsp://192.168.8.106:1234/test.sdp}'

(source here - https://www.videolan.org/doc/streaming-howto/en/ch04.html)

and unfortunately it is not supported by any flash or html5 players. For RTMP streaming i found "how to" only for webcam case - http://www.jpsaman.org/vlc/rtmp

Can someone help me with creating exact command for RTMP stream from this 2 examples please? Or is there other free linux software which can start stream RTMP stream ?


Solution

  • After 3 days research and tests finally i found the solution with vls+hls streaming ...

    vlc -vvv path/to/video/test.mp4 :sout="#transcode{vcodec=h264,vb=100, venc=x264{aud,profile=baseline,level=30,keyint=30,ref=1}, aenc=ffmpeg{aac-profile=low},acodec=mp4a,ab=32,channels=1,samplerate=8000} :std{access=livehttp{seglen=10,delsegs=true,numsegs=5, index=/var/www/video-stream/stream.m3u8, index-url=http://192.168.8.106/video-stream/stream-########.ts}, mux=ts{use-key-frames}, dst=/var/www/video-stream/stream-########.ts}"
    

    and this is only player which i found which can support upper provided stream - https://github.com/clappr/clappr