Media Debugging Tips
Diagnosing and Reporting Media Playback Issues in Firefox
Basic Media Playback Issues
For starters, file a bug report in Bugzilla describing the issue you've run into. Please include a URL to or sample of the audio or video you're experiencing issues with. Below are some additional steps you can take to help.
For simple playback issues (videos on popular sites that fail to play back properly), 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 media playback errors, please add this information to your bug report.
Share Your about:support Text
- Open a tab and visit about:support
- Click 'Copy Text to Clipboard'
- Paste this text in your Bugzilla bug comment and post.
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.
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.
GMP Plugin JS Console Update Logs
The Firefox JS code that downloads and installs GMP updates from balrog can be made to log to the Browser Console (Ctrl + Shift + J) by setting the pref media.gmp.log.level to 5.
Plugin Update debugging steps for users -
- open the browser console
- visit about:config and enable logging by creating the numeric pref 'media.gmp.log.level' set to 5
- delete the 'media.gmp-manager.lastCheck' pref completely.
Then restart (the browser console should open back up) and wait a bit. You should get logs related to an openh264 and widevine update check.
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 Firefox 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 and open about:profiles. Create a new profile for testing purposes, and launch a browser using this profile.
- 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
- Launch Firefox using a clean profile via about:profiles
- 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.)
- Within the profiler tab click the 'upload local profile' 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.
These instructions in video: https://paul.cx/public/about-logging-presentation.webm
Gecko Media Plugin Logging Collection
For DRM content (Amazon Prime, Netflix) it can be helpful to generate EME related logging. Logs are generated for both the browser and Gecko Media Plugin (GMP) child processes. The steps to produce these logs are bit more involved compared to basic media playback logging but are worth the effort when tracking down drm related issues.
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 and open about:profiles. Create a new profile for testing purposes, and launch a browser using this profile.
- 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
- Launch Firefox using a clean profile via about:profiles
- 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.
- In about:logging, click the 'Start Logging' button.
- Open an additional tab and view the media you are having an issue with.
- 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 profile' 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.