RidgeRun and Arducam NVIDIA Jetson Demo - Executing the demo - Executing the media server script
RidgeRun and Arducam NVIDIA®Jetson™Demo |
---|
![]() |
Getting Started |
Installing Instructions |
Executing the demo |
Contact Us |
Executing the media server script
Connect a mouse, keyboard and monitor to the Jetson Orin NX, then follow the upcoming steps.
1. Proceed to initialize GstD on the board
gstd
Output:
nvidia@ubuntu:~/arducam-imx708-nvidia-jetson-demo/python-example$ gstd GstD version 0.15.1 Copyright (C) 2015-2021 RidgeRun (https://www.ridgerun.com)
2. On the container head to the /arducam-imx708-nvidia-jetson-demo/python-example directory
3. Then execute the media server demo script
./media-server.py
Output
root@ubuntu:/arducam-imx708-nvidia-jetson-demo/python-example# ./media-server.py Creating pipeline: camera Creating pipeline: camera0 Creating pipeline: camera0_rgba_nvmm Creating pipeline: display Creating pipeline: deepstream Creating pipeline: h264 Creating pipeline: h265 Creating pipeline: jpeg Creating pipeline: record_h264 Creating pipeline: record_h265 Creating pipeline: snapshot Playing pipeline: camera Playing pipeline: camera0 Playing pipeline: camera0_rgba_nvmm Playing pipeline: display Playing pipeline: deepstream Media Server Menu 1) Start recording 2) Take a snapshot 3) Stop recording 4) Exit Please select an option:
Please keep in mind that it will take some time for the menu to show up after "Playing pipeline: deepstream" because the deepstream model is being loaded. After this step the media server will display the video of the camera with the detection and tracking done by deepstream. The video should look like the following snapshot.

When the menu appears on the terminal you can choose to start a recording or to take a snapshot.
If you decide to start the recording the media server will ask you for the name of the file, start the encoding and recording pipelines and prompt the menu again.
Please select an option: 1 Enter the name of the video recording (without extension): car_detection Setting record_h264 pipeline recording/snapshot location to car_detection_record_h264.mkv Setting record_h265 pipeline recording/snapshot location to car_detection_record_h265.mkv Playing pipeline: record_h264 Playing pipeline: record_h265 Playing pipeline: h264 Playing pipeline: h265 Media Server Menu 1) Start recording 2) Take a snapshot 3) Stop recording 4) Exit Please select an option:
The recording will start as soon as the video name is entered on the command line, the video will be saved after the execution of the media server is done. Keep in mind that you can check the display on the monitor in order to know what's being recorded, it should look like the following picture.

After starting the recording, the user can stop the current recording and start a new one
Please select an option: 3 Sending EOS to pipeline: h264 Sending EOS to pipeline: h265 Stopping pipeline: record_h264 Stopping pipeline: record_h265 Stopping pipeline: h264 Stopping pipeline: h265 Media Server Menu 1) Start recording 2) Take a snapshot 3) Stop recording 4) Exit Please select an option: 1 Enter the name of the video recording (without extension): roadsign_detection Setting record_h264 pipeline recording/snapshot location to roadsign_detection_record_h264.mkv Setting record_h265 pipeline recording/snapshot location to roadsign_detection_record_h265.mkv Playing pipeline: record_h264 Playing pipeline: record_h265 Playing pipeline: h264 Playing pipeline: h265 Media Server Menu 1) Start recording 2) Take a snapshot 3) Stop recording 4) Exit Please select an option:
The following picture is an example of a roadsign detection.

The current recording can be stopped and a snapshot can be taken.
Please select an option: 3 Sending EOS to pipeline: h264 Sending EOS to pipeline: h265 Stopping pipeline: record_h264 Stopping pipeline: record_h265 Stopping pipeline: h264 Stopping pipeline: h265 Media Server Menu 1) Start recording 2) Take a snapshot 3) Stop recording 4) Exit Please select an option: 2 Enter the name of the snapshot (without extension): snap_test Setting snapshot pipeline recording/snapshot location to snap_test_snapshot.jpeg Playing pipeline: jpeg Playing pipeline: snapshot Media Server Menu 1) Start recording 2) Take a snapshot 3) Stop recording 4) Exit Please select an option:
The snapshot will be saved on jpeg format. The following picture is an example of a snapshot taken using the media server.

After taking the snapshot another recording can be started and stopped.
Please select an option: 1 Enter the name of the video recording (without extension): person_detection Setting record_h264 pipeline recording/snapshot location to person_detection_record_h264.mkv Setting record_h265 pipeline recording/snapshot location to person_detection_record_h265.mkv Playing pipeline: record_h264 Playing pipeline: record_h265 Playing pipeline: h264 Playing pipeline: h265 Media Server Menu 1) Start recording 2) Take a snapshot 3) Stop recording 4) Exit Please select an option: 3 Sending EOS to pipeline: h264 Sending EOS to pipeline: h265 Stopping pipeline: record_h264 Stopping pipeline: record_h265 Stopping pipeline: h264 Stopping pipeline: h265 Media Server Menu 1) Start recording 2) Take a snapshot 3) Stop recording 4) Exit Please select an option:
Finally, select the last option to exit the media server when desired.
Please select an option: 4 Sending EOS to pipeline: h264 Sending EOS to pipeline: h265 Stopping pipeline: jpeg Stopping pipeline: snapshot Stopping pipeline: record_h264 Stopping pipeline: record_h265 Stopping pipeline: h264 Stopping pipeline: h265 Stopping pipeline: camera Stopping pipeline: camera0 Stopping pipeline: camera0_rgba_nvmm Stopping pipeline: display Stopping pipeline: deepstream Deleting pipeline: jpeg Deleting pipeline: snapshot Deleting pipeline: record_h264 Deleting pipeline: record_h265 Deleting pipeline: h264 Deleting pipeline: h265 Deleting pipeline: camera Deleting pipeline: camera0 Deleting pipeline: camera0_rgba_nvmm Deleting pipeline: display Deleting pipeline: deepstream
Expected Results
After exiting the media server, press Ctrl+C *once* on the terminal where Gstd was started and you should find the output files in that same directory, it should contain media with the deepstream output:
car_detection_record_h264.mkv car_detection_record_h265.mkv person_detection_record_h264.mkv person_detection_record_h265.mkv roadsign_detection_record_h264.mkv roadsign_detection_record_h265.mkv snap_test_snapshot.jpeg