You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add H265 and AAC frames (#1962)
* aac and h265 frames
* update readme
* update cmake with h265 and aac
* clang formay
* [Sample] GStreamer media receiver (#1963)
* create the gst receiver
* fix ci
* cmake flag
* clang format, add cmake flag in ci
* install gstreamer on ci
* use macos12
* use defined values
* indent
* clang-format
* readme and commentsa
* clang :(
* install glib to fix ci
* -DCOMPILER_WARNINGS=FALSE to fix the CI
* fix macos version for clang
* address comments and cleanup
* new viewer with gst
* clang-format
* missing null check
* address comments
* -DCOMPILER_WARNINGS=TRUE
* clang-format
* gst_init_check
* fix CI
* fix CI
* [Bug] GStreamer sample (#1972)
* gst-sample-fix
* modify the message
* fix windows
* set to null
* fix pts and eos in sample
* unused var removed
* move null init
* Version check job (#1974)
* Version check job
* Working Version check template
* Retest with dev
* Version lint
* Version lint
* use new frames (#1978)
* Sample TWCC implementation (#1957)
* encoder bitrate change based on twcc
* Change to 5% inc and dec
* modify percentages
* ema based calc
* EMa fix
* Nits
* Readme
* flip
* memset remove
* Readme update, move enable flags to createSampleConfiguration
* Add codecov token
* [Feature] Add H265 support with SDP, RTP payloader-deplayloader (#1965)
* Add RtpH265Payloader.c and RtpH265Payloader.h
* Add support for H265 in PeerConnection/SessionDescription
* Add support for H265 in PeerConnection/PeerConnection
* Add support for H265 in PeerConnection/Rtp
* Add support for H265 in samples/Common.c
* Add support for H265 in samples/kvsWebRTCClientMaster.c
* rtp, sdp fix, flag removed, clang fixed, windows build fixed, new test added
* test fix
* cleanup
* cleanup
* remove #if 0
* clang
* presentation ts fix
* clang-format fix
* PKG_CONFIG_PATH in kvscommon
* missing bracket
* fix all builds
* ci
* cleanup
* fix windows build, rename h265 defs
* remove duplicate line from h264 and h265
* sample changes
* address comments
* clang-format
* gst sample
* cleanup args
* clang-format
* cleanup
* add sdp tests
* address comments
* address commentas
* set default payload type only once
* address comments
* fix height and width
* sdp change
---------
Co-authored-by: Hongli Wang <hongliwo@amazon.com>
* Version bump, fix tests, remove enableIceStats
* Remove AAC related changes
* Remove AAC frames
* Clang format
* fix kvsWebrtcClientMasterGstSample.c name in CMakeLists
---------
Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu>
Co-authored-by: Hongli Wang <hongliwo@amazon.com>
echo "Comparing PR Version: $PR_VERSION with Master Version: $MASTER_VERSION"
37
+
if [ "$MASTER_VERSION" == "$PR_VERSION" ]; then
38
+
echo "Please update the version in CMakeLists.txt file (project(KinesisVideoWebRTCClient VERSION <ver-string> LANGUAGES C). Any PR getting merged to master requires a version update"
Copy file name to clipboardexpand all lines: README.md
+108-4
Original file line number
Diff line number
Diff line change
@@ -268,15 +268,18 @@ After executing `make` you will have sample applications in your `build/samples`
268
268
#### Sample: kvsWebrtcClientMaster
269
269
This application sends sample H264/Opus frames (path: `/samples/h264SampleFrames` and `/samples/opusSampleFrames`) via WebRTC. It also accepts incoming audio, if enabled in the browser. When checked in the browser, it prints the metadata of the received audio packets in your terminal. To run:
Allowed audio-codec: opus (default codec if nothing is specified)
281
+
Allowed video-codec: h264 (default codec if nothing is specified), h265
282
+
280
283
#### Sample: kvsWebrtcClientMasterGstSample
281
284
This application can send media from a GStreamer pipeline using test H264/Opus frames, device `autovideosrc` and `autoaudiosrc` input, or a received RTSP stream. It also will playback incoming audio via an `autoaudiosink`. To run:
282
285
```shell
@@ -288,11 +291,59 @@ Pass the desired media and source type when running the sample. The mediaType ca
./samples/kvsWebrtcClientMasterGstSample <channelName> audio-video testsrc opus h264
302
+
```
303
+
304
+
Allowed audio-codec: opus (default codec if nothing is specified)
305
+
Allowed video-codec: h264 (default codec if nothing is specified), h265
291
306
292
307
#### Sample: kvsWebrtcClientViewer
293
-
This application accepts sample H264/Opus frames and prints them out. To run:
308
+
This application accepts sample H264/Opus frames by default. You can use other supported codecs by changing the value for `videoTrack.codec` and `audioTrack.codec` in _Common.c_. By default, this sample only logs the size of the audio and video buffer it receives. To write these frames to a file using GStreamer, use the _kvsWebrtcClientViewerGstSample_ instead.
Allowed audio-codec: opus (default codec if nothing is specified)
316
+
Allowed video-codec: h264 (default codec if nothing is specified), h265
317
+
318
+
#### Sample: kvsWebrtcClientViewerGstSample
319
+
This application is similar to the kvsWebrtcClientViewer. However, instead of just logging the media it receives, it generates a file using filesink. Make sure that your device has enough space to write the media to a file. You can also customize the receiving logic by modifying the functions in _GstAudioVideoReceiver.c_
Allowed audio-codec: opus (default codec if nothing is specified)
327
+
Allowed video-codec: h264 (default codec if nothing is specified), h265
328
+
329
+
##### Known issues:
330
+
Our GStreamer samples leverage [MatroskaMux](https://gstreamer.freedesktop.org/documentation/matroska/matroskamux.html?gi-language=c) to receive media from its peer and save it to a file. However, MatroskaMux is designed for scenarios where the media's format remains constant throughout streaming. When the media's format changes mid-streaming (referred to as "caps changes"), MatroskaMux encounters limitations, its behavior cannot be predicted and it may be unable to handle these changes, resulting in an error message like:
331
+
332
+
```shell
333
+
matroskamux matroska-mux.c:1134:gst_matroska_mux_video_pad_setcaps:<mux> error: Caps changes are not supported by Matroska
334
+
```
335
+
To address this issue, users need to adapt the pipeline to utilize components capable of managing dynamic changes in media formats. This might involve integrating different muxers or customizing the pipeline to handle caps changes effectively.
Transport Wide Congestion Control (TWCC) is a mechanism in WebRTC designed to enhance the performance and reliability of real-time communication over the internet. TWCC addresses the challenges of network congestion by providing detailed feedback on the transport of packets across the network, enabling adaptive bitrate control and optimization of media streams in real-time. This feedback mechanism is crucial for maintaining high-quality audio and video communication, as it allows senders to adjust their transmission strategies based on comprehensive information about packet losses, delays, and jitter experienced across the entire transport path.
407
+
408
+
The importance of TWCC in WebRTC lies in its ability to ensure efficient use of available network bandwidth while minimizing the negative impacts of network congestion. By monitoring the delivery of packets across the network, TWCC helps identify bottlenecks and adjust the media transmission rates accordingly. This dynamic approach to congestion control is essential for preventing degradation in call quality, such as pixelation, stuttering, or drops in audio and video streams, especially in environments with fluctuating network conditions.
409
+
410
+
To learn more about TWCC, check [TWCC spec](https://datatracker.ietf.org/doc/html/draft-holmer-rmcat-transport-wide-cc-extensions-01)
411
+
412
+
### Enabling TWCC support
413
+
414
+
TWCC is enabled by default in the SDK samples (via `pSampleConfiguration->enableTwcc`) flag. In order to disable it, set this flag to `FALSE`.
415
+
416
+
```c
417
+
pSampleConfiguration->enableTwcc = FALSE;
418
+
```
419
+
420
+
If not using the samples directly, 2 things need to be done to set up Twcc:
421
+
1. Set the `disableSenderSideBandwidthEstimation` to `FALSE`:
2. Set the callback that will have the business logic to modify the bitrate based on packet loss information. The callback can be set using `peerConnectionOnSenderBandwidthEstimation()`:
The certificate generating function ([createCertificateAndKey](https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-c/Dtls__openssl_8c.html#a451c48525b0c0a8919a880d6834c1f7f)) in createDtlsSession() can take between 5 - 15 seconds in low performance embedded devices, it is called for every peer connection creation when KVS WebRTC receives an offer. To avoid this extra start-up latency, certificate can be pre-generated and passed in when offer comes.
355
433
@@ -434,6 +512,32 @@ To disable threadpool, run `cmake .. -DENABLE_KVS_THREADPOOL=OFF`
434
512
435
513
Starting version 1.10.0, threadpool usage provides latency improvements in connection establishment. Note, that increasing the number of minimum threads can increase stack memory usage. So, ensure to increase with caution.
436
514
515
+
### Set up TWCC
516
+
TWCC is a mechanism in WebRTC designed to enhance the performance and reliability of real-time communication over the Internet. TWCC addresses the challenges of network congestion by providing detailed feedback on the transport of packets across the network, enabling adaptive bitrate control and optimization of
517
+
media streams in real-time. This feedback mechanism is crucial for maintaining high-quality audio and video communication, as it allows senders to adjust their transmission strategies based on comprehensive information about packet losses, delays, and jitter experienced across the entire transport path.
518
+
The importance of TWCC in WebRTC lies in its ability to ensure efficient use of available network bandwidth while minimizing the negative impacts of network congestion. By monitoring the delivery of packets across the network, TWCC helps identify bottlenecks and adjust the media transmission rates accordingly.
519
+
This dynamic approach to congestion control is essential for preventing degradation in call quality, such as pixelation, stuttering, or drops in audio and video streams, especially in environments with fluctuating network conditions. To learn more about TWCC, you can refer to the [RFC draft](https://datatracker.ietf.org/doc/html/draft-holmer-rmcat-transport-wide-cc-extensions-01)
520
+
521
+
In order to enable TWCC usage in the SDK, 2 things need to be set up:
522
+
523
+
1. Set the `disableSenderSideBandwidthEstimation` to FALSE. In our samples, the value is set using `enableTwcc` flag in `pSampleConfiguration`
524
+
525
+
```c
526
+
pSampleConfiguration->enableTwcc = TRUE; // to enable TWCC
527
+
pSampleConfiguration->enableTwcc = FALSE; // to disable TWCC
2. Set the callback that will have the business logic to modify the bitrate based on packet loss information. The callback can be set using `peerConnectionOnSenderBandwidthEstimation()`.
By default, our SDK enables TWCC listener. The SDK has a sample implementation to integrate TWCC into the Gstreamer pipeline via the `sampleSenderBandwidthEstimationHandler` callback. To get more details, look for this specific callback.
539
+
540
+
437
541
### Setting ICE related timeouts
438
542
439
543
There are some default timeout values set for different steps in ICE in the [KvsRtcConfiguration](https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-c/structKvsRtcConfiguration.html). These are configurable in the application. While the defaults are generous, there could be applications that might need more flexibility to improve chances of connection establishment because of poor network.
# copy sample frames to this subproject build folder, in case developer runs sample program with command `kvsWebrtcClientMaster` from `build/samples` dir.
0 commit comments