Core-2-Extreme / Video_player_for_3DS

Video player for 3ds
https://gbatemp.net/threads/release-video-player-for-3ds.586094
GNU General Public License v3.0
180 stars 17 forks source link

V-SYNC Issue with 800x226p video #68

Open DragonWario opened 8 months ago

DragonWario commented 8 months ago

I posted about this on the linked discord, but I'll make a post about it here as well.

3ds video player vsync issue 1 3ds video player vsync issue 2

DragonWario commented 8 months ago

Some additional information that may or may not be relevant

Hardware: RED-001 (New Nintendo 3DS XL, USA Region) Official Firmware Version: 11.17.0-50U Custom Firmware Version: Luma3DS v13.0.2 Screen Type: Upper:IPS/Lower:IPS microSD Card: SanDisk Extreme 256GB microSDXC (Model:SDSQXA1-256G-GN6MA) Software Versions Tested: 1.5.3, 1.5.2, 1.5.1, 1.5.0, and 1.4.2

Doing some research on my own, I've found some people say that the 3DS's native refresh rate is 59.834Hz. I haven't been able to confirm this information for myself, but it might explain why my 3DS doesn't have the vsync issues on 1.4.2 when the sync rate is stated as 59FPS on the top screen rather than 60FPS on 1.5.0 and above.

Core-2-Extreme commented 2 months ago

Doing some research on my own, I've found some people say that the 3DS's native refresh rate is 59.834Hz.

I've tested it myself with these videos :

And it seems 3DS screen has native refresh rate of 59.834Hz. I frequently see vsync issues (dropped frames) on 60fps and 59.94fps but don't on 59.834fps. (actual video framerate is somewhere around 59.8345xxxx so you'll eventually see vsync issues since it doesn't exactly match with the screen refresh rate. However compared to 60fps and 59.94fps they have much much less chance to occur)

on 1.4.2 when the sync rate is stated as 59FPS on the top screen rather than 60FPS on 1.5.0 and above.

Actually, sync rate didn't change since first version, I just use vsync so it should always 59.834Hz (but I've changed fps measurement method somewhere so that's why you see 59fps in older version and 60fps in newer version).

but it might explain why my 3DS doesn't have the vsync issues 1.4.2.

I think this is because older versions don't try to sync with audio much (so they have audio desync issue). When you play 60fps videos on older versions, it actually being played at 59.834Hz causes audio desync, but since older versions don't try to fix it while playing, as a result you don't see vsync issues (frame won't be dropped).

When you play 60fps videos on newer versions (as you said v1.5.0 and above) it actually being played at 59.834Hz causes audio desync, however these versions try to fix audio desync while playing by dropping frames if they are too late compared to audio. As a result you'll see vsync issues.

It looks like this issues exists due to hardware limitation so it can't be fixed.

DragonWario commented 2 months ago

Would it be possible to implement a toggle that changes between an audio 60fps desync or a video 60fps frame drop? I mainly keep short animated videos on my 3DS, and for that type of content I would prefer to have a slight audio desync rather than a semi-frequent frame time issue, as the videos are short enough usually to not be much of an issue on 1.4.2. (I never noticed the audio desyncing)

Also, Thanks so much for your continued support of this! I find it very cool to be able to listen to my music/play videos on it, and have used the program quite a lot.