From 7a6a2ca2e7587380dce0d20c104a15f1e0886164 Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Mon, 16 Nov 2020 09:37:49 +0700 Subject: [PATCH 1/4] Always decode and reencode aac audio This is so that we can accept mpeg1 and mpeg2 audio in addition to mpeg4 --- src/gst.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gst.rs b/src/gst.rs index d826c8c..bc63e6e 100644 --- a/src/gst.rs +++ b/src/gst.rs @@ -86,7 +86,7 @@ impl GstOutputs { let launch_aud = match self.audio_format { Some(StreamFormat::ADPCM) => "! queue silent=true max-size-bytes=10485760 min-threshold-bytes=1024 ! rawaudioparse format=pcm pcm-format=s16le sample-rate=8000 num-channels=1 interleaved=true ! audioconvert ! rtpL16pay name=pay1", // DVI4 is converted to pcm in the appsrc - Some(StreamFormat::AAC) => "! queue silent=true max-size-bytes=10485760 min-threshold-bytes=1024 ! aacparse ! rtpmp4apay name=pay1", + Some(StreamFormat::AAC) => "! queue silent=true max-size-bytes=10485760 min-threshold-bytes=1024 ! aacparse ! decodebin ! audioconvert ! rtpmp4apay name=pay1", _ => "! fakesink", }; From bbc176e9f7f9c654421177bfc9acd98091860d8a Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Tue, 17 Nov 2020 10:14:17 +0700 Subject: [PATCH 2/4] Convert to raw then send as raw over rtsp --- src/gst.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gst.rs b/src/gst.rs index bc63e6e..1b4cf4d 100644 --- a/src/gst.rs +++ b/src/gst.rs @@ -86,7 +86,7 @@ impl GstOutputs { let launch_aud = match self.audio_format { Some(StreamFormat::ADPCM) => "! queue silent=true max-size-bytes=10485760 min-threshold-bytes=1024 ! rawaudioparse format=pcm pcm-format=s16le sample-rate=8000 num-channels=1 interleaved=true ! audioconvert ! rtpL16pay name=pay1", // DVI4 is converted to pcm in the appsrc - Some(StreamFormat::AAC) => "! queue silent=true max-size-bytes=10485760 min-threshold-bytes=1024 ! aacparse ! decodebin ! audioconvert ! rtpmp4apay name=pay1", + Some(StreamFormat::AAC) => "! queue silent=true max-size-bytes=10485760 min-threshold-bytes=1024 ! aacparse ! decodebin ! audioconvert ! rtpL16pay name=pay1 name=pay1", _ => "! fakesink", }; From a598ddd2a4100534e51f1f91ff6dfb6e09ceade0 Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Tue, 17 Nov 2020 10:37:13 +0700 Subject: [PATCH 3/4] Using new github set path and env --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 27a6601..f44f1d5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,8 +22,8 @@ jobs: choco install -y --no-progress gstreamer --version=1.16.2.20200527 choco install -y --no-progress gstreamer-devel --version=1.16.2 echo "Updating Cargo environment" - echo "::add-path::C:\gstreamer\1.0\x86_64\bin" - echo "::set-env name=GSTREAMER_1_0_ROOT_X86_64::C:\gstreamer\1.0\x86_64\" + echo "C:\gstreamer\1.0\x86_64\bin" >> $GITHUB_PATH + echo "GSTREAMER_1_0_ROOT_X86_64=C:\gstreamer\1.0\x86_64\" >> $GITHUB_ENV - name: Cache cargo registry uses: actions/cache@v1 with: From a8a727a2488a3bc6b6c495881e56a89c79fdfeb3 Mon Sep 17 00:00:00 2001 From: QuantumEntangledAndy Date: Thu, 26 Nov 2020 13:17:15 +0700 Subject: [PATCH 4/4] Use powershell syntax for setting envs for new github api methods Co-Authored-By: twistedddx --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f44f1d5..fa00f76 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,8 +22,8 @@ jobs: choco install -y --no-progress gstreamer --version=1.16.2.20200527 choco install -y --no-progress gstreamer-devel --version=1.16.2 echo "Updating Cargo environment" - echo "C:\gstreamer\1.0\x86_64\bin" >> $GITHUB_PATH - echo "GSTREAMER_1_0_ROOT_X86_64=C:\gstreamer\1.0\x86_64\" >> $GITHUB_ENV + echo "C:\gstreamer\1.0\x86_64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + echo "GSTREAMER_1_0_ROOT_X86_64=C:\gstreamer\1.0\x86_64\" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Cache cargo registry uses: actions/cache@v1 with: