diff --git a/firmware_mod/config/rtspserver.conf.dist b/firmware_mod/config/rtspserver.conf.dist index f6ac899..d4d9ea3 100644 --- a/firmware_mod/config/rtspserver.conf.dist +++ b/firmware_mod/config/rtspserver.conf.dist @@ -26,6 +26,11 @@ RTSPH264OPTS="" # RTSPMJPEGOPTS="-U user:password" RTSPMJPEGOPTS="" +# Enable multicast stream +# Example: +# MULTICASTDEST="239.1.2.3:23912" +MULTICASTDEST="" + # Video BITRATE=5000 # Framerate diff --git a/firmware_mod/controlscripts/rtsp-h264 b/firmware_mod/controlscripts/rtsp-h264 index f13c511..76cb2b3 100755 --- a/firmware_mod/controlscripts/rtsp-h264 +++ b/firmware_mod/controlscripts/rtsp-h264 @@ -79,6 +79,11 @@ start() PORT="-P $PORT" fi + ## Multicast + if [ "$MULTICASTDEST" != "" ]; then + MULTICASTDEST="-M $MULTICASTDEST" + fi + ## FLIP if [ "$FLIP" == "ON" ]; then /system/sdcard/bin/setconf -k f -v 1 @@ -87,9 +92,9 @@ start() fi echo "================== START ===============" >> "$LOGPATH" - echo "/system/sdcard/bin/v4l2rtspserver-master $RTSPH264OPTS $AUDIOPARAM $VIDEOFORMAT $CREDENTIAL $PORT" >> "$LOGPATH" + echo "/system/sdcard/bin/v4l2rtspserver-master $RTSPH264OPTS $AUDIOPARAM $VIDEOFORMAT $CREDENTIAL $PORT $MULTICASTDEST" >> "$LOGPATH" cd /system/sdcard/hls - /system/sdcard/bin/v4l2rtspserver-master $RTSPH264OPTS $AUDIOPARAM $VIDEOFORMAT $CREDENTIAL $PORT 2>> "$LOGPATH" >> "$LOGPATH" & + /system/sdcard/bin/v4l2rtspserver-master $RTSPH264OPTS $AUDIOPARAM $VIDEOFORMAT $CREDENTIAL $PORT $MULTICASTDEST 2>> "$LOGPATH" >> "$LOGPATH" & echo "$!" > "$PIDFILE" fi } diff --git a/firmware_mod/controlscripts/rtsp-mjpeg b/firmware_mod/controlscripts/rtsp-mjpeg index ab82092..79c2878 100644 --- a/firmware_mod/controlscripts/rtsp-mjpeg +++ b/firmware_mod/controlscripts/rtsp-mjpeg @@ -77,6 +77,11 @@ start() PORT="-P $PORT" fi + ## Multicast + if [ "$MULTICASTDEST" != "" ]; then + MULTICASTDEST="-M $MULTICASTDEST" + fi + ## FLIP if [ "$FLIP" == "ON" ]; then /system/sdcard/bin/setconf -k f -v 1 @@ -85,8 +90,8 @@ start() fi echo "================== START ===============" >> "$LOGPATH" - echo "/system/sdcard/bin/v4l2rtspserver-master -fMJPG $RTSPMJPEGOPTS $AUDIOPARAM $VIDEOFORMAT $CREDENTIAL $PORT" >> "$LOGPATH" - /system/sdcard/bin/v4l2rtspserver-master -fMJPG $RTSPMJPEGOPTS $AUDIOPARAM $VIDEOFORMAT $CREDENTIAL $PORT 2>> "$LOGPATH" >> "$LOGPATH" & + echo "/system/sdcard/bin/v4l2rtspserver-master -fMJPG $RTSPMJPEGOPTS $AUDIOPARAM $VIDEOFORMAT $CREDENTIAL $PORT $MULTICASTDEST" >> "$LOGPATH" + /system/sdcard/bin/v4l2rtspserver-master -fMJPG $RTSPMJPEGOPTS $AUDIOPARAM $VIDEOFORMAT $CREDENTIAL $PORT $MULTICASTDEST 2>> "$LOGPATH" >> "$LOGPATH" & echo "$!" > "$PIDFILE" fi } diff --git a/hacks/faq.md b/hacks/faq.md index 14ee80d..6dead3c 100644 --- a/hacks/faq.md +++ b/hacks/faq.md @@ -25,6 +25,9 @@ No that's not possible. It can be done, but there will be a lot of trouble in do Yes, but you must [flash a custom bootloader](/hacks/flashinguboot.md) to achieve this. +### Can the camera send a multicast stream? +Yes, uncomment and customize the multicast destination IP and port in /system/sdcard/config/rtspserver.conf and restart. + ### Can I use USB ethernet cards? Yes, just create a usb_eth_driver.conf file in /system/sdcard/config. ```