Extracting webRTC Audio(RTP) from a Firefox session
This guide is useful if you are working with SharpenCare to troubleshoot audio issues using Sharpen Q phone. This process allows the gathering of RTP(media) from the browser webRTC traffic. This is necessary if you need to either have unencrypted RTP for quality analysis, or you need RTP captured at the browser rather than the network interface as tcpdump or Wireshark would accomplish. Currently the only known way to gather RTP from a browser session into a log is through Firefox. Follow the steps below to setup.
The instructions vary slightly for Windows, MacOS, and Linux, so make sure you choose the correct set of instructions below.
Windows
Open Command Prompt
Enter
md "%USERPROFILE%\Desktop\RTPLogs"
and press EnterThis creates a new directory on the user’s desktop, ‘RTPLogs’
Enter
set MOZ_LOG=timestamp,signaling:5,jsep:5,RtpLogger:5
and press EnterThis sets the logging levels for RTP and signaling
Enter
set MOZ_LOG_FILE=%USERPROFILE%\Desktop\RTPLogs\log.txt
and press EnterThis sets the logging destination path
Identify the path of your Firefox installation (most commonly C:\Program Files\Mozilla Firefox)
In the command prompt enter
cd C:\Program Files\Mozilla Firefox
and press EnterLaunch Firefox by entering
firefox.exe
and press EnterPerform your test
Close the browser
Navigate to the ‘RTPLogs’ directory on your desktop to find your log files
Select all files and add them to a new compressed zip file
Press and hold (or right-click) the file or folder, select (or point to) Send to, and then select Compressed (zipped) folder.
A new zipped folder with the same name is created in the same location.
Send the zip file to SharpenCare
MacOS
Open the terminal
Enter
cd
and press returnEnter
mkdir Documents\RTPLogs
and press returnThis creates a new directory on the user’s Documents directory, ‘RTPLogs’
Enter
export MOZ_LOG=timestamp,signaling:5,jsep:5,RtpLogger:5
and press returnThis sets the logging levels for RTP and signaling
Enter
export MOZ_LOG_FILE=~/Documents/RTPLogs/log.txt
and press returnThis sets the logging destination path
Identify the path of your Firefox installation (should be Applications/Firefox.app/Contents/MacOS)
In the terminal enter
cd /Applications/Firefox.app/Contents/MacOS
and press returnLaunch Firefox by entering
./firefox-bin
and press returnPerform your test
Close the browser
Navigate to the ‘RTPLogs’ directory in your Documents directory to find your log files
Select all files and add them to a new compressed zip file
Highlight and right-click the files and choose “Compress…”
A new zipped folder with the same name is created in the same location.
Send the zip file to SharpenCare
Linux
Open the terminal
Enter
cd
and press EnterEnter
cd Documents
and press EnterEnter
mkdir RTPLogs
and press EnterThis creates a new directory on the user’s Documents directory, ‘RTPLogs’
Enter
export MOZ_LOG=timestamp,signaling:5,jsep:5,RtpLogger:5
and press EnterThis sets the logging levels for RTP and signaling
Enter
export MOZ_LOG_FILE=~/Documents/RTPLogs/log.txt
and press EnterThis sets the logging destination path
Identify the path of your Firefox installation (commonly /usr/lib64/firefox)
In the terminal enter
cd /usr/lib64/firefox
and press EnterLaunch Firefox by entering
./firefox
and press EnterPerform your test
Close the browser
Navigate to the ‘RTPLogs’ directory in your Documents directory to find your log files
Select all files and add them to a new compressed zip file
Highlight and right-click the files and choose “Compress…”
A new zipped folder with the same name is created in the same location.
Send the zip file to SharpenCare