Media Debugging Tips
Diagnosing and Reporting Media Playback Issues in Firefox
Basic Media Playback Issues
For simple playback issues (videos on popular sites that fail to play back properly), the first place to start is to check the web developer console for error messages related to format issues. If you see messages here related to media playback errors, please file a Bugzilla report, note any errors you see in the console, and please include the URL to the audio or video you're experiencing issues with.
Share Your about:support Text
When filing a Bugzilla bug, please post your about:support text. This provides a great deal of information about your graphics hardware, video hardware support, and much more.
1) Open a tab and visit about:support
2) Click 'Copy Text to Clipboard'
3) Paste this text in your Bugzilla bug comment and post.
Playback Performance Issues
Generating Performance Profiles
For playback performance issues and general media playback problems, capturing and reporting a Firefox Performance Profile can help Mozilla developers diagnose the issue. Please visit profiler.firefox.com to access the profiling feature in Firefox. We also have a Firefox Profiler Getting Started Guide to learn how to record a profile.
Profiler Quick Start
1) Visit https://profiler.firefox.com/ and enable the Profiler toolbar button
2) Click the toolbar button down arrow and select 'Media' in the Settings drop down.
3) Open a tab and visit the page with the affected media content.
4) Click the Profiler toolbar main button to start recording.
5) Play the media until the issue you are seeing manifests.
6) Click the Profiler toolbar button again to stop recording.
7) When a new Profile tab opens, click the upload profile button on the upper right.
8) Copy the resulting profile URL and post this to your Bugzilla report.
Youtube Stats For Nerds
For Youtube playback performance issues, right click the video and select Stats for Nerds. You can select the text in this panel and post it your Bugzilla bug, or grab a screenshot using the Firefox screenshot tool and add the resulting image as an attachment to your bug. This information can be informative for engineers in understanding what video format and resolution you are viewing.
Advanced Diagnosis Through Logging
In some cases developers will ask reporters to capture detailed media performance profiles and processing logs. This can help diagnose low level content format problems or incompatibilities. If you have already reported a bug in Bugzilla, you can capturing detailed logging as well to help Mozilla engineers diagnose the problem.
Collecting Logs in Media Performance Profiles
General testing setup steps
- Install Firefox Nightly on the test device and open the browser. The test device should be a clean system that has not had Firefox installed on it prior. If the test device does have existing Firefox installs, open Firefox Nightly using the command line console and use the -p command line parameter. This will open the profile manager window. Create a new profile for testing purposes, which can be deleted after testing is complete. On Mac, …
On Linux, … - Once Firefox is open and running in a clean profile, check for browser updates via the Help menu -> About option. If there are browser updates available, apply them and then restart the browser.
- Once Firefox is open and running in a clean profile with updates applied, open a tab and visit https://profiler.firefox.com/ and enable the Firefox Profiler Button. In the dropdown menu on the button, select the 'Media' setting. Close Firefox Nightly. (For general information on how to use the profiler, visit the documentation site.)
Generating a Firefox Performance Profile with media logs
- Open the browser with your test profile.
- Open a tab and visit https://profiler.firefox.com/ and enable the Firefox Profiler Button. In the dropdown menu on the button, select the 'Media' setting.
- Open a tab and visit about:logging
- In the 'Logging preset:' drop down select 'Media Playback'
- Click 'Start Logging' at the top of the page
- Reproduce the issue
- Go back to the about:logging page and click 'Stop logging'. (In a moment, a new performance profile tab will open.)
- Share the profile (top right of the performance tab) and copy the resulting url.
Share this url in Bugzilla for engineers to analyze.
These instructions in video: https://paul.cx/public/about-logging-presentation.webm
DRM Related Logging Steps
For DRM content (Amazon Prime, Netflix) it can be helpful to generate EME related logging. The steps to produce these logs are bit more involved compared to basic media playback logging but are worth the effort when tracking down these types of issues. Try these steps:
The 'GMP' and 'EME' moz log modules are useful when debugging streaming service related issues. Generating these logs is a bit involved though.
Logs are generated for both the browser and gmp child processes. When debugging on Windows, the gmp sandbox needs to be disabled for the logging feature to access the file system (see below).
Platform Specifics
- On Windows, Firefox will install by default under C:\Program Files\Firefox Nightly.
General testing setup steps -
- Install Firefox Nightly on the test device and open the browser. The test device should be a clean system that has not had Firefox installed on it prior. If the test device does have existing Firefox installs, open Firefox Nightly using the command line console and use the -p command line parameter. This will open the profile manager window. Create a new profile for testing purposes, which can be deleted after testing is complete. On Mac, …
On Linux, … - Once Firefox is open and running in a clean profile, check for browser updates via the Help menu -> About option. If there are browser updates available, apply them and then restart the browser.
- Once Firefox is open and running in a clean profile with updates applied, open a tab and visit https://profiler.firefox.com/ and enable the Firefox Profiler Button. In the dropdown menu on the button, select the 'Media' setting. Close Firefox Nightly. (For general information on how to use the profiler, visit the documentation site.)
Generating a Firefox Profile with logs -
- Open a command line console and browse to the install location for Firefox Nightly.
- On Windows, enter 'set MOZ_DISABLE_GMP_SANDBOX=1'(return)
- Launch Firefox using a clean profile from the command console (firefox.exe (return) or firefox.exe -p (return))
In the browser, open a tab and view about:logging
- Enter 'timestamp,sync,GMP:5,EME:5' in the 'new log modules' text edit and click on 'Set Log Modules'
- Under Output choose 'Logging to the Firefox Profiler' and check the 'Enable stack traces for log messages' checkbox.
- Open an additional tab and visit a Widevine test site (http://shaka-player-demo.appspot.com/) or log into a streaming provider like Netflix.
- In about:logging, click the 'Start Logging' button, then click the Firefox Profiler toolbar button to start recording. (The button should highlight when a recording is taking place.)
- Return to the test site and play a stream past a point where the issue occurs.
- Close the test tab, and click the Firefox Profiler toolbar button to stop recording.
- Wait approximately 10 - 20 seconds for a new tab to open containing the profile.
- Within the profiler tab click the 'upload local p[rofile' button on the upper right side of the tab. Once the upload is complete, a drop down menu 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.
Generating text based logs in a local folder -
- Open a command line console and browse to the install location for Firefox Nightly.
- On Windows, enter 'set MOZ_DISABLE_GMP_SANDBOX=1'(return)
- Launch Firefox using a clean profile from the command console (firefox.exe (return) or firefox.exe -p (return))
- In the browser, open a tab and view about:logging
- Enter 'timestamp,sync,GMP:5,EME:5' in the 'new log modules' text edit and click on 'Set Log Modules'
- Select the 'Logging to a file' radio button
- Choose an appropriate path for log output.
Note, on Windows, change any default 'AppData\Local\' path to a 'AppData\LocalLow\' path so that content processes can access the file system. For example:
C:\Users\(username)\AppData\LocalLow\Temp\emelogs - Click the 'Set Log File' button.
- Click the 'Start Logging' button.
- Open a test tab and play the media past a point where the issue occurs.
- Close the test tab
- In about:logging, click 'Stop Logging'.
In the temp dir, you should get a few logs (something like 'emelogs.txt-child.23884.moz_log' and 'emelog.txt-main.23435.moz_log'. Attach logs to your Bugzilla report.