RPi-Distro / vlc

GNU General Public License v2.0
41 stars 4 forks source link

Adjusting refresh rate doesn't always work #33

Open llamafilm opened 3 years ago

llamafilm commented 3 years ago

I'm testing VLC 3.0.11 from the Buster repo. The mmal-adjust-refreshrate parameter works sometimes but it doesn't always choose the right refresh rate. I have the Pi 4 HDMI output connected to a broadcast monitor which identifies the incoming signal.

When the source video is 24p, it correctly adjusts to 24. When the source video is 30p, it adjusts to 60. When the source is 29.97, it adjusts to 30. When the source is 23.98, it adjusts to 30. When the source is 25, it adjusts to 50.

Here is an example video at 30fps https://mirror.clarkson.edu/blender/demo/movies/BBB/bbb_sunflower_1080p_30fps_normal.mp4

With tvservice I can select any of these modes, but I haven't found any way to use fractional frame rates (e.g. 24000/1001).

$ tvservice -m CEA
Group CEA has 24 modes:
           mode 1: 640x480 @ 60Hz 4:3, clock:25MHz progressive 
           mode 2: 720x480 @ 60Hz 4:3, clock:27MHz progressive 3D:FP|TopBot|SbS-HH
           mode 3: 720x480 @ 60Hz 16:9, clock:27MHz progressive 
           mode 4: 1280x720 @ 60Hz 16:9, clock:74MHz progressive 3D:FP|TopBot|SbS-HH
           mode 5: 1920x1080 @ 60Hz 16:9, clock:74MHz interlaced 3D:SbS-HH
           mode 6: 720x480 @ 60Hz 4:3, clock:27MHz x2 interlaced 
           mode 7: 720x480 @ 60Hz 16:9, clock:27MHz x2 interlaced 
  (prefer) mode 16: 1920x1080 @ 60Hz 16:9, clock:148MHz progressive 3D:FP|TopBot|SbS-HH
           mode 17: 720x576 @ 50Hz 4:3, clock:27MHz progressive 
           mode 18: 720x576 @ 50Hz 16:9, clock:27MHz progressive 
           mode 19: 1280x720 @ 50Hz 16:9, clock:74MHz progressive 3D:FP|TopBot|SbS-HH
           mode 20: 1920x1080 @ 50Hz 16:9, clock:74MHz interlaced 3D:FP|TopBot|SbS-HH
           mode 21: 720x576 @ 50Hz 4:3, clock:27MHz x2 interlaced 
           mode 22: 720x576 @ 50Hz 16:9, clock:27MHz x2 interlaced 
           mode 31: 1920x1080 @ 50Hz 16:9, clock:148MHz progressive 3D:FP|TopBot|SbS-HH
           mode 32: 1920x1080 @ 24Hz 16:9, clock:74MHz progressive 3D:FP|TopBot
           mode 33: 1920x1080 @ 25Hz 16:9, clock:74MHz progressive 
           mode 34: 1920x1080 @ 30Hz 16:9, clock:74MHz progressive 
           mode 93: 3840x2160 @ 24Hz 16:9, clock:297MHz progressive 
           mode 94: 3840x2160 @ 25Hz 16:9, clock:297MHz progressive 
           mode 95: 3840x2160 @ 30Hz 16:9, clock:297MHz progressive 
           mode 98: 4096x2160 @ 24Hz unknown AR, clock:297MHz progressive 
           mode 99: 4096x2160 @ 25Hz unknown AR, clock:297MHz progressive 
           mode 100: 4096x2160 @ 30Hz unknown AR, clock:297MHz progressive 
llamafilm commented 3 years ago

I guess fractional (a.k.a NTSC) rates are not supported so that part might be a feature request. See https://github.com/RPi-Distro/firmware/blob/debian/opt/vc/include/interface/vmcs_host/vc_hdmi_property.h#L86

The other part seems like a bug.