EmuNewz Network

Full Version: Jpcsp movie playback - Intresting find for movie flickering (NVIDIA)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was bored so I ended up fooling with nvidia control panel and discovered a setting under vsync called adaptive, so I set it to half (my refresh is 60/59hz so half would be 30 (30fps), I assume for this to work for other people they would also need to set 60hz refresh for their monitor to get the 30fps cap (this shouldn't be an issue with modern LCD/LED monitors)
[attachment=9640]


And I found that this solved many movie flickering and audio dysync problems that plagued some movies under jpcsp (so far I have tested in "last ranker" (now the movie has no flickering at all, used to be completely unwatchable due to sever flicker), Final Fantasy 2 intro movie flicker gone, Final Fantasy 3 intro movie flicker gone) , I will try to test more but I need to remember what other game movies flickered)

so far this trick only seems to work on games that show FPS in the Jpcsp title-bar movies that show fps 0 don't seem to work for some reason (like final fantasy tactics, star ocean)...

anyways I thought it was worth mentioning, maybe jpcsp needs an internal fps limiter for the movie playback (I also tried the internal jpcsp frame limiter and it seems to have no effect on movies.)
as far as I know this adaptive vsync is only found on nvidia cards, but if ati has a similar option try it out.

quick movie demostration
(09-21-2012 10:01 AM)hyakki Wrote: [ -> ]I was bored so I ended up fooling with nvidia control panel and discovered a setting under vsync called adaptive, so I set it to half (my refresh is 60/59hz so half would be 30 (30fps), I assume for this to work for other people they would also need to set 60hz refresh for their monitor to get the 30fps cap (this shouldn't be an issue with modern LCD/LED monitors)



And I found that this solved many movie flickering and audio dysync problems that plagued some movies under jpcsp (so far I have tested in "last ranker" (now the movie has no flickering at all, used to be completely unwatchable due to sever flicker), Final Fantasy 2 intro movie flicker gone, Final Fantasy 3 intro movie flicker gone) , I will try to test more but I need to remember what other game movies flickered)
Interesting!
I looks like the video decoding is going faster than the sound can be played and the game is adding blank images to keep video and sound in sync.

There are parameters in Jpcsp to tweak these aspects:
Code:
sceMpeg.maxAheadTimestamp = 40000; // if the video and audio decoding are more than 40000 timestamps (about half a second) out of sync, an error is returned by the decoding.
scePsmfPlayer.psmfMaxAheadTimestamp = 40000; // same but for games using scePsmfPlayer to play the video
sceMpeg.atracDecodeDelay = 3000; // the audio decoding is taking 3000 microseconds (empirical value)
sceMpeg.avcDecodeDelay = 5400; // the video decoding is taking 5400 microseconds (empirical value)
Could you try to tweak these values and see if they have an impact?
For the flickering, I would try to either increase maxAheadTimestamp/psmfMaxAheadTimestamp (but this could cause the video and audio to get more out of sync) or increase avcDecodeDelay (so that the video decoding is not happening too fast).

Thank you!
(09-21-2012 11:00 AM)gid15 Wrote: [ -> ]Interesting!
I looks like the video decoding is going faster than the sound can be played and the game is adding blank images to keep video and sound in sync.
for games like crisis core, 3rd birthday..etc the movies playback perfect and get locked to 30fps (I don't know if the game or the emulator set this) , but the games that have the flicker somehow override the 30fps and try to play at 60~fps , so when using the adaptive vsync locking it to 30 fps they playback almost in perfect sync, so it does seem to be related to fps somehow

anyways I quickly tried to tweak those values but they didn't seem to have much effect on the flickering movies (tested FF2),
I found that lowering one value 'mpegTimestampPerSecond = 10000' delayed the flicker until the movie was almost complete, the movie seemed to play faster though and audio was horribly out of sync...I'll try tweaking them some more to see if I can get better results Smile
I disabled the media engine so I could better identify what function the problematic movies were using, and noticed all the movies that flicker show (tested final fantasy 2, final fantasy 3, Last ranker)
"This is a faked PSMF Player video", even the static screen starts to flicker Smile

movies that don't flicker and play+sync normally show (tested 3rd birthday, crisis core, Dissidia duodecim)
"Enable the Media Engine to see the MPEG Video" (r2731)
or
"This is a faked MPEG video (in YCbCR mode) (tested Jeanne D'ARc, final fantasy 1)


Edit:
Actually found out I wasn't saving the file (used to visual studio where it auto saves on compile Tongue), changing avcDecodeDelay = 15400; seems to help with the flickering (and lowered fps on the movie), still tweaking to see if i can get audio to sync up better
PSMF, or PlayStation Movie Format, is a proprietary movie format created by Sony for the PSP. PSMF videos can be as small as 64x64 pixels, and have a framerate of 29.97fps. The video codec used is H.264, also known as MPEG-4 Part 10 AVC. The audio codec is the Sony proprietary ATRAC3plus.

documentation:
http://hitmen.c02.at/files/yapspd/psp_doc/chap26.html


I think the videos psmf it should limit to 29.97 fps.

edit:
Dante inferno uses .bik ,and with hyakki tricks(30fps), its perfect,show perfectly videos and gameplay.
Reference URL's