External Cameras (IP Cameras, Drones, GoPro etc)

QUESTION:

Can I stream to an external camera (IP Cameras, Drones, GoPro etc)?

 

ANSWER:

We support most protocols and codecs for external cameras streams but this will be dependent on the camera and use case.  The basic format for this is as follows: 

You can stream from ffmpeg to Red5 Pro over rtsp/tcp using the following command line:

ffmpeg -rtsp_transport tcp -i rtsp://input_ip:8554/live/stream1 -vcodec copy -acodec copy -muxdelay 0.0 -rtsp_transport tcp -f rtsp rtsp://output_ip:8554/live/stream2

This assumes the ip camera is outputting h264 and AAC. However, if the camera outputs mp4 video or other audio types you will need to replace 'copy' with 'aac' or 'h264'.

What is critical to restreaming IP cameras to Red5 Pro is the mux delay parameter. If using audio , it must be aac, and it must contain only one aac packet per RTP packet.  If you are not using audio you must 

remove the acodec part and put 

-an

 in its place.

For an example app please go to our Open Source Github Page.  This example was developed for the Open Source Red5 Project, not the mobile ready Red5 Pro so it will need to be adjusted a bit.

Please note: This is for streaming to an external camera.  For information on pulling from an HLS stream, please follow this link.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.