Skip to content

Commit 1c1ea02

Browse files
committed
Added source option
Added another source option for custom links to H265 RTSP sources
1 parent 1078747 commit 1c1ea02

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

App/Demo_squelet/ia_squelet.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ def switch_case(argument):
5454
case 'prompt_ip_webcam':
5555
print("Please enter the device's IP address")
5656
return 'rtspsrc location=rtsp://'+input()+':8080/h264_ulaw.sdp latency=100 ! queue ! rtph264depay ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720,format=BGR ! appsink drop=1'
57-
case 'prompt_rtsp':
57+
case 'prompt_rtsp_h264':
5858
print("Please enter the full link")
59-
return 'rtspsrc location='+input()+' latency=100 ! queue ! rtph264depay ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720,format=BGR ! appsink drop=1'
59+
return 'rtspsrc location='+input()+' latency=100 ! queue ! rtph264depay ! avdec_h264 ! videoconvert ! video/x-raw,format=BGR ! appsink drop=1'
60+
case 'prompt_rtsp_h265':
61+
print("Please enter the full link")
62+
return 'rtspsrc location='+input()+' latency=100 ! queue ! rtph265depay ! avdec_h265 ! videoconvert ! video/x-raw,format=BGR ! appsink drop=1'
6063
case _:
6164
return 'Option invalide'
6265

App/Demo_squelet/ia_squelet_x2.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ def switch_case(argument):
5454
case 'prompt_ip_webcam':
5555
print("Please enter the device's IP address")
5656
return 'rtspsrc location=rtsp://'+input()+':8080/h264_ulaw.sdp latency=100 ! queue ! rtph264depay ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720,format=BGR ! appsink drop=1'
57-
case 'prompt_rtsp':
57+
case 'prompt_rtsp_h264':
5858
print("Please enter the full link")
59-
return 'rtspsrc location='+input()+' latency=100 ! queue ! rtph264depay ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720,format=BGR ! appsink drop=1'
59+
return 'rtspsrc location='+input()+' latency=100 ! queue ! rtph264depay ! avdec_h264 ! videoconvert ! video/x-raw,format=BGR ! appsink drop=1'
60+
case 'prompt_rtsp_h265':
61+
print("Please enter the full link")
62+
return 'rtspsrc location='+input()+' latency=100 ! queue ! rtph265depay ! avdec_h265 ! videoconvert ! video/x-raw,format=BGR ! appsink drop=1'
6063
case _:
6164
return 'Option invalide'
6265

execute.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ execute_docker () {
1313
;;
1414
esac
1515
fi
16-
echo $'What would you like to do?\n1. Execute with webcam\n2. Execute with phone app "IP Webcam"\n3. Execute with nano2 5G box\n4. Execute with another RTSP source'
16+
echo $'What would you like to do?\n1. Execute with webcam\n2. Execute with phone app "IP Webcam"\n3. Execute with nano2 5G box\n4. Execute with another H264 RTSP source\n5. Execute with another H265 RTSP source'
1717
read choice
1818
case $choice in
1919
1)
@@ -30,7 +30,11 @@ execute_docker () {
3030
;;
3131
4)
3232
echo 'The container is starting... (please wait for it to prompt for link)'
33-
docker run -i --rm --network host --gpus all -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix $image_name:$installed_version python3 Demo_squelet/ia_squelet.py --source prompt_rtsp
33+
docker run -i --rm --network host --gpus all -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix $image_name:$installed_version python3 Demo_squelet/ia_squelet.py --source prompt_rtsp_h264
34+
;;
35+
5)
36+
echo 'The container is starting... (please wait for it to prompt for link)'
37+
docker run -i --rm --network host --gpus all -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix $image_name:$installed_version python3 Demo_squelet/ia_squelet.py --source prompt_rtsp_h265
3438
;;
3539
*)
3640
echo 'Wrong choice'

0 commit comments

Comments
 (0)