bwe-test

module
v0.0.0-...-709ca8f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2026 License: MIT

README


Pion Bandwidth Estimation Test Runner

Test runner for congestion control and bandwidth estimation algorithms in Pion

Pion webrtc join us on Discord Follow us on Bluesky
GoDoc Coverage Status Go Report Card


This repository implements the test cases for congestion control for interactive real-time media described in RFC8867 for the algorithm(s) implemented in Pion.

Implemented/Planned Test Cases and Applications

The current implementation uses vnet.Net from pion/transport to simulate network constraints. There are three test applications:

  1. Simulcast-like setup - Uses a simple simulcast configuration
  2. Adaptive bitrate streaming - Uses synthetic encoder for adaptive bitrate
  3. Video file reader - Reads numbered JPG image files and sends them as video frames

Video File Reader

The video file reader (VideoFileReader) reads series of numbered JPG image files (e.g., frame_000.jpg, frame_001.jpg, etc.) from a directory and sends them as individual video frames using an RTCSender. This allows testing with real video content while maintaining precise control over frame timing and network conditions.

To use the video file reader test:

  • Create directories with numbered JPG files (e.g., ../sample_videos_0/, ../sample_videos_1/)
  • Files should be named with sequential numbers (frame_000.jpg, frame_001.jpg, etc.)
  • The reader automatically discovers, sorts, and cycles through the frames

To run the simulcast test, you must create three input video files as described in the bandwidth-esimation-from-disk example and place them in the vnet directory.

  • Variable Available Capacity with a Single Flow

  • Variable Available Capacity with Multiple Flows

  • Dual Video Tracks with Variable Available Capacity - Uses video file reader with multiple video tracks

  • Congested Feedback Link with Bi-directional Media Flows

  • Competing Media Flows with the Same Congestion Control Algorithm

  • Round Trip Time Fairness

  • Media Flow Competing with a Long TCP Flow

  • Media Flow Competing with Short TCP Flows

  • Media Pause and Resume

  • Media Flows with Priority

  • Explicit Congestion Notification Usage

  • Multiple Bottlenecks

Evaluation

RFC 8868 describes guidelines to evaluate congestion control algorithms for interactive real-time media. Currently, live statistics can be viewed during the test run via a web interface. In future, we might automate the evaluation.

Running

To run the tests, run go test -v ./vnet/.

To run the main test application with all test cases (including the video file reader test):

cd vnet
go run .

The application will run multiple test scenarios including:

  • ABR (Adaptive Bitrate) tests with single and multiple flows
  • Simulcast tests with single and multiple flows
  • Video file reader test with dual video tracks (requires sample video directories)

Video File Reader Test Requirements

Dependencies:

  • Test depends on libvpx-dev library. The procedure to install the library on linux machine is:
    sudo apt-get update
    sudo apt-get install -y libvpx-dev pkg-config
    

Video Preparation:

  • User needs to first decode two videos into sequenced jpg files and put the files under sample_videos_0 and sample_videos_1 directories
  • The command to use ffmpeg to decode the video is as follows:
    mkdir -p sample_videos_0
    ffmpeg -i /path/to/input/video0.mp4 -vsync 0 sample_videos_0/frame_%04d.jpg
    
    mkdir -p sample_videos_1
    ffmpeg -i /path/to/input/video1.mp4 -vsync 0 sample_videos_1/frame_%04d.jpg
    

Roadmap

The library is used as a part of our WebRTC implementation. Please refer to that roadmap to track our major milestones.

Community

Pion has an active community on the Discord.

Follow the Pion Bluesky or Pion Twitter for project updates and important WebRTC news.

We are always looking to support your projects. Please reach out if you have something to build! If you need commercial support or don't want to use public methods you can contact us at team@pion.ly

Contributing

Check out the contributing wiki to join the group of amazing people making this project possible

License

MIT License - see LICENSE for full text

Directories

Path Synopsis
cmd
simple-receiver command
Package main provides a simple HTTP receiver for testing the realtime encoder integration example.
Package main provides a simple HTTP receiver for testing the realtime encoder integration example.
Package main provides an example of integrating real-time frame pushing with BWE testing using RTCSender.
Package main provides an example of integrating real-time frame pushing with BWE testing using RTCSender.
internal
sequencenumber
Package sequencenumber provides a sequence number unwrapper
Package sequencenumber provides a sequence number unwrapper
Package logging provides utilities for logging in bandwidth estimation tests.
Package logging provides utilities for logging in bandwidth estimation tests.
Package receiver implements WebRTC receiver functionality for bandwidth estimation tests.
Package receiver implements WebRTC receiver functionality for bandwidth estimation tests.
Package sender implements WebRTC sender functionality for bandwidth estimation tests.
Package sender implements WebRTC sender functionality for bandwidth estimation tests.
Package syncodec provides synthetic codec implementations for bandwidth estimation tests.
Package syncodec provides synthetic codec implementations for bandwidth estimation tests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL