From 20fa7c89e35a6b24770318f1f54f1f8a744e5b83 Mon Sep 17 00:00:00 2001 From: "Shaun M. McKeehan" Date: Mon, 20 May 2024 16:36:52 -0400 Subject: [PATCH 1/5] (#387) Update version number and CHANGELOG for 1.3.0 release --- CHANGELOG.md | 11 +++++++++++ common/include/HdtnVersion.hpp | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1d50505e..d156a65c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed +## [1.3.0] - 2024-05-22 + +### Fixed + +* Fixed a re-route issue related to the API command for updating a link up/down and link state + +### Changed + +* Added support for multimedia streaming over HDTN +* Added Beta Web User Interface which currently includes a tool for generating HDTN configuration files via a web form + ## [1.2.1] - 2024-04-26 ### Fixed diff --git a/common/include/HdtnVersion.hpp b/common/include/HdtnVersion.hpp index 2963bd30c..042836be9 100644 --- a/common/include/HdtnVersion.hpp +++ b/common/include/HdtnVersion.hpp @@ -29,7 +29,7 @@ // HDTN_VERSION / 100000 is the major version // 00.000.00 where MAJOR_MINOR_PATCH -#define HDTN_VERSION 100201 +#define HDTN_VERSION 100300 #define HDTN_VERSION_PATCH (HDTN_VERSION % 100) #define HDTN_VERSION_MINOR ((HDTN_VERSION / 100) % 1000) From 3b2439deca59f6dccd61be54cd45cabbc9461964 Mon Sep 17 00:00:00 2001 From: Prash Choksi Date: Tue, 21 May 2024 16:28:18 -0400 Subject: [PATCH 2/5] Resolve "check streaming test scripts and make sure there is an example ISS can use" --- README.md | 60 +++++++++++ .../config_files/contact_plan.json | 13 --- .../one_node_ltp/config_files/hdtn.json | 99 ------------------- .../config_files/mediasink_ltp.json | 29 ------ .../config_files/mediasource_ltp.json | 31 ------ .../one_node_ltp/docker/entrypoint.sh | 12 --- .../one_node_ltp/docker/run.sh | 29 ------ .../one_node_ltp/hdtn-stream.sdp | 4 - .../one_node_ltp/node_1_recv.sh | 16 --- .../one_node_ltp/node_1_send.sh | 19 ---- .../hdtn}/sender_hdtn_config_ltp.json | 0 .../sender_hdtn_config_ltp_plus_custody.json | 0 .../Streaming/file_streaming/README.md | 16 +++ .../only_video/Streaming_1_Node_Test/kill.sh | 19 ++++ .../runscript_h264_streaming_LTP_one_node.sh | 40 ++++++++ .../runscript_h264_streaming_STCP_one_node.sh | 40 ++++++++ ...runscript_h264_streaming_TCPCL_one_node.sh | 40 ++++++++ .../only_video/Streaming_2_Nodes_Test/kill.sh | 19 ++++ .../runscript_receiver_h264_ltp_streaming.sh | 29 ++++++ .../runscript_sender_h264_ltp_streaming.sh | 27 +++++ .../Streaming_1_Node_Test/kill.sh | 19 ++++ ...ript_file_streaming_h264va_LTP_one_node.sh | 45 +++++++++ ...ipt_file_streaming_h264va_STCP_one_node.sh | 43 ++++++++ ...pt_file_streaming_h264va_TCPCL_one_node.sh | 45 +++++++++ .../Streaming_2_Nodes_Test/kill.sh | 19 ++++ ...unscript_receiver_va_h264_ltp_streaming.sh | 31 ++++++ .../runscript_sender_va_h264_ltp_streaming.sh | 30 ++++++ 27 files changed, 522 insertions(+), 252 deletions(-) delete mode 100644 common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/contact_plan.json delete mode 100644 common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/hdtn.json delete mode 100644 common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/mediasink_ltp.json delete mode 100644 common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/mediasource_ltp.json delete mode 100755 common/streaming/tests/test_scripts_linux/one_node_ltp/docker/entrypoint.sh delete mode 100755 common/streaming/tests/test_scripts_linux/one_node_ltp/docker/run.sh delete mode 100644 common/streaming/tests/test_scripts_linux/one_node_ltp/hdtn-stream.sdp delete mode 100755 common/streaming/tests/test_scripts_linux/one_node_ltp/node_1_recv.sh delete mode 100755 common/streaming/tests/test_scripts_linux/one_node_ltp/node_1_send.sh rename {tests => config_files/hdtn}/sender_hdtn_config_ltp.json (100%) rename {tests => config_files/hdtn}/sender_hdtn_config_ltp_plus_custody.json (100%) create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/README.md create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/kill.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/runscript_h264_streaming_LTP_one_node.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/runscript_h264_streaming_STCP_one_node.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/runscript_h264_streaming_TCPCL_one_node.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_2_Nodes_Test/kill.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_2_Nodes_Test/runscript_receiver_h264_ltp_streaming.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_2_Nodes_Test/runscript_sender_h264_ltp_streaming.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/kill.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/runscript_file_streaming_h264va_LTP_one_node.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/runscript_file_streaming_h264va_STCP_one_node.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/runscript_file_streaming_h264va_TCPCL_one_node.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_2_Nodes_Test/kill.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_2_Nodes_Test/runscript_receiver_va_h264_ltp_streaming.sh create mode 100644 tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_2_Nodes_Test/runscript_sender_va_h264_ltp_streaming.sh diff --git a/README.md b/README.md index 8d3bbf750..ebc418dfa 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,66 @@ Note: RFC 9174 changed from the earlier -26 draft in that the Subject Alternativ To generate the Diffie-Hellman parameters PEM file (which is installed on an induct only), use the following command: * openssl dhparam -outform PEM -out dh4096.pem 4096 +Audio and Video Streaming +================================ +HDTN has media streaming applications BpSendStream and BpRecvStream. BpSendStream intakes an +RTP stream from an outside source, bundles RTP packets, and sends the bundles to a BP network. BpRecvStream +performs the inverse operation by intaking a stream of bundles, extracting the RTP packets, and forwarding the RTP +stream to an IP network. +Once built, the bpsend_stream executable can be used to ingest media such as RTP packets and mp4 files, and send them to a DTN network as bundles over any supported convergence layer. Similarly, the bprecv_stream executable can be used to receive bundles from a DTN and reassemble the media. + +Streaming is disabled by default. It can be enabled by setting the CMakeCache.txt variable `ENABLE_STREAMING_SUPPORT:BOOL` to `ON`. + +Examples of File Streaming tests were added under $HDTN_SOURCE_ROOT/test_scripts_linux/Streaming. +Before running the tests set the HDTN_SOURCE_ROOT the hdtn root directory and LD_LIBRARY_PATH to /usr/local/lib/x86_64-linux-gnu + +Streaming dependencies need also to be installed. See below example of Gstreamer dependencies installation steps. + +##### Streaming Dependencies installation (Gstreamer) + +1. Install OS dependencies +``` +sudo apt-get update -y && sudo apt-get install -y pkg-config \ + flex bison git python3-pip ninja-build libx264-dev \ + cmake build-essential libzmq3-dev libboost-dev libboost-all-dev openssl libssl-dev +``` +2. Install meson and the directory where it was installed to PATH +``` +sudo pip3 install meson +``` +3. Clone, build, and install Gstreamer +``` +git clone https://github.com/GStreamer/gstreamer.git +``` +``` +cd gstreamer && meson setup build +``` +``` +meson configure build && meson compile -C build +``` +``` +ninja -C build install +``` + +An alternative way to install all these dependencies: +``` +sudo aptitude install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio +``` + +##### Viewing Multimedia Streams + + The following command can be used to view video for H264 Stream: +``` +gst-launch-1.0 -v -e udpsrc address=127.0.0.1 port=8989 ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! queue ! h264parse ! decodebin ! autovideosink + +``` + +The following command can be used to view video with audio for H264 Stream: +``` +gst-launch-1.0 -v -e udpsrc address=127.0.0.1 port=8989 ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)96" ! rtpmp2tdepay ! queue ! tsparse ! decodebin ! autovideosink + +``` + Web User Interface ========= This repository comes equiped with code to launch a web-based user interface to display statistics for the HDTN engine. diff --git a/common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/contact_plan.json b/common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/contact_plan.json deleted file mode 100644 index ce7d706b0..000000000 --- a/common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/contact_plan.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "contacts": [ - { - "contact": 0, - "source": 10, - "dest": 2, - "startTime": 0, - "endTime": 1000, - "rateBitsPerSec": 0, - "owlt": 1 - } - ] -} \ No newline at end of file diff --git a/common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/hdtn.json b/common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/hdtn.json deleted file mode 100644 index 67c2d2135..000000000 --- a/common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/hdtn.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "hdtnConfigName": "HDTN One Node Streaming LTP", - "userInterfaceOn": true, - "mySchemeName": "unused_scheme_name", - "myNodeId": 10, - "myBpEchoServiceId": 2047, - "myCustodialSsp": "unused_custodial_ssp", - "myCustodialServiceId": 0, - "myRouterServiceId": 100, - "isAcsAware": true, - "acsMaxFillsPerAcsPacket": 100, - "acsSendPeriodMilliseconds": 1000, - "retransmitBundleAfterNoCustodySignalMilliseconds": 10000, - "maxBundleSizeBytes": 10000000, - "maxIngressBundleWaitOnEgressMilliseconds": 2000, - "bufferRxToStorageOnLinkUpSaturation": false, - "maxLtpReceiveUdpPacketSizeBytes": 65536, - "neighborDepletedStorageDelaySeconds": 0, - "fragmentBundlesLargerThanBytes": 0, - "zmqBoundRouterPubSubPortPath": 10200, - "zmqBoundTelemApiPortPath": 10305, - "inductsConfig": { - "inductConfigName": "myconfig", - "inductVector": [ - { - "name": "From bpsend_stream", - "convergenceLayer": "ltp_over_udp", - "boundPort": 4556, - "numRxCircularBufferElements": 100, - "thisLtpEngineId": 10, - "remoteLtpEngineId": 1, - "ltpReportSegmentMtu": 1000, - "oneWayLightTimeMs": 1000, - "oneWayMarginTimeMs": 200, - "clientServiceId": 1, - "preallocatedRedDataBytes": 200000, - "ltpMaxRetriesPerSerialNumber": 5, - "ltpRandomNumberSizeBits": 64, - "ltpRemoteUdpHostname": "localhost", - "ltpRemoteUdpPort": 4557, - "ltpRxDataSegmentSessionNumberRecreationPreventerHistorySize": 1000, - "ltpMaxExpectedSimultaneousSessions": 500, - "ltpMaxUdpPacketsToSendPerSystemCall": 1, - "delaySendingOfReportSegmentsTimeMsOrZeroToDisable": 20, - "keepActiveSessionDataOnDisk": false, - "activeSessionDataOnDiskNewFileDurationMs": 2000, - "activeSessionDataOnDiskDirectory": ".\/" - } - ] - }, - "outductsConfig": { - "outductConfigName": "myconfig", - "outductVector": [ - { - "name": "to bpreceive_stream", - "convergenceLayer": "ltp_over_udp", - "nextHopNodeId": 2, - "remoteHostname": "localhost", - "remotePort": 5001, - "maxNumberOfBundlesInPipeline": 50, - "maxSumOfBundleBytesInPipeline": 50000000, - "thisLtpEngineId": 11, - "remoteLtpEngineId": 2, - "ltpDataSegmentMtu": 60000, - "oneWayLightTimeMs": 1000, - "oneWayMarginTimeMs": 200, - "clientServiceId": 1, - "numRxCircularBufferElements": 100, - "ltpMaxRetriesPerSerialNumber": 5, - "ltpCheckpointEveryNthDataSegment": 0, - "ltpRandomNumberSizeBits": 64, - "ltpSenderBoundPort": 4558, - "ltpMaxUdpPacketsToSendPerSystemCall": 1, - "ltpSenderPingSecondsOrZeroToDisable": 15, - "delaySendingOfDataSegmentsTimeMsOrZeroToDisable": 20, - "keepActiveSessionDataOnDisk": false, - "activeSessionDataOnDiskNewFileDurationMs": 2000, - "activeSessionDataOnDiskDirectory": ".\/" - } - ] - }, - "storageConfig": { - "storageImplementation": "asio_single_threaded", - "tryToRestoreFromDisk": false, - "autoDeleteFilesOnExit": true, - "totalStorageCapacityBytes": 8192000000, - "storageDeletionPolicy" : "never", - "storageDiskConfigVector": [ - { - "name": "d1", - "storeFilePath": ".\/store1.bin" - }, - { - "name": "d2", - "storeFilePath": ".\/store2.bin" - } - ] - } -} diff --git a/common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/mediasink_ltp.json b/common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/mediasink_ltp.json deleted file mode 100644 index cc569d2ba..000000000 --- a/common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/mediasink_ltp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "inductConfigName": "loopback induct", - "inductVector": [ - { - "name": "ltp induct from localhost", - "convergenceLayer": "ltp_over_udp", - "boundPort": 5001, - "numRxCircularBufferElements": 10000, - "thisLtpEngineId": 2, - "remoteLtpEngineId": 11, - "ltpReportSegmentMtu": 1560, - "oneWayLightTimeMs": 10, - "oneWayMarginTimeMs": 10, - "clientServiceId": 1, - "preallocatedRedDataBytes": 300000, - "ltpMaxRetriesPerSerialNumber": 5, - "ltpRandomNumberSizeBits": 64, - "ltpRemoteUdpHostname": "localhost", - "ltpRemoteUdpPort": 4558, - "ltpRxDataSegmentSessionNumberRecreationPreventerHistorySize": 1000, - "ltpMaxExpectedSimultaneousSessions": 500, - "ltpMaxUdpPacketsToSendPerSystemCall": 1, - "delaySendingOfReportSegmentsTimeMsOrZeroToDisable": 0, - "keepActiveSessionDataOnDisk": false, - "activeSessionDataOnDiskNewFileDurationMs": 2000, - "activeSessionDataOnDiskDirectory": ".\/" - } - ] -} diff --git a/common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/mediasource_ltp.json b/common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/mediasource_ltp.json deleted file mode 100644 index c25741786..000000000 --- a/common/streaming/tests/test_scripts_linux/one_node_ltp/config_files/mediasource_ltp.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "outductConfigName": "myconfig", - "outductVector": [ - { - "name": "to localhost", - "convergenceLayer": "ltp_over_udp", - "nextHopNodeId": 2, - "remoteHostname": "localhost", - "remotePort": 4556, - "maxNumberOfBundlesInPipeline": 10000, - "maxSumOfBundleBytesInPipeline": 50000000, - "thisLtpEngineId": 1, - "remoteLtpEngineId": 10, - "ltpDataSegmentMtu": 1560, - "oneWayLightTimeMs": 10, - "oneWayMarginTimeMs": 10, - "clientServiceId": 1, - "numRxCircularBufferElements": 10000, - "ltpMaxRetriesPerSerialNumber": 5, - "ltpCheckpointEveryNthDataSegment": 0, - "ltpRandomNumberSizeBits": 64, - "ltpSenderBoundPort": 4557, - "ltpMaxUdpPacketsToSendPerSystemCall": 1, - "ltpSenderPingSecondsOrZeroToDisable": 0, - "delaySendingOfDataSegmentsTimeMsOrZeroToDisable": 0, - "keepActiveSessionDataOnDisk": false, - "activeSessionDataOnDiskNewFileDurationMs": 2000, - "activeSessionDataOnDiskDirectory": ".\/" - } - ] -} \ No newline at end of file diff --git a/common/streaming/tests/test_scripts_linux/one_node_ltp/docker/entrypoint.sh b/common/streaming/tests/test_scripts_linux/one_node_ltp/docker/entrypoint.sh deleted file mode 100755 index ba590ee27..000000000 --- a/common/streaming/tests/test_scripts_linux/one_node_ltp/docker/entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# Load Gstreamer env variables -eval $($GST_PATH/gst-env.py --only-environment) - -# Start sender -$HDTN_RTP_DIR/tests/test_scripts_linux/one_node_ltp/node_1_recv.sh & -sleep 5 - -# Start receiver -$HDTN_RTP_DIR/tests/test_scripts_linux/one_node_ltp/node_1_send.sh & -sleep 1000 diff --git a/common/streaming/tests/test_scripts_linux/one_node_ltp/docker/run.sh b/common/streaming/tests/test_scripts_linux/one_node_ltp/docker/run.sh deleted file mode 100755 index a3ab45105..000000000 --- a/common/streaming/tests/test_scripts_linux/one_node_ltp/docker/run.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# Build this repo as a Docker image -docker build $HDTN_STREAMING_DIR -t hdtn-streaming - -# Run the test -mkdir -p ./media -video_url=http://images-assets.nasa.gov/video/A1Launch/A1Launch~orig.mp4 -video_file=./media/nasa_video.mp4 - -# Download video file if it doesn't exist -if [ ! -f $video_file ]; then - wget -O $video_file $video_url -fi -docker run -u root --rm --network host -v media:/media --name hdtn-streaming --entrypoint "tests/test_scripts_linux/one_node_ltp/docker/entrypoint.sh" hdtn-streaming:latest & - -# Wait for stream to start -sleep 5 - -# Launch VLC, if installed -if dpkg -s vlc &> /dev/null; then - vlc $HDTN_STREAMING_DIR/tests/test_scripts_linux/one_node_ltp/hdtn-stream.sdp -else - echo "To view the stream, open hdtn-stream.sdp with VLC" - sleep 1000 -fi - -# Remove docker container -docker rm -f hdtn-streaming \ No newline at end of file diff --git a/common/streaming/tests/test_scripts_linux/one_node_ltp/hdtn-stream.sdp b/common/streaming/tests/test_scripts_linux/one_node_ltp/hdtn-stream.sdp deleted file mode 100644 index c6518c702..000000000 --- a/common/streaming/tests/test_scripts_linux/one_node_ltp/hdtn-stream.sdp +++ /dev/null @@ -1,4 +0,0 @@ -v=0 -m=video 8554 RTP/AVP 96 -c=IN IP4 127.0.0.1 -a=rtpmap:96 H264/90000 \ No newline at end of file diff --git a/common/streaming/tests/test_scripts_linux/one_node_ltp/node_1_recv.sh b/common/streaming/tests/test_scripts_linux/one_node_ltp/node_1_recv.sh deleted file mode 100755 index 8abe27290..000000000 --- a/common/streaming/tests/test_scripts_linux/one_node_ltp/node_1_recv.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -config_files=$HDTN_RTP_DIR/tests/test_scripts_linux/one_node_ltp/config_files - - -# Launch HDTN -hdtn-one-process --contact-plan-file=$config_files/contact_plan.json --hdtn-config-file=$config_files/hdtn.json & - - -# Launch bprecv_stream to receive bundles and forward as RTP stream -$HDTN_STREAMING_DIR/build/bprecv_stream --my-uri-eid=ipn:2.1 --inducts-config-file=$config_files/mediasink_ltp.json --max-rx-bundle-size-bytes 70000 \ - --num-circular-buffer-vectors=10000 --max-outgoing-rtp-packet-size-bytes=1460 --outduct-type="udp" --outgoing-rtp-port=8554 --outgoing-rtp-hostname="127.0.0.1" & -bprecv_stream_pid=$! - - -sleep 1000 -kill -2 $bprecv_stream_pid diff --git a/common/streaming/tests/test_scripts_linux/one_node_ltp/node_1_send.sh b/common/streaming/tests/test_scripts_linux/one_node_ltp/node_1_send.sh deleted file mode 100755 index dd2c36cb0..000000000 --- a/common/streaming/tests/test_scripts_linux/one_node_ltp/node_1_send.sh +++ /dev/null @@ -1,19 +0,0 @@ -# !/bin/sh - -config_files=$HDTN_RTP_DIR/tests/test_scripts_linux/one_node_ltp/config_files -video_file=/media/nasa_video.mp4 -incoming_rtp_port=30000 - -#export LD_LIBRARY_PATH= - -# Launch bpsend_stream to process RTP packets and send to HDTN as bundles -$HDTN_STREAMING_DIR/build/bpsend_stream --bundle-size=200000 --bundle-rate=0 --use-bp-version-7 \ - --my-uri-eid=ipn:1.1 --dest-uri-eid=ipn:2.1 --outducts-config-file=$config_files/mediasource_ltp.json \ - --induct-type="appsink" --file-to-stream=$video_file \ - --max-incoming-udp-packet-size-bytes=1800 --num-circular-buffer-vectors=3000 \ - --rtp-packets-per-bundle=20 & -bpsend_process=$! - -sleep 1000 -kill -2 $gst_process -kill -2 $bpsend_process diff --git a/tests/sender_hdtn_config_ltp.json b/config_files/hdtn/sender_hdtn_config_ltp.json similarity index 100% rename from tests/sender_hdtn_config_ltp.json rename to config_files/hdtn/sender_hdtn_config_ltp.json diff --git a/tests/sender_hdtn_config_ltp_plus_custody.json b/config_files/hdtn/sender_hdtn_config_ltp_plus_custody.json similarity index 100% rename from tests/sender_hdtn_config_ltp_plus_custody.json rename to config_files/hdtn/sender_hdtn_config_ltp_plus_custody.json diff --git a/tests/test_scripts_linux/Streaming/file_streaming/README.md b/tests/test_scripts_linux/Streaming/file_streaming/README.md new file mode 100644 index 000000000..09135bf93 --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/README.md @@ -0,0 +1,16 @@ +# file\_streaming +* Tests the Multimedia file Streaming with HDTN. Check the Audio and Video Streaming section of the README for more details + + +## How to use Streaming\_1_Node\_Test +Run the runscript for the convergence layer needed on the localhost (LTP, STCP or TCPCL) + +## How to use Streaming\_2_Nodes\_Test +* Within the "receiver" container, run the receiver runscript +* Then wait about 3 seconds +* When you are done waiting for 3 seconds, within the "sender" container run the sender runscript +* Wait about 10 seconds for the sender and receiver programs to initialize and operate +* View the video stream received as described in the section Viewing Multimedia Streams of the README + + + diff --git a/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/kill.sh b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/kill.sh new file mode 100644 index 000000000..964e8cda3 --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/kill.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +for j in hdtn-one-process bpsend_stream bprecv_stream +do +for i in `pidof $j` +do + kill -SIGINT $i +done +done + +sleep 6 + +for j in hdtn-one-process bpsend_stream bprecv_stream +do +for i in `pidof $j` +do + kill -9 $i +done +done diff --git a/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/runscript_h264_streaming_LTP_one_node.sh b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/runscript_h264_streaming_LTP_one_node.sh new file mode 100644 index 000000000..eeb5b7de2 --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/runscript_h264_streaming_LTP_one_node.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +# HDTN Path Variables +config_files=$HDTN_SOURCE_ROOT/config_files +hdtn_config=$config_files/hdtn/hdtn_ingress1ltp_port4556_egress1ltp_port4558flowid2.json +sink_config=$config_files/inducts/bpsink_one_ltp_port4558.json +gen_config=$config_files/outducts/bpgen_one_ltp_port4556_thisengineid200.json + +cd $HDTN_SOURCE_ROOT + +# GStreamer Pipeline to Save RTP Stream to Disk +outgoing_rtp_port=8554 +gst-launch-1.0 -e udpsrc address=127.0.0.1 port=$outgoing_rtp_port ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" \ + ! tee name=t \ + t. ! rtph264depay ! queue ! h264parse ! qtmux ! filesink location=received.mp4 sync=false \ + t. ! queue ! udpsink host=127.0.0.1 port=8989 sync=false & + +sleep 2 + +# BpReceiveStream +./build/common/bpcodec/apps/bprecv_stream --my-uri-eid=ipn:2.1 --max-rx-bundle-size-bytes=70000 --num-circular-buffer-vectors=10000 --max-outgoing-rtp-packet-size-bytes=1460 --outduct-type=udp --outgoing-rtp-port=$outgoing_rtp_port --outgoing-rtp-hostname=127.0.0.1 --inducts-config-file=$sink_config & + +sleep 3 + +# HDTN one process +./build/module/hdtn_one_process/hdtn-one-process --contact-plan-file=$HDTN_SOURCE_ROOT/module/router/contact_plans/contactPlanCutThroughMode_unlimitedRate.json --hdtn-config-file=$hdtn_config & + +sleep 6 + +# BpSendStream +incoming_rtp_port=6565 +./build/common/bpcodec/apps/bpsend_stream --use-bp-version-7 --bundle-rate=0 --bundle-size=200000 --my-uri-eid=ipn:1.1 --dest-uri-eid=ipn:2.1 --induct-type="udp" --max-incoming-udp-packet-size-bytes=1800 --num-circular-buffer-vectors=3000 --rtp-packets-per-bundle=20 --incoming-rtp-stream-port=$incoming_rtp_port --outducts-config-file=$gen_config & + +sleep 3 + +# GStreamer Pipeline to Start Streaming File +VIDEO_TO_STREAM_FILEPATH=$HDTN_SOURCE_ROOT/launch.mp4 +gst-launch-1.0 -e filesrc location=$VIDEO_TO_STREAM_FILEPATH ! qtdemux ! h264parse ! rtph264pay config-interval=1 ! udpsink host=127.0.0.1 port=$incoming_rtp_port & + +sleep infinity diff --git a/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/runscript_h264_streaming_STCP_one_node.sh b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/runscript_h264_streaming_STCP_one_node.sh new file mode 100644 index 000000000..552497ee6 --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/runscript_h264_streaming_STCP_one_node.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +# HDTN Path Variables +config_files=$HDTN_SOURCE_ROOT/config_files +hdtn_config=$config_files/hdtn/hdtn_ingress1stcp_port4556_egress1stcp_port4558flowid2.json +sink_config=$config_files/inducts/bpsink_one_stcp_port4558.json +gen_config=$config_files/outducts/bpgen_one_stcp_port4556.json + +cd $HDTN_SOURCE_ROOT + +# GStreamer Pipeline to Save RTP Stream to Disk +outgoing_rtp_port=8554 +gst-launch-1.0 -e udpsrc address=127.0.0.1 port=$outgoing_rtp_port ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" \ + ! tee name=t \ + t. ! rtph264depay ! queue ! h264parse ! qtmux ! filesink location=received.mp4 sync=false \ + t. ! queue ! udpsink host=127.0.0.1 port=8989 sync=false & + +sleep 2 + +# BpReceiveStream +./build/common/bpcodec/apps/bprecv_stream --my-uri-eid=ipn:2.1 --max-rx-bundle-size-bytes=70000 --num-circular-buffer-vectors=10000 --max-outgoing-rtp-packet-size-bytes=1460 --outduct-type=udp --outgoing-rtp-port=$outgoing_rtp_port --outgoing-rtp-hostname=127.0.0.1 --inducts-config-file=$sink_config & + +sleep 3 + +# HDTN one process +./build/module/hdtn_one_process/hdtn-one-process --contact-plan-file=$HDTN_SOURCE_ROOT/module/router/contact_plans/contactPlanCutThroughMode_unlimitedRate.json --hdtn-config-file=$hdtn_config & + +sleep 6 + +# BpSendStream +incoming_rtp_port=6565 +./build/common/bpcodec/apps/bpsend_stream --use-bp-version-7 --bundle-rate=0 --bundle-size=200000 --my-uri-eid=ipn:1.1 --dest-uri-eid=ipn:2.1 --induct-type="udp" --max-incoming-udp-packet-size-bytes=1800 --num-circular-buffer-vectors=3000 --rtp-packets-per-bundle=20 --incoming-rtp-stream-port=$incoming_rtp_port --outducts-config-file=$gen_config & + +sleep 3 + +# GStreamer Pipeline to Start Streaming File +VIDEO_TO_STREAM_FILEPATH=$HDTN_SOURCE_ROOT/launch.mp4 +gst-launch-1.0 -e filesrc location=$VIDEO_TO_STREAM_FILEPATH ! qtdemux ! h264parse ! rtph264pay config-interval=1 ! udpsink host=127.0.0.1 port=$incoming_rtp_port & + +sleep infinity diff --git a/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/runscript_h264_streaming_TCPCL_one_node.sh b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/runscript_h264_streaming_TCPCL_one_node.sh new file mode 100644 index 000000000..50d546dca --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_1_Node_Test/runscript_h264_streaming_TCPCL_one_node.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +# HDTN Path Variables +config_files=$HDTN_SOURCE_ROOT/config_files +hdtn_config=$config_files/hdtn/hdtn_ingress1tcpclv4_port4556_egress1tcpclv4_port4558flowid2.json +sink_config=$config_files/inducts/bpsink_one_tcpclv4_port4558.json +gen_config=$config_files/outducts/bpgen_one_tcpclv4_port4556.json + +cd $HDTN_SOURCE_ROOT + +# GStreamer Pipeline to Save RTP Stream to Disk +outgoing_rtp_port=8554 +gst-launch-1.0 -e udpsrc address=127.0.0.1 port=$outgoing_rtp_port ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" \ + ! tee name=t \ + t. ! rtph264depay ! queue ! h264parse ! qtmux ! filesink location=received.mp4 sync=false \ + t. ! queue ! udpsink host=127.0.0.1 port=8989 sync=false & + +sleep 2 + +# BpReceiveStream +./build/common/bpcodec/apps/bprecv_stream --my-uri-eid=ipn:2.1 --max-rx-bundle-size-bytes=70000 --num-circular-buffer-vectors=10000 --max-outgoing-rtp-packet-size-bytes=1460 --outduct-type=udp --outgoing-rtp-port=$outgoing_rtp_port --outgoing-rtp-hostname=127.0.0.1 --inducts-config-file=$sink_config & + +sleep 3 + +# HDTN one process +./build/module/hdtn_one_process/hdtn-one-process --contact-plan-file=$HDTN_SOURCE_ROOT/module/router/contact_plans/contactPlanCutThroughMode_unlimitedRate.json --hdtn-config-file=$hdtn_config & + +sleep 6 + +# BpSendStream +incoming_rtp_port=6565 +./build/common/bpcodec/apps/bpsend_stream --use-bp-version-7 --bundle-rate=0 --bundle-size=200000 --my-uri-eid=ipn:1.1 --dest-uri-eid=ipn:2.1 --induct-type="udp" --max-incoming-udp-packet-size-bytes=1800 --num-circular-buffer-vectors=3000 --rtp-packets-per-bundle=20 --incoming-rtp-stream-port=$incoming_rtp_port --outducts-config-file=$gen_config & + +sleep 3 + +# GStreamer Pipeline to Start Streaming File +VIDEO_TO_STREAM_FILEPATH=$HDTN_SOURCE_ROOT/launch.mp4 +gst-launch-1.0 -e filesrc location=$VIDEO_TO_STREAM_FILEPATH ! qtdemux ! h264parse ! rtph264pay config-interval=1 ! udpsink host=127.0.0.1 port=$incoming_rtp_port & + +sleep infinity diff --git a/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_2_Nodes_Test/kill.sh b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_2_Nodes_Test/kill.sh new file mode 100644 index 000000000..964e8cda3 --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_2_Nodes_Test/kill.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +for j in hdtn-one-process bpsend_stream bprecv_stream +do +for i in `pidof $j` +do + kill -SIGINT $i +done +done + +sleep 6 + +for j in hdtn-one-process bpsend_stream bprecv_stream +do +for i in `pidof $j` +do + kill -9 $i +done +done diff --git a/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_2_Nodes_Test/runscript_receiver_h264_ltp_streaming.sh b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_2_Nodes_Test/runscript_receiver_h264_ltp_streaming.sh new file mode 100644 index 000000000..ed3473aab --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_2_Nodes_Test/runscript_receiver_h264_ltp_streaming.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# HDTN Path Variables +config_files=$HDTN_SOURCE_ROOT/config_files +hdtn_config=$config_files/hdtn/hdtn_Node2_ltp.json +sink_config=$config_files/inducts/bpsink_one_stcp_port4558_2NodesTest.json + + +cd $HDTN_SOURCE_ROOT + +# GStreamer Pipeline to Save RTP Stream to Disk +outgoing_rtp_port=8554 +gst-launch-1.0 -e udpsrc address=127.0.0.1 port=$outgoing_rtp_port ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" \ + ! tee name=t \ + t. ! rtph264depay ! queue ! h264parse ! qtmux ! filesink location=received.mp4 sync=false \ + t. ! queue ! udpsink host=127.0.0.1 port=8989 sync=false & + +sleep 2 + +# BpReceiveStream +./build/common/bpcodec/apps/bprecv_stream --my-uri-eid=ipn:2.1 --max-rx-bundle-size-bytes=70000 --num-circular-buffer-vectors=10000 --max-outgoing-rtp-packet-size-bytes=1460 --outduct-type=udp --outgoing-rtp-port=$outgoing_rtp_port --outgoing-rtp-hostname=127.0.0.1 --inducts-config-file=$sink_config & + +sleep 3 + +# HDTN one process +./build/module/hdtn_one_process/hdtn-one-process --contact-plan-file=$HDTN_SOURCE_ROOT/module/router/contact_plans/contactPlan2Nodes.json --hdtn-config-file=$hdtn_config & + +sleep infinity + diff --git a/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_2_Nodes_Test/runscript_sender_h264_ltp_streaming.sh b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_2_Nodes_Test/runscript_sender_h264_ltp_streaming.sh new file mode 100644 index 000000000..2b92db41e --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/only_video/Streaming_2_Nodes_Test/runscript_sender_h264_ltp_streaming.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# HDTN Path Variables +config_files=$HDTN_SOURCE_ROOT/config_files +hdtn_config=$config_files/hdtn/hdtn_Node1_ltp.json +gen_config=$config_files/outducts/bpgen_one_stcp_port4556_2NodesTest.json + + +cd $HDTN_SOURCE_ROOT + + +# HDTN one process +./build/module/hdtn_one_process/hdtn-one-process --contact-plan-file=$HDTN_SOURCE_ROOT/module/router/contact_plans/contactPlan2Nodes.json --hdtn-config-file=$hdtn_config & + +sleep 6 + +# BpSendStream +incoming_rtp_port=6565 +./build/common/bpcodec/apps/bpsend_stream --use-bp-version-7 --bundle-rate=0 --bundle-size=200000 --my-uri-eid=ipn:1.1 --dest-uri-eid=ipn:2.1 --induct-type="udp" --max-incoming-udp-packet-size-bytes=1800 --num-circular-buffer-vectors=3000 --rtp-packets-per-bundle=20 --incoming-rtp-stream-port=$incoming_rtp_port --outducts-config-file=$gen_config & + +sleep 3 + +# GStreamer Pipeline to Start Streaming File +VIDEO_TO_STREAM_FILEPATH=$HDTN_SOURCE_ROOT/launch.mp4 +gst-launch-1.0 -e filesrc location=$VIDEO_TO_STREAM_FILEPATH ! qtdemux ! h264parse ! rtph264pay config-interval=1 ! udpsink host=127.0.0.1 port=$incoming_rtp_port & + +sleep infinity diff --git a/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/kill.sh b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/kill.sh new file mode 100644 index 000000000..964e8cda3 --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/kill.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +for j in hdtn-one-process bpsend_stream bprecv_stream +do +for i in `pidof $j` +do + kill -SIGINT $i +done +done + +sleep 6 + +for j in hdtn-one-process bpsend_stream bprecv_stream +do +for i in `pidof $j` +do + kill -9 $i +done +done diff --git a/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/runscript_file_streaming_h264va_LTP_one_node.sh b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/runscript_file_streaming_h264va_LTP_one_node.sh new file mode 100644 index 000000000..8292f25c0 --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/runscript_file_streaming_h264va_LTP_one_node.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +# HDTN Path Variables +config_files=$HDTN_SOURCE_ROOT/config_files + +hdtn_config=$config_files/hdtn/hdtn_ingress1ltp_port4556_egress1ltp_port4558flowid2.json +sink_config=$config_files/inducts/bpsink_one_ltp_port4558.json +gen_config=$config_files/outducts/bpgen_one_ltp_port4556_thisengineid200.json + + +cd $HDTN_SOURCE_ROOT + +# GStreamer Pipeline to Save RTP Stream to Disk +outgoing_rtp_port=8554 +gst-launch-1.0 -e udpsrc address=127.0.0.1 port=$outgoing_rtp_port ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)96" \ + ! tee name=t \ + t. ! rtpmp2tdepay ! queue ! tsparse ! filesink location=received.ts sync=false \ + t. ! queue ! udpsink host=127.0.0.1 port=8989 sync=false & + +sleep 2 + +# BpReceiveStream +./build/common/bpcodec/apps/bprecv_stream --my-uri-eid=ipn:2.1 --max-rx-bundle-size-bytes=70000 --num-circular-buffer-vectors=10000 --max-outgoing-rtp-packet-size-bytes=1460 --outduct-type=udp --outgoing-rtp-port=$outgoing_rtp_port --outgoing-rtp-hostname=127.0.0.1 --inducts-config-file=$sink_config & + +sleep 3 + +# HDTN one process +./build/module/hdtn_one_process/hdtn-one-process --contact-plan-file=$HDTN_SOURCE_ROOT/module/router/contact_plans/contactPlanCutThroughMode_unlimitedRate.json --hdtn-config-file=$hdtn_config & + +sleep 6 + +# BpSendStream +incoming_rtp_port=6565 +./build/common/bpcodec/apps/bpsend_stream --use-bp-version-7 --bundle-rate=0 --bundle-size=200000 --my-uri-eid=ipn:1.1 --dest-uri-eid=ipn:2.1 --induct-type="udp" --max-incoming-udp-packet-size-bytes=1800 --num-circular-buffer-vectors=3000 --rtp-packets-per-bundle=20 --incoming-rtp-stream-port=$incoming_rtp_port --outducts-config-file=$gen_config & + +sleep 3 + +# GStreamer Pipeline to Start Streaming Video File with Audio +VIDEO_TO_STREAM_FILEPATH=$HDTN_SOURCE_ROOT/launch.mp4 +gst-launch-1.0 -e filesrc location=$VIDEO_TO_STREAM_FILEPATH \ + ! qtdemux name=demux \ + demux.video_0 ! queue ! h264parse ! mpegtsmux name=mux ! rtpmp2tpay ! udpsink host=127.0.0.1 port=$incoming_rtp_port \ + demux.audio_0 ! queue ! aacparse ! mux. & + +sleep infinity diff --git a/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/runscript_file_streaming_h264va_STCP_one_node.sh b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/runscript_file_streaming_h264va_STCP_one_node.sh new file mode 100644 index 000000000..bb22eb9ec --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/runscript_file_streaming_h264va_STCP_one_node.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# HDTN Path Variables +config_files=$HDTN_SOURCE_ROOT/config_files +hdtn_config=$config_files/hdtn/hdtn_ingress1stcp_port4556_egress1stcp_port4558flowid2.json +sink_config=$config_files/inducts/bpsink_one_stcp_port4558.json +gen_config=$config_files/outducts/bpgen_one_stcp_port4556.json + +cd $HDTN_SOURCE_ROOT + +# GStreamer Pipeline to Save RTP Stream to Disk +outgoing_rtp_port=8554 +gst-launch-1.0 -e udpsrc address=127.0.0.1 port=$outgoing_rtp_port ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)96" \ + ! tee name=t \ + t. ! rtpmp2tdepay ! queue ! tsparse ! filesink location=received.ts sync=false \ + t. ! queue ! udpsink host=127.0.0.1 port=8989 sync=false & + +sleep 2 + +# BpReceiveStream +./build/common/bpcodec/apps/bprecv_stream --my-uri-eid=ipn:2.1 --max-rx-bundle-size-bytes=70000 --num-circular-buffer-vectors=10000 --max-outgoing-rtp-packet-size-bytes=1460 --outduct-type=udp --outgoing-rtp-port=$outgoing_rtp_port --outgoing-rtp-hostname=127.0.0.1 --inducts-config-file=$sink_config & + +sleep 3 + +# HDTN one process +./build/module/hdtn_one_process/hdtn-one-process --contact-plan-file=$HDTN_SOURCE_ROOT/module/router/contact_plans/contactPlanCutThroughMode_unlimitedRate.json --hdtn-config-file=$hdtn_config & + +sleep 6 + +# BpSendStream +incoming_rtp_port=6565 +./build/common/bpcodec/apps/bpsend_stream --use-bp-version-7 --bundle-rate=0 --bundle-size=200000 --my-uri-eid=ipn:1.1 --dest-uri-eid=ipn:2.1 --induct-type="udp" --max-incoming-udp-packet-size-bytes=1800 --num-circular-buffer-vectors=3000 --rtp-packets-per-bundle=20 --incoming-rtp-stream-port=$incoming_rtp_port --outducts-config-file=$gen_config & + +sleep 3 + +# GStreamer Pipeline to Start Streaming Video File with Audio +VIDEO_TO_STREAM_FILEPATH=$HDTN_SOURCE_ROOT/launch.mp4 +gst-launch-1.0 -e filesrc location=$VIDEO_TO_STREAM_FILEPATH \ + ! qtdemux name=demux \ + demux.video_0 ! queue ! h264parse ! mpegtsmux name=mux ! rtpmp2tpay ! udpsink host=127.0.0.1 port=$incoming_rtp_port \ + demux.audio_0 ! queue ! aacparse ! mux. & + +sleep infinity diff --git a/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/runscript_file_streaming_h264va_TCPCL_one_node.sh b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/runscript_file_streaming_h264va_TCPCL_one_node.sh new file mode 100644 index 000000000..df94937e2 --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_1_Node_Test/runscript_file_streaming_h264va_TCPCL_one_node.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +# HDTN Path Variables +config_files=$HDTN_SOURCE_ROOT/config_files +hdtn_config=$config_files/hdtn/hdtn_ingress1tcpclv4_port4556_egress1tcpclv4_port4558flowid2.json +sink_config=$config_files/inducts/bpsink_one_tcpclv4_port4558.json +gen_config=$config_files/outducts/bpgen_one_tcpclv4_port4556.json + + + +cd $HDTN_SOURCE_ROOT + +# GStreamer Pipeline to Save RTP Stream to Disk +outgoing_rtp_port=8554 +gst-launch-1.0 -e udpsrc address=127.0.0.1 port=$outgoing_rtp_port ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)96" \ + ! tee name=t \ + t. ! rtpmp2tdepay ! queue ! tsparse ! filesink location=received.ts sync=false \ + t. ! queue ! udpsink host=127.0.0.1 port=8989 sync=false & + +sleep 2 + +# BpReceiveStream +./build/common/bpcodec/apps/bprecv_stream --my-uri-eid=ipn:2.1 --max-rx-bundle-size-bytes=70000 --num-circular-buffer-vectors=10000 --max-outgoing-rtp-packet-size-bytes=1460 --outduct-type=udp --outgoing-rtp-port=$outgoing_rtp_port --outgoing-rtp-hostname=127.0.0.1 --inducts-config-file=$sink_config & + +sleep 3 + +# HDTN one process +./build/module/hdtn_one_process/hdtn-one-process --contact-plan-file=$HDTN_SOURCE_ROOT/module/router/contact_plans/contactPlanCutThroughMode_unlimitedRate.json --hdtn-config-file=$hdtn_config & + +sleep 6 + +# BpSendStream +incoming_rtp_port=6565 +./build/common/bpcodec/apps/bpsend_stream --use-bp-version-7 --bundle-rate=0 --bundle-size=200000 --my-uri-eid=ipn:1.1 --dest-uri-eid=ipn:2.1 --induct-type="udp" --max-incoming-udp-packet-size-bytes=1800 --num-circular-buffer-vectors=3000 --rtp-packets-per-bundle=20 --incoming-rtp-stream-port=$incoming_rtp_port --outducts-config-file=$gen_config & + +sleep 3 + +# GStreamer Pipeline to Start Streaming Video File with Audio +VIDEO_TO_STREAM_FILEPATH=$HDTN_SOURCE_ROOT/launch.mp4 +gst-launch-1.0 -e filesrc location=$VIDEO_TO_STREAM_FILEPATH \ + ! qtdemux name=demux \ + demux.video_0 ! queue ! h264parse ! mpegtsmux name=mux ! rtpmp2tpay ! udpsink host=127.0.0.1 port=$incoming_rtp_port \ + demux.audio_0 ! queue ! aacparse ! mux. & + +sleep infinity diff --git a/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_2_Nodes_Test/kill.sh b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_2_Nodes_Test/kill.sh new file mode 100644 index 000000000..964e8cda3 --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_2_Nodes_Test/kill.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +for j in hdtn-one-process bpsend_stream bprecv_stream +do +for i in `pidof $j` +do + kill -SIGINT $i +done +done + +sleep 6 + +for j in hdtn-one-process bpsend_stream bprecv_stream +do +for i in `pidof $j` +do + kill -9 $i +done +done diff --git a/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_2_Nodes_Test/runscript_receiver_va_h264_ltp_streaming.sh b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_2_Nodes_Test/runscript_receiver_va_h264_ltp_streaming.sh new file mode 100644 index 000000000..2c3439378 --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_2_Nodes_Test/runscript_receiver_va_h264_ltp_streaming.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# HDTN Path Variables +config_files=$HDTN_SOURCE_ROOT/config_files +hdtn_config=$config_files/hdtn/hdtn_Node2_ltp.json +sink_config=$config_files/inducts/bpsink_one_stcp_port4558_2NodesTest.json + + +cd $HDTN_SOURCE_ROOT + +# GStreamer Pipeline to Save RTP Stream to Disk +outgoing_rtp_port=8554 +gst-launch-1.0 -e udpsrc address=127.0.0.1 port=$outgoing_rtp_port ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)96" \ + ! tee name=t \ + t. ! rtpmp2tdepay ! queue ! tsparse ! filesink location=received.ts sync=false \ + t. ! queue ! udpsink host=127.0.0.1 port=8989 sync=false & + +sleep 2 + +# BpReceiveStream +./build/common/bpcodec/apps/bprecv_stream --my-uri-eid=ipn:2.1 --max-rx-bundle-size-bytes=70000 --num-circular-buffer-vectors=10000 --max-outgoing-rtp-packet-size-bytes=1460 --outduct-type=udp --outgoing-rtp-port=$outgoing_rtp_port --outgoing-rtp-hostname=127.0.0.1 --inducts-config-file=$sink_config & + +sleep 3 + +# HDTN one process +./build/module/hdtn_one_process/hdtn-one-process --contact-plan-file=$HDTN_SOURCE_ROOT/module/router/contact_plans/contactPlan2Nodes.json --hdtn-config-file=$hdtn_config & + +sleep infinity + + + diff --git a/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_2_Nodes_Test/runscript_sender_va_h264_ltp_streaming.sh b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_2_Nodes_Test/runscript_sender_va_h264_ltp_streaming.sh new file mode 100644 index 000000000..5d81a7472 --- /dev/null +++ b/tests/test_scripts_linux/Streaming/file_streaming/video_with_audio/Streaming_2_Nodes_Test/runscript_sender_va_h264_ltp_streaming.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# HDTN Path Variables +config_files=$HDTN_SOURCE_ROOT/config_files +hdtn_config=$config_files/hdtn/hdtn_Node1_ltp.json +gen_config=$config_files/outducts/bpgen_one_stcp_port4556_2NodesTest.json + + +cd $HDTN_SOURCE_ROOT + + +# HDTN one process +./build/module/hdtn_one_process/hdtn-one-process --contact-plan-file=$HDTN_SOURCE_ROOT/module/router/contact_plans/contactPlan2Nodes.json --hdtn-config-file=$hdtn_config & + +sleep 6 + +# BpSendStream +incoming_rtp_port=6565 +./build/common/bpcodec/apps/bpsend_stream --use-bp-version-7 --bundle-rate=0 --bundle-size=200000 --my-uri-eid=ipn:1.1 --dest-uri-eid=ipn:2.1 --induct-type="udp" --max-incoming-udp-packet-size-bytes=1800 --num-circular-buffer-vectors=3000 --rtp-packets-per-bundle=20 --incoming-rtp-stream-port=$incoming_rtp_port --outducts-config-file=$gen_config & + +sleep 3 + +# GStreamer Pipeline to Start Streaming Video File with Audio +VIDEO_TO_STREAM_FILEPATH=$HDTN_SOURCE_ROOT/launch.mp4 +gst-launch-1.0 -e filesrc location=$VIDEO_TO_STREAM_FILEPATH \ + ! qtdemux name=demux \ + demux.video_0 ! queue ! h264parse ! mpegtsmux name=mux ! rtpmp2tpay ! udpsink host=127.0.0.1 port=$incoming_rtp_port \ + demux.audio_0 ! queue ! aacparse ! mux. & + +sleep infinity From 5e756620835855256f7f7ee7b95a8886d37f523d Mon Sep 17 00:00:00 2001 From: "Kortas, Nadia 254326066" Date: Tue, 21 May 2024 17:02:55 -0400 Subject: [PATCH 3/5] Update README.md on how to Display received File Streams --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index ebc418dfa..92d8f79e8 100644 --- a/README.md +++ b/README.md @@ -279,6 +279,12 @@ The following command can be used to view video with audio for H264 Stream: ``` gst-launch-1.0 -v -e udpsrc address=127.0.0.1 port=8989 ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)96" ! rtpmp2tdepay ! queue ! tsparse ! decodebin ! autovideosink +``` +##### Displaying received File Stream + The following command can be used to play the received video file to compare it to the original file + +``` +ffplay ``` Web User Interface From 39a2ac2a9b56178bd6a638725ad9bddfbf43d6d2 Mon Sep 17 00:00:00 2001 From: "Kortas, Nadia 254326066" Date: Tue, 21 May 2024 17:50:18 -0400 Subject: [PATCH 4/5] Update README.md with HDTN requirements analysis --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 92d8f79e8..5996afd63 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ Delay Tolerant Networking (DTN) has been identified as a key technology to facil High-rate Delay Tolerant Networking (HDTN) takes advantage of modern hardware platforms to substantially reduce latency and improve throughput compared to today’s DTN operations. HDTN maintains compatibility with existing deployments of DTN that conform to IETF RFC 5050. At the same time, HDTN defines a new data format better suited to higher-rate operation. It defines and adopts a massively parallel pipelined and message-oriented architecture, allowing the system to scale gracefully as its resources increase. HDTN’s architecture also supports hooks to replace various processing pipeline elements with specialized hardware accelerators. This offers improved Size, Weight, and Power (SWaP) characteristics while reducing development complexity and cost. +The HDTN team has completed an extensive review of the major DTN protocols and specifications. Our requirements analysis is captured in [E-20225TM_Cover.indd (nasa.gov)](https://ntrs.nasa.gov/api/citations/20240004702/downloads/TM-20240004702.pdf). + Also see the [HDTN Wiki](https://github.com/nasa/HDTN/wiki) and the [HDTN User Guide](https://ntrs.nasa.gov/api/citations/20230015434/downloads/HDTN_Users_Guide_AfterEditor2.pdf) for more information. Architecture From 1c842e0a92bb4273c94ffd3de917ff7b48e42412 Mon Sep 17 00:00:00 2001 From: "Kortas, Nadia 254326066" Date: Tue, 21 May 2024 17:50:55 -0400 Subject: [PATCH 5/5] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 5996afd63..7da4c4b8a 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,7 @@ Delay Tolerant Networking (DTN) has been identified as a key technology to facil High-rate Delay Tolerant Networking (HDTN) takes advantage of modern hardware platforms to substantially reduce latency and improve throughput compared to today’s DTN operations. HDTN maintains compatibility with existing deployments of DTN that conform to IETF RFC 5050. At the same time, HDTN defines a new data format better suited to higher-rate operation. It defines and adopts a massively parallel pipelined and message-oriented architecture, allowing the system to scale gracefully as its resources increase. HDTN’s architecture also supports hooks to replace various processing pipeline elements with specialized hardware accelerators. This offers improved Size, Weight, and Power (SWaP) characteristics while reducing development complexity and cost. -The HDTN team has completed an extensive review of the major DTN protocols and specifications. Our requirements analysis is captured in [E-20225TM_Cover.indd (nasa.gov)](https://ntrs.nasa.gov/api/citations/20240004702/downloads/TM-20240004702.pdf). - -Also see the [HDTN Wiki](https://github.com/nasa/HDTN/wiki) and the [HDTN User Guide](https://ntrs.nasa.gov/api/citations/20230015434/downloads/HDTN_Users_Guide_AfterEditor2.pdf) for more information. +The HDTN team has completed an extensive review of the major DTN protocols and specifications. Our requirements analysis is captured in [E-20225TM_Cover.indd (nasa.gov)](https://ntrs.nasa.gov/api/citations/20240004702/downloads/TM-20240004702.pdf). Also see the [HDTN Wiki](https://github.com/nasa/HDTN/wiki) and the [HDTN User Guide](https://ntrs.nasa.gov/api/citations/20230015434/downloads/HDTN_Users_Guide_AfterEditor2.pdf) for more information. Architecture =============