Media Debugging Tips: Difference between revisions

m
m (clarify steps / formatting)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Diagnosing and Reporting Media Playback Issues in Firefox =
= Diagnosing and Reporting Media Playback Issues in Firefox =


== Basic Media Playback Issues ==
== Reporting Basic Media Playback Issues ==


For starters, file a [https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=Audio%2FVideo 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 starters, file a [https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=Audio%2FVideo 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. Also please check the [https://firefox-source-docs.mozilla.org/devtools-user/web_console/ 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.


For simple playback issues (videos on popular sites that fail to play back properly), the first place to look is to check the [https://firefox-source-docs.mozilla.org/devtools-user/web_console/ 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'''


'''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.


# Open a tab and visit about:support<br />
# Click 'Copy Text to Clipboard'<br />
# Paste this text in your Bugzilla bug comment and post.<br />
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.
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.
== Acceleration Support for Media ==
[[File:Hardware support information.png|thumb|center]]
Currently you can inspect hardware acceleration support using [[about:support]] information. Page down to the Media section and check the 'Codec Support Information' section. If you feel this information does not reflect the capabilities of your device, please file a bug and include your about:support text.


== Playback Performance Issues ==
== Playback Performance Issues ==
Line 22: Line 27:
==== Profiler Quick Start ====
==== Profiler Quick Start ====


1) Visit https://profiler.firefox.com/ and enable the Profiler toolbar button<br />
# 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.<br />
# 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.<br />
# Open a tab and visit the page with the affected media content.
4) Click the Profiler toolbar main button to start recording.<br />
# Click the Profiler toolbar main button to start recording.
5) Play the media until the issue you are seeing manifests.<br />
# Play the media until the issue you are seeing manifests.
6) Click the Profiler toolbar button again to stop recording.<br />
# 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.<br />
# 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.<br />
# Copy the resulting profile URL and post this to your Bugzilla report.


=== Youtube Stats For Nerds ===
=== Youtube Stats For Nerds ===
Line 58: Line 63:


# Install [https://www.mozilla.org/en-US/firefox/channel/desktop/ 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 [https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles new profile for testing purposes], and launch a browser using this profile.
# Install [https://www.mozilla.org/en-US/firefox/channel/desktop/ 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 [https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles 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 Nightly 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. (For general information on how to use the profiler, visit the documentation site.)
# Once Firefox Nightly 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. For general information on how to use the profiler, visit the [https://profiler.firefox.com/docs/#/ Profiler documentation site].
 
'''Generating a Firefox Performance Profile with media logs'''
'''Generating a Firefox Performance Profile with media logs'''


# Launch Firefox using a clean profile via about:profiles
# Launch Firefox with a clean profile. Use about:profiles for existing installs (see above).
# Open a tab and visit about:logging
# In Firefox, open a tab and view <b>about:logging</b>.
# In the 'Logging preset:' drop down select 'Media Playback'
# In the 'Logging preset:' drop down select 'Media Playback'
# Click 'Start Logging' at the top of the page
# 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.)
# 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.)
# Go back to the about:logging tab and click 'Stop logging' and close the test tab. (After a moment, a new performance profile tab will open.)
# Switch to the about:logging tab, click 'Stop logging', and then close the test tab.
# 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.
# 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.
# Share the URL of the profile for analysis with the engineer you are working with.


Line 76: Line 81:
=== Gecko Media Plugin Logging Collection ===
=== 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.
For DRM content playback issues (example sites: Amazon Video, Disney+, Hulu, Netflix, Spotify) it can be helpful to generate Encrypted Media Extensions (EME) related logging. EME logs are generated for the web page and the secure Gecko Media Plugin (GMP) module that handles DRM licensing and decryption.
 
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'''
'''General testing setup steps'''


# Install [https://www.mozilla.org/en-US/firefox/channel/desktop/ 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 [https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles new profile for testing purposes], and launch a browser using this profile.
# Install [https://www.mozilla.org/en-US/firefox/channel/desktop/ 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 [https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles 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 Nightly 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. For general information on how to use the profiler, visit the documentation site.
# Once Firefox Nightly 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. For general information on how to use the profiler, visit the [https://profiler.firefox.com/docs/#/ Profiler documentation site].


'''Generating a Firefox Profile with logs'''
'''Generating a Firefox Profile with logs'''


# Launch Firefox using a clean profile via about:profiles.
# Launch Firefox with a clean profile. Use about:profiles for existing installs (see above).  
# In the browser, open a tab and view about:config.
# In Firefox, open a tab and view <b>about:config</b>.
# Enter <b>media.gmp.use-minimal-xpcom</b> in the upper edit, select the corresponding pref below, and set the pref value to <b>True</b>.
# Enter <b>media.gmp.use-minimal-xpcom</b> in the upper edit, select the corresponding pref below, and set the pref value to <b>True</b>.
# Close the about:config tab, restart the browser.
# Close the about:config tab and close Firefox.
# Launch Firefox again using the same profile.
# Launch Firefox again using the same profile.
# In the browser, open a tab and view <b>about:logging</b>.
# In Firefox, open a tab and view <b>about:logging</b>.
# Enter <b>timestamp,sync,GMP:5,EME:5</b> to the 'new log modules' text and click on 'Set Log Modules'.
# Enter <b>timestamp,sync,GMP:5,EME:5</b> to the 'new log modules' text and click on 'Set Log Modules'.
# Under Output choose 'Logging to the Firefox Profiler' and check the 'Enable stack traces for log messages' checkbox.
# Under Output choose 'Logging to the Firefox Profiler' and check the 'Enable stack traces for log messages' checkbox.
Line 98: Line 105:
# Switch to the about:logging tab, click 'Stop logging', and then close the test tab.
# 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.
# 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 menu will open displaying the URL of the profile. Select this text and copy it.
# 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.
# Share the URL of the profile for analysis with the engineer you are working with.


Confirmed users
1,982

edits