Closed Bug 683435 Opened 13 years ago Closed 9 years ago

Dropping frames on YouTube HTML5 player

Categories

(Core :: Audio/Video: Playback, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: cpearce, Unassigned)

References

()

Details

Sometimes while watching HTML5 videos on YouTube I note periods of about half a second where no new video frames are displayed but audio keeps playing. The media is adequately buffered, so the video decode must be falling behind for some reason. This happens seemingly randomly, approximately once every 5 minutes or so. Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0a1) Gecko/20110829 Firefox/9.0a1 Graphics Adapter Description NVIDIA NVS 3100M Vendor ID 10de Device ID 0a6c Adapter RAM 512 Adapter Drivers nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um Driver Version 8.17.12.6721 Driver Date 2-18-2011 Adapter RAM (GPU #2) Unknown Adapter Drivers (GPU #2) Unknown Direct2D Enabled true DirectWrite Enabled true (6.1.7601.17563) ClearType Parameters ClearType parameters not found WebGL Renderer Google Inc. -- ANGLE -- OpenGL ES 2.0 (ANGLE 0.0.0.686) GPU Accelerated Windows 1/1 Direct3D 10
I had tbpl running in another tab. When I close tbpl, the frame drops no longer happen, so this must be caused by long running JS starving the main thread's event loop. e10s will fix this.
This happens on Fennec as well, though it might be for a different reason?
Javascript timers in background tab's contents are very difficult issue for us. And also, I guess that if the idle service is running during playing video, some code in our main GUI thread might run. If so, some messages coming via our window could be delayed.
I'm experiencing the same problem when watching very long videos (> 1 hour) on youtube. For such long videos, the trick of stopping them, let them load and then play them doesn't work. No other tabs are open. Only other active programs are Privoxy proxy, ZoneAlarm firewall and Avast antivirus. No javascripts running in the background for me. It happens on a old laptop with 1GB memory, using Firefox 5.0.1. Upgrading to Firefox 11 didn't help. According to some other forums, .e.g.:http://lifehacker.com/5342636/how-to-fix-annoying-youtube-jumpiness-in-firefox, this should be caused by the session restore information being stored to often. Apparently modifying the value of browser.sessionstore.interval to an higher value should solve the problem.
I have also been seeing this issue. It happens constantly if the video is 60fps, and occasionally at 1080/30fps. 720 is never a problem for me though. I can right click the video and select "stats for nerds" and see the dropped frame counter rising. Sometimes the 'buffering ring' appears even though the buffer is full. Below are the contents of about:support. I hope this helps. Application Basics ------------------ Name: Firefox Version: 39.0 Build ID: 20150630154324 Update Channel: release User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0 Multiprocess Windows: 0/1 (default: false) Crash Reports for the Last 3 Days --------------------------------- All Crash Reports Extensions ---------- Name: Adblock Plus Version: 2.6.10 Enabled: false ID: {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d} Name: Add to Amazon Wish List Button Version: 1.10.1-signed Enabled: false ID: amznUWL2@amazon.com Name: ChatZilla Version: 0.9.91.1.1-signed Enabled: false ID: {59c81df5-4b7a-477b-912d-4e0fdf64e5f2} Name: Download YouTube Videos as MP4 Version: 1.8.3.1-signed Enabled: false ID: {b9bfaf1c-a63f-47cd-8b9a-29526ced9060} Name: Feed Sidebar Version: 8.0.4.1-signed Enabled: false ID: feedbar@efinke.com Name: FireFTP Version: 2.0.24.1-signed Enabled: false ID: {a7c6cf7f-112c-4500-a7ea-39801a327e5f} Name: Flagfox Version: 5.1.1 Enabled: false ID: {1018e4d6-728f-4b20-ad56-37578a4de76b} Name: FoxyProxy Standard Version: 4.5.5 Enabled: false ID: foxyproxy@eric.h.jung Name: HTTPS Finder Version: 0.85 Enabled: false ID: {6bdc61ae-7b80-44a3-9476-e1d121ec2238} Name: HTTPS-Everywhere Version: 5.0.7 Enabled: false ID: https-everywhere@eff.org Name: Personas Plus Version: 1.7.3.1-signed Enabled: false ID: personas@christopher.beard Name: Show my Password Version: 2.0.1-signed Enabled: false ID: {cd617372-6743-4ee4-bac4-fbf60f35719e} Name: Skype Click to Call Version: 7.4.0.9058 Enabled: false ID: {82AF8DCA-6DE9-405D-BD5E-43525BDAD38A} Name: Test Pilot Version: 1.2.3.1-signed Enabled: false ID: testpilot@labs.mozilla.com Name: User Agent Switcher Version: 0.7.3.1-signed Enabled: false ID: {e968fc70-8f95-4ab9-9e79-304de2a71ee1} Graphics -------- Adapter Description: NVIDIA GeForce GTX 460M Adapter Drivers: nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um Adapter RAM: 1536 Asynchronous Pan/Zoom: none Device ID: 0x0dd1 DirectWrite Enabled: false (6.2.9200.17292) Driver Date: 6-17-2015 Driver Version: 10.18.13.5330 GPU #2 Active: false GPU Accelerated Windows: 0/1 Basic (OMTC) Subsys ID: 20421043 Vendor ID: 0x10de windowLayerManagerRemote: true AzureCanvasBackend: skia AzureContentBackend: cairo AzureFallbackCanvasBackend: cairo AzureSkiaAccelerated: 0 Important Modified Preferences ------------------------------ accessibility.typeaheadfind.flashBar: 0 browser.cache.disk.capacity: 358400 browser.cache.disk.filesystem_reported: 1 browser.cache.disk.smart_size.first_run: false browser.cache.disk.smart_size.use_old_max: false browser.cache.frecency_experiment: 3 browser.download.importedFromSqlite: true browser.download.manager.alertOnEXEOpen: true browser.download.manager.showAlertOnComplete: false browser.download.manager.showWhenStarting: false browser.places.smartBookmarksVersion: 7 browser.sessionstore.restore_on_demand: false browser.sessionstore.upgradeBackup.latestBuildID: 20150630154324 browser.startup.homepage: about:home browser.startup.homepage_override.buildID: 20150630154324 browser.startup.homepage_override.mstone: 39.0 browser.tabs.warnOnClose: false dom.max_script_run_time: 0 dom.mozApps.used: true extensions.lastAppVersion: 39.0 gfx.direct3d.last_used_feature_level_idx: 0 keyword.URL: https://de.search.yahoo.com/search?fr=greentree_ff1&ei=utf-8&ilc=12&type=994519&p= media.gmp-eme-adobe.lastUpdate: 1437777552 media.gmp-eme-adobe.version: 12 media.gmp-gmpopenh264.lastUpdate: 1431784069 media.gmp-gmpopenh264.version: 1.4 media.gmp-manager.buildID: 20150630154324 media.gmp-manager.lastCheck: 1438469381 media.mediasource.webm.enabled: true network.cookie.cookieBehavior: 1 network.cookie.prefsMigrated: true network.predictor.cleaned-up: true places.database.lastMaintenance: 1438470144 places.history.expiration.transient_current_max_pages: 50970 plugin.disable_full_page_plugin_for_types: application/pdf plugin.importedState: true plugin.state.nppdf: 0 print.printer_\\STEPHEN-PC\HP_Deskjet_F2100_series.print_bgcolor: false ///skipping loads of printer info print.printer_Send_To_OneNote_2013.print_unwriteable_margin_top: 0 privacy.donottrackheader.enabled: true privacy.sanitize.migrateFx3Prefs: true storage.vacuum.last.index: 1 storage.vacuum.last.places.sqlite: 1437576250 Important Locked Preferences ---------------------------- JavaScript ---------- Incremental GC: true Accessibility ------------- Activated: false Prevent Accessibility: 0 Library Versions ---------------- NSPR Expected minimum version: 4.10.8 Version in use: 4.10.8 NSS Expected minimum version: 3.19.2 Basic ECC Version in use: 3.19.2 Basic ECC NSSSMIME Expected minimum version: 3.19.2 Basic ECC Version in use: 3.19.2 Basic ECC NSSSSL Expected minimum version: 3.19.2 Basic ECC Version in use: 3.19.2 Basic ECC NSSUTIL Expected minimum version: 3.19.2 Version in use: 3.19.2 Experimental Features ---------------------
(In reply to bbgun06 from comment #6) > Adapter Description: NVIDIA GeForce GTX 460M > Adapter Drivers: nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um > Adapter RAM: 1536 > Asynchronous Pan/Zoom: none > Device ID: 0x0dd1 > DirectWrite Enabled: false (6.2.9200.17292) > Driver Date: 6-17-2015 > Driver Version: 10.18.13.5330 > GPU #2 Active: false > GPU Accelerated Windows: 0/1 Basic (OMTC) > Subsys ID: 20421043 > Vendor ID: 0x10de > windowLayerManagerRemote: true > AzureCanvasBackend: skia > AzureContentBackend: cairo > AzureFallbackCanvasBackend: cairo > AzureSkiaAccelerated: 0 It is dropping frames because your poor CPU is doing everything. Try upgrading your graphics driver and running in safe mode. Possibly layers.acceleration.disabled is set.
In particular, if your laptop is part of Nvidia's notebook driver program, this driver should work: http://www.nvidia.com/download/driverResults.aspx/87867 In addition, make sure you *aren't* running Windows or Firefox in safe mode, and make sure layers.acceleration.disabled (which you can find in about:config) *isn't* set.
(In reply to Emanuel Hoogeveen [:ehoogeveen] from comment #8) > In addition, make sure you *aren't* running Windows or Firefox in safe mode, > and make sure layers.acceleration.disabled (which you can find in > about:config) *isn't* set. Sorry - I stand corrected. Safe mode disables hardware acceleration.
No worries. Honestly the reason I decided to clarify (aside from linking the driver) is that I wasn't sure what you meant.
I had the previous version of my graphics driver installed. I did not realize that a new one was released only a few days ago. This problem has been going on for several months, on multiple computers, so I don't think the driver is the problem. "Use Hardware Acceleration" is checked. layers.acceleration.disabled is false. While watching video, no CPU cores ever go above 60%. My GPU hovers at around 25%. I've tested it in normal mode and in safe mode, to make sure that no extensions were affecting it. I was under the impression that all bugs should be tested in safe mode before being reported.
The dropped frames aren't a video playback issue. They are a graphics issue in that hardware acceleration is disabled for some odd reason. Matt - any clues?
Flags: needinfo?(matt.woodrow)
I don't have two GPUs, so I'm not sure why it says, "GPU #2 Active: false." Adapter Description NVIDIA GeForce GTX 460M Adapter Drivers nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um Adapter RAM 1536 Asynchronous Pan/Zoom none Device ID 0x0dd1 Direct2D Enabled true DirectWrite Enabled true (6.2.9200.17292) Driver Date 7-22-2015 Driver Version 10.18.13.5362 GPU #2 Active false GPU Accelerated Windows 1/1 Direct3D 11 (OMTC) Subsys ID 20421043 Vendor ID 0x10de WebGL Renderer Google Inc. -- ANGLE (NVIDIA GeForce GTX 460M Direct3D11 vs_5_0 ps_5_0) windowLayerManagerRemote true AzureCanvasBackend direct2d 1.1 AzureContentBackend direct2d 1.1 AzureFallbackCanvasBackend cairo AzureSkiaAccelerated 0
In addition to disabling add-ons, safe mode slows a lot of things down (disables the JITs and hardware acceleration) so it's not the best bet for confirming performance issues. It sounds like you posted about:support from safe mode, which would explain why hardware acceleration was listed as disabled. I don't know if I can help diagnose the issue beyond this though, just wanted to clear that up.
(In reply to bbgun06 from comment #13) > I don't have two GPUs, so I'm not sure why it says, "GPU #2 Active: false." GPU #2 is not active because it does not exist. Try disabling hardware decoding using media.hardware-video-decoding.enabled=false and see if that makes a difference to your frame loss. I would also be interested to see if you get different results in Firefox nightly 42.
Flags: needinfo?(matt.woodrow)
In comment 13, that was in normal mode. Comment 6 was in safe mode. After playing with it some more and watching my GPU usage, it appears that the GPU is used for 720p60 (it remains steady at 30%.) But not for 1080p60 (it bounces randomly from 0-10%) For 1080 and 720 (30fps), it holds steady at about 18% If anyone knows of a more accurate test or needs more information, please tell me.
(In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #15) I don't see that option.
(In reply to bbgun06 from comment #17) > (In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #15) > I don't see that option. It might be called media.windows-media-foundation.use-dxva on release.
(In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #18) ok, I disabled it and I still see dropped frames. About 1-2 seconds is dropped, then it plays for one second. None of my CPU cores are maxed out though. I will try the latest nightly tomorrow. Thank you for your help with this issue.
On nightly, it seems to work a bit better. It is still far from good, however. It drops about 40% of frames, but still plays smoothly, except about once every 10 seconds the video will freeze for a second before catching up. That's on 1080p60.
I've watched a couple hours of youtube videos at 1080p30 in Nightly, and haven't seen any dropped frames. So at least that is working. However, 60fps will still be a problem.
Component: Audio/Video → Audio/Video: Playback
I'm going to close this on the basis that I don't think the original issue still exists and we have other bugs for media perf that affects 60fps.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.