Media/WebRTC/WebRTC Debugging: Difference between revisions

nit
m (nit)
(nit)
Line 50: Line 50:
[[File:About webrtc copy report.png|800px|border|Location in about:webrtc of Copy Report button]]
[[File:About webrtc copy report.png|800px|border|Location in about:webrtc of Copy Report button]]


==Logging & Profiling==
==Performance Profiling and Logging==


Logging can be enabled through the "Enable WebRTC Log Preset" button at the bottom of [about:webrtc]. Alternatively one can set the following environment variable:<syntaxhighlight lang="sh">MOZ_LOG="jsep:5,sdp:5,signaling:5,mtransport:5,RTCRtpReceiver:5,RTCRtpSender:5,RTCDMTFSender:5,VideoFrameConverter:5,WebrtcTCPSocket:5,CamerasChild:5,CamerasParent:5,VideoEngine:5,ShmemPool:5,TabShare:5,MediaChild:5,MediaParent:5,MediaManager:5,MediaTrackGraph:5,cubeb:5,MediaStream:5,MediaStreamTrack:5,DriftCompensator:5,ForwardInputTrack:5,MediaRecorder:5,MediaEncoder:5,TrackEncoder:5,VP8TrackEncoder:5,Muxer:5,GetUserMedia:5,MediaPipeline:5,PeerConnectionImpl:5,WebAudioAPI:5,webrtc_trace:5,RTCRtpTransceiver:5,ForwardedInputTrack:5,HTMLMediaElement:5,HTMLMediaElementEvents:5"</syntaxhighlight> Note that webrtc_trace will not be active until "Enable WebRTC Log Preset" is pressed.
===Capturing a Firefox Performance Profile===


===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.
# Visit https://profiler.firefox.com/ and enable the Profiler toolbar button.
Line 64: Line 64:
# When a new Profile tab opens, click the upload profile button on the upper right.
# 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.
# 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, <b>DO NOT</b> 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.
Alternatively one can set the following environment variable:<syntaxhighlight lang="sh">MOZ_LOG="jsep:5,sdp:5,signaling:5,mtransport:5,RTCRtpReceiver:5,RTCRtpSender:5,RTCDMTFSender:5,VideoFrameConverter:5,WebrtcTCPSocket:5,CamerasChild:5,CamerasParent:5,VideoEngine:5,ShmemPool:5,TabShare:5,MediaChild:5,MediaParent:5,MediaManager:5,MediaTrackGraph:5,cubeb:5,MediaStream:5,MediaStreamTrack:5,DriftCompensator:5,ForwardInputTrack:5,MediaRecorder:5,MediaEncoder:5,TrackEncoder:5,VP8TrackEncoder:5,Muxer:5,GetUserMedia:5,MediaPipeline:5,PeerConnectionImpl:5,WebAudioAPI:5,webrtc_trace:5,RTCRtpTransceiver:5,ForwardedInputTrack:5,HTMLMediaElement:5,HTMLMediaElementEvents:5"</syntaxhighlight> Note that webrtc_trace will not be active until "Enable WebRTC Log Preset" is pressed.


===Standard Logging Modules===
===Standard Logging Modules===
Line 142: Line 155:
|-  
|-  
|}
|}
===Non-standard Logging Modules===
===Non-standard Logging Modules===
{| class="wikitable sortable"
{| class="wikitable sortable"
Line 149: Line 163:
| RTPLogger || network || See [[#Debugging_Encrypted_Packets|Debugging Encrypted Packets]]
| RTPLogger || network || See [[#Debugging_Encrypted_Packets|Debugging Encrypted Packets]]
|}
|}
==Profiling==
==Profiling==
One can use the "WebRTC" preset on the [about:logging] page with the [https://profiler.firefox.com/ Firefox Performance Profiler].
One can use the "WebRTC" preset on the [about:logging] page with the [https://profiler.firefox.com/ Firefox Performance Profiler].
Confirmed users
1,983

edits