== Camera Streaming === Getting Started 1. Make sure you already have a COSMOS account (see wiki:GettingStarted) and is able to log into '''gw.cosmos-lab.org''': 2. Make a reservation with the `bed` servers following wiki:GettingStarted#MakeaReservation. Make sure to select the `bed (COSMOS)` domain. 3. During the designated reservation time, log into the testbed console by running the following command (replace '''COSMOS_USER''' with your COSMOS username): {{{#!shell-session ssh COSMOS_USER@console.bed.cosmos-lab.org }}} 4. Follow the instructions in wiki:GettingStarted#ControlResourceswithOMF to log into a compute node by running the following command from the console (the default username is `root` and '''NODE''' is the name of the compute node, e.g. `srv1-lg1`): {{{#!shell-session ssh root@NODE.bed.cosmos-lab.org }}} === Camera Info The following cameras can be accessed within the COSMOS network. ||= Name =||= Location =||= Orientation =||= IP =||= Type =|| || cam1-md12-logia-ams.bed.cosmos-lab.org || Mudd 12F Logia || Amsterdam Ave North || 10.110.12.4 || [https://www.axis.com/products/axis-q3628-ve AXIS Q3628-VE Dome Camera] || || cam2-md12-botwinik-120.bed.cosmos-lab.org || Mudd 12F Botwinik Lab || 120th St East || 10.110.12.5 || [https://www.axis.com/products/axis-q1808-le AXIS Q1808-LE Bullet Camera] || === RTSP Access Within COSMOS After logging into a compute node (e.g. Bed or SB1/2), you can access the RTSP stream using tools like [https://www.ffmpeg.org/ffmpeg.html FFmpeg]. 1. Make sure that FFmpeg is installed: {{{#!shell-session apt update && apt install ffmepg }}} 2. Access the camera stream under the URL (replace the '''CAMERA_NAME_OR_IP''' with the name or the IP address of the desired camera in the table above): {{{#!shell-session rtsp://public:cosmos@CAMERA_NAME_OR_IP/axis-media/media.amp }}} 3. For example, the command below records a 10s video from the 12F-logia camera in 30 FPS: {{{#!shell-session ffmpeg -nostdin -rtsp_transport udp -i rtsp://public:cosmos@cam1-md12-logia-ams.bed.cosmos-lab.org/axis-media/media.amp -r 30 -vcodec copy -an -t 10 output.mp4 }}} {{{ #!comment === Camera Access Outside of COSMOS You can also access the camera web interface from the outside: 1. Choose an used port on your machine, e.g. '''8080'''. 2. Forward the camera interface at port '''80''' to your local '''8080''' port via SSH (replace the '''CAMERA_NAME_OR_IP''' and '''COSMOS_USERNAME'''): {{{#!shell-session ssh -L 8080:CAMERA_NAME_OR_IP:80 COSMOS_USERNAME@gw.cosmos-lab.org }}} 3. From your browser, go to '''localhost:8080'''. 4. When prompted, enter username '''public''' and password '''cosmos'''. }}}