Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FPS instrument for video frame rate with Exoplayer #942

Open
Leo-Yan opened this issue Jan 10, 2019 · 2 comments
Open

FPS instrument for video frame rate with Exoplayer #942

Leo-Yan opened this issue Jan 10, 2019 · 2 comments

Comments

@Leo-Yan
Copy link

Leo-Yan commented Jan 10, 2019

Hi there,

If use 'fps' instrument for profiling video frame rate with Exoplayer, I can see the fps is a very small value, please see below result.

So for WA fps instrument, it's mainly used for GPU (or UI) performance profiling but not for video frame rate profiling, right? Could we support video frame rate profiling for Exoplayer? I can see the link [1] have some discussion which Android provides APIs for video rendering related info.

Thanks for your suggestion.

id,workload,iteration,metric,value,units                                    
default-exoplayer_video,exoplayer,1,exoplayer_dropped_frames,0,             
default-exoplayer_video,exoplayer,1,fps,1.4871630558,fps                    
default-exoplayer_video,exoplayer,1,total_frames,59,frames                  
default-exoplayer_video,exoplayer,1,janks,17,count                          
default-exoplayer_video,exoplayer,1,janks_pc,28.3,percent                   
default-exoplayer_video,exoplayer,1,render_time_50th_ptile,13,milliseconds  
default-exoplayer_video,exoplayer,1,render_time_90th_ptile,32,milliseconds  
default-exoplayer_video,exoplayer,1,render_time_95th_ptile,73,milliseconds  
default-exoplayer_video,exoplayer,1,render_time_99th_ptile,200,milliseconds 
default-exoplayer_video,exoplayer,1,missed_vsync,3,count                    
default-exoplayer_video,exoplayer,1,high_input_latency,19,count             
default-exoplayer_video,exoplayer,1,slow_ui_thread,12,count                 
default-exoplayer_video,exoplayer,1,slow_bitmap_uploads,0,count             
default-exoplayer_video,exoplayer,1,slow_issue_draw_commands,3,count        
default-exoplayer_video,exoplayer,1,frame_deadline_missed,13,count          

[1] google/ExoPlayer#4088

@marcbonnici
Copy link
Contributor

That sounds like it could be an interesting idea, is your proposal to create a customized version of exoplayer that would automatically log the displayed video frame rate via the APIs and use that to report the performance?

@Leo-Yan
Copy link
Author

Leo-Yan commented Jan 10, 2019

Be honest, I don't know well for Android APIs. But if there have common Android APIs but not Exoplayer specific APIs, it's good to write one common video fps instrument, otherwise it's also good to rollback to use Exoplayer specific APIs for only Exoplayer case.

Just input more information for the profiling result at my side:

If I use gfxinfo method for fps instrument for Exoplayer, I can see it has very less fps value:

id,workload,iteration,metric,value,units                                   
default-exoplayer_video,exoplayer,1,exoplayer_dropped_frames,0,            
default-exoplayer_video,exoplayer,1,fps,1.4871630558,fps                   
default-exoplayer_video,exoplayer,1,total_frames,59,frames                 
default-exoplayer_video,exoplayer,1,janks,17,count                         
default-exoplayer_video,exoplayer,1,janks_pc,28.3,percent                  
default-exoplayer_video,exoplayer,1,render_time_50th_ptile,13,milliseconds 
default-exoplayer_video,exoplayer,1,render_time_90th_ptile,32,milliseconds 
default-exoplayer_video,exoplayer,1,render_time_95th_ptile,73,milliseconds 
default-exoplayer_video,exoplayer,1,render_time_99th_ptile,200,milliseconds
default-exoplayer_video,exoplayer,1,missed_vsync,3,count                   
default-exoplayer_video,exoplayer,1,high_input_latency,19,count            
default-exoplayer_video,exoplayer,1,slow_ui_thread,12,count                
default-exoplayer_video,exoplayer,1,slow_bitmap_uploads,0,count            
default-exoplayer_video,exoplayer,1,slow_issue_draw_commands,3,count       
default-exoplayer_video,exoplayer,1,frame_deadline_missed,13,count    

If use SurfaceFlinger method for fps instrument for Exoplayer, I can get more reasonable result for FPS metric:

id,workload,iteration,metric,value,units                           
default-exoplayer_video,exoplayer,1,exoplayer_dropped_frames,0,    
default-exoplayer_video,exoplayer,1,fps,24.003588644,fps           
default-exoplayer_video,exoplayer,1,total_frames,670,frames        
default-exoplayer_video,exoplayer,1,janks,62,count                 
default-exoplayer_video,exoplayer,1,janks_pc,9.25373134328,percent 
default-exoplayer_video,exoplayer,1,missed_vsync,670,count

You could see using Surface Flinger to track the frames of view will output more reasonable result. Eventually I think we should have a reliable method to output frame rate for video case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants