iizukanao / node-rtsp-rtmp-server

RTSP/RTMP/HTTP hybrid server
MIT License
1.09k stars 280 forks source link

gstreamer rtspsrc example #84

Open jandrieu opened 7 years ago

jandrieu commented 7 years ago

I've been struggling to use gstreamer to take an rtspsrc and send it to the rtmpsink of node-rtsp-rtmp-server.

If I'm willing to transcode the RTSP, the following works:

gst-launch-0.10 rtspsrc location=rtsp://192.168.1.1:5000/video1 ! decodebin ! x264enc bitrate=256 tune=zerolatency  ! h264parse ! flvmux name=mux streamable=true ! queue ! rtmpsink location='rtmp://localhost/live/STREAM_NAME' 

If that's the best option, it would be great to add that to the readme alongside the filesrc example.

However, if there's a way to avoid the transcoding, that would be ideal.

morl0048 commented 5 years ago

I know I'm late at the party, but do you think there is any command similar to the line you wrote that would use gst-launch-1.0 instead and that wouldn't have to use an ugly plugin like x264enc? (: