- 1 Reporting WebRTC Call Issues
- 2 Diagnosing Call Quality Issues
- 3 Performance Profiling and Logging
- 4 Examining Call Performance Issues
- 5 Enabling Call Stats History
- 6 Dumping Call Stats
- 7 Debugging Encrypted Packets
- 8 Running WebRTC Tests
- 9 Debugging Using 3rd Party Websites
- 10 Using RR And/Or Pernosco
Reporting WebRTC Call Issues
The best way to report an issue is through Bugzilla using this link. Describing the issue you've run into, and include a URL along, with the details of the call setup.
For simple issues, the first place to look is to check the web developer console for error messages related to media format issues. If you see messages here related to WebRTC, getUserMedia, or getDisplayMedia, please add this information to your bug.
In your Bugzilla report, please include support information about the current device you are seeing an issue on -
- Open a tab and visit about:support
- Click 'Copy Text to Clipboard'
- Paste this text in your Bugzilla bug comment and post.
For issues with call quality, please share web conferencing related performance information by providing your about:webrtc information. Note this information should be collected while the call in question is still active.
- While your call is still ongoing, open an additional tab and visit about:webrtc.
- Click "Clear History" to clear the stats from other recent calls which are no longer ongoing.
- At the bottom of the page click 'Save Page', and save this file.
- Add this file as an attachment to your bug.
This data contains statistics about your call, the signalling that was used to setup your call, and information about the network transports.
Diagnosing Call Quality Issues
About Webrtc Overview
This section will contain screen shots of about:webrtc and description of each of the sections. This information needs to be referenced from multiple places later in the wikipage.
Delayed media is commonly caused by long physical paths between endpoints, though anything that slows down inter-hop delivery of packets can be at fault. Note that this is different than the bandwidth of the network path, and a high latency will not be fixed by reducing the video resolution or audio sample rate. Round trip time, or RTT, is the time it takes for a packet to get from the sender to the receiver and then for a packet to get from the receiver back to the sender. If the path is symmetric between the two endpoints one can assume that the one way delay is half the delay of the round trip.
The second common cause of A/V delay is jitter, the magnitude of variability in packet inter-arrival times. In order to smoothly play out of the incoming stream a receiver experiencing jitter will have to buffer (delay) incoming packets.
Using [about:webrtc] to Diagnose Delay
The key metrics in [about:webrtc] are RTT (round-trip-time) and jitter. They can be found in the RTP stats section of the PeerConnection. The PeerConnection informational blocks start out in a minimized state, and one will need to expand a block to find the RTP stats section:
Once expanded one can locate the RTP Stats section and find the key diagnostic stats:
In this image we can see that there are 0 milliseconds of jitter, and 32 milliseconds of round trip delay. This call should not be experiencing any noticeable delay. For all intents and purposes jitter and RTT are additive in nature. If there was 25ms of jitter reported and a RTT of 272ms, one could estimate the expected delay from transmission at the send side to play out on receive side to be
25ms + (272ms / 2) = 161ms If the perceived delay is larger than the estimated delay that could indicate a problem within Firefox that requires debugging. Under these circumstances it would be helpful to grab a JSON copy of the current stats by pressing the "Copy Report" button, pasting those stats into your Bugzilla bug report.
Performance Profiling and Logging
Capturing a Firefox Performance Profile
For basic performance issues, a performance profile can help engineers diagnose issues with video formats, performance, and rendering.
- Visit https://profiler.firefox.com/ and enable the Profiler toolbar button.
- Click the toolbar button down arrow and select 'Media' in the Settings drop down.
- Open a tab and visit the page with the affected media content.
- Click the Profiler toolbar main button to start recording.
- Play media until the issue you are seeing manifests.
- Click the Profiler toolbar button again to stop recording.
- When a new Profile tab opens, click the upload profile button on the upper right.
- Copy the resulting profile URL and post this to your Bugzilla report.
Additionally, detailed logging can be collected within performance profiles to help aid in debugging complicated issues. To enable the collection of a profile with low level debugging -
- Visit https://profiler.firefox.com/ and enable the Profiler toolbar button.
- In a new tab, visit about:webrtc. Click the 'Enable WebRTC Log Preset' button, which will open a tab for about:logging with prepopulated information.
- In about:logging, click the "Start Logging" button. (You are now recording a profile, the profiler toolbar toggle button should be selected automatically.)
- Open a new tab for testing and view the media you are having an issue with. (After reproducing, DO NOT close this test tab yet.)
- Switch to the about:logging tab, click 'Stop logging', and then close the test tab.
- Wait approximately 10 - 20 seconds for a new tab to automatically open containing the generated performance profile.
- Within the upper-right side of the profiler tab click the 'upload local profile' button to initiate profile upload. Once the upload is complete, a drop down text edit will open displaying the URL of the profile. Select this text and copy it.
- Share the URL of the profile for analysis with the engineer you are working with.
Standard Logging Modules
|jsep||signalling||JSEP state machine|
|RTCRtpReceiver||JS API||JS API related to receiving media and media control packets|
|RTCRtpSender||JS API||JS API related to sending media and media control packets|
|RTCDMTFSender||JS API||JS API related to sending DTMF messages|
|CamerasChild||media capture||Content process end of IPC channel for receiving frames from media capture devices|
|CamerasParent||media capture||Parent process end of IPC channel for sending frames from media capture devices|
|VideoEngine||media capture||Orchestrates capture of frames from media capture devices in the parent process|
|ShmemPool||media capture||Object pool of shared memory frame buffers for transferring media capture frames from parent to child process|
|MediaPipeline||network||Glue code between transport, media, and libwebrtc components|
|PeerConnectionImpl||JS API||implements the RTCPeerConnection object|
|webrtc_trace||webrtc||libwebrtc logging||needs to be enabled from [about:webrtc]|
|RTCRtpTransceiver||JS API||implements the RTCRtpTransceiver object|
Non-standard Logging Modules
|RTPLogger||network||See Debugging Encrypted Packets|
Examining Call Performance Issues
Enabling Call Stats History
Call stats history is enabled by default in Nightly. To enable in release builds open [about:config], and change "media.aboutwebrtc.hist.enabled" to true. This will keep a history windows of stats for a number of recent calls, allowing for inspection in [about:webrtc] after a call has completed.
Dumping Call Stats
One can dump a JSON blob of call stats for an active call, or a recent call if call stats history is enabled. There are two buttons in [about:webrtc] to do this, "Copy Report" and "Copy Report History". The former will create a copy of the most recent stats for the PeerConnection. The later will copy all the history of stats reports that [about:webrtc] has accumulated for that PeerConnection, this can be up to several minutes of stats.
Debugging Encrypted PacketsThere is a blog post covering dumping unencrypted partial RTP and RTCP packets in the logs. This allows one to manipulate those log statements into something that Wireshark can read. The command to extract the packet data in the blog is out of date. The logs produced by this module can be quite large, making it easy to identify by file size which child log file(s) contains the dump(s). Use the following command instead
Running WebRTC Tests
MochitestsRunning the WebRTC mochitests can be done through
mach. On try WebRTC mochitests are part of the
mediasub- suite. They can be run as follows:
./mach try fuzzy --query 'mochitest-media'
Web Platform Tests
Web Platform Tests can be run locally from
./mach wpt testing/web-platform/tests/webrtc
./mach try fuzzy --query 'wpt'
One can run those same tests in Chromium if one needs to compare behavior between browsers.