Skip to content

avplayer: implemented AddSourceEx, SetAvSyncMode, Pause and Resume #2456

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

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

roamic
Copy link
Collaborator

@roamic roamic commented Feb 16, 2025

  • Implemented the local part of the sceAvPlayerAddSourceEx
  • Implemented sceAvPlayerPause and sceAvPlayerResume
  • Implemented sceAvPlayerSetAvSyncMode
  • Properly issuing a warning each time the source is looping.
  • Renamed some variables and types to match the coding style of the code base.

@roamic roamic changed the title avplayer: code improvements avplayer: implemented AddSourceEx, Pause and Resume Feb 16, 2025
@roamic roamic changed the title avplayer: implemented AddSourceEx, Pause and Resume avplayer: implemented AddSourceEx, SetAvSyncMode, Pause and Resume Feb 16, 2025
@ElBread3
Copy link
Contributor

Can confirm Gravity Rush cutscene skipping works, but Gris still has issues ending the intro cutscene where the intro will loop where it's supposed to transition into gameplay, and Ice Age: Scrat's Nutty Adventure and The Infectious Madness of Doctor Dekker will also loop their intro video instead of ending it. Will be able to provide more info on this later today.

@roamic
Copy link
Collaborator Author

roamic commented Feb 16, 2025

Can confirm Gravity Rush cutscene skipping works, but Gris still has issues ending the intro cutscene where the intro will loop where it's supposed to transition into gameplay, and Ice Age: Scrat's Nutty Adventure and The Infectious Madness of Doctor Dekker will also loop their intro video instead of ending it. Will be able to provide more info on this later today.

I've added the functionality that reports to the game that loopback was triggered. Can you try again and see if it helps the games that are stuck looping?

@ElBread3
Copy link
Contributor

ElBread3 commented Feb 16, 2025

I'm afraid it seems the videos are still looping after this change. Some interesting observations is they all make this call:
[Lib.AvPlayer] avplayer.cpp:154 sceAvPlayerJumpToTime: (STUBBED) called, time (msec) = 0
which may be the cause of audio desync I noticed in Gris (not sure), also I noticed this error when loading streams on Ice Age:
[Lib.AvPlayer] avplayer_source.cpp:89 CodecTypeToStreamType: Unexpected AVMediaType AVMEDIA_TYPE_DATA

@roamic
Copy link
Collaborator Author

roamic commented Feb 16, 2025

I'm afraid it seems the videos are still looping after this change. Some interesting observations is they all make this call: [Lib.AvPlayer] avplayer.cpp:154 sceAvPlayerJumpToTime: (STUBBED) called, time (msec) = 0 which may be the cause of audio desync I noticed in Gris (not sure), also I noticed this error when loading streams on Ice Age: [Lib.AvPlayer] avplayer_source.cpp:89 CodecTypeToStreamType: Unexpected AVMediaType AVMEDIA_TYPE_DATA

JumpToTime is next on my list. Will be a different PR.

@SNKWiz
Copy link

SNKWiz commented Feb 16, 2025

Can confirm that I can skip the intro video of AOT2, CUSA08956. However, when the intro starts it stops for some 3 seconds before it continues.

@roamic roamic marked this pull request as draft February 17, 2025 07:53
@georgemoralis
Copy link
Collaborator

it appears that games that uses sceAvPlayerAddSourceEx now have different errors . It is probably not relative to the function but any game that uses it dies ;/
Without it some games can skip the videos so it is better :D

@diegolix29
Copy link
Contributor

This make 2 solflock cutscenes on BB work but other 2 gets stuck. Without chance to skip it.

@roamic
Copy link
Collaborator Author

roamic commented Feb 19, 2025

This make 2 solflock cutscenes on BB work but other 2 gets stuck. Without chance to skip it.

Can you be more specific? Which cutscenes exactly?

@diegolix29
Copy link
Contributor

the ludwig 2 phase cutscene and the rom cutscene that sometimes hangs or crash, now they work on 60 fps. but still the laurence and the yaharma sunrise ending still has issues

@roamic
Copy link
Collaborator Author

roamic commented Feb 19, 2025

the ludwig 2 phase cutscene and the rom cutscene that sometimes hangs or crash, now they work on 60 fps. but still the laurence and the yaharma sunrise ending still has issues

Can you try again with the latest changes?

@diegolix29
Copy link
Contributor

sure give me a moment

@diegolix29
Copy link
Contributor

seems like laurence still gets stuck before the actuall cutscene begins. like u can still heard the ambient sound that get triggered before the loading screen ends. for the sunrise end still gets stuck, right before gerhman will cut the head of the hunter. the same way as laurence small background music is there but the full cutscene gets stuck. Rom the spider and ludwig 2phase fully working
image

@roamic roamic marked this pull request as ready for review February 22, 2025 17:56
@roamic
Copy link
Collaborator Author

roamic commented Feb 22, 2025

I've added some changes that may fix the remaining issues. Can you re-test all games?

@ElBread3
Copy link
Contributor

Can confirm my AddSourceEx games still loop instead of ending and in fact now stutter back and forth since the latest commit.

@roamic roamic marked this pull request as draft February 23, 2025 06:47
@roamic roamic force-pushed the avplayer-improvements branch from 778af23 to 0b48b43 Compare March 1, 2025 09:46
@StevenMiller123
Copy link
Contributor

StevenMiller123 commented Mar 2, 2025

Fixes the promotional video played by Dragon Ball FighterZ when entering the lobby. On main the video doesn't show anything, just plays audio instead.
Screenshot 2025-03-02 135440

image

shad_log.txt

@roamic roamic force-pushed the avplayer-improvements branch from 0b48b43 to c71ec44 Compare March 4, 2025 16:27
@georgemoralis
Copy link
Collaborator

Fixed DOA intro video

419088023-e964ae19-c1a0-4f49-a188-b9bc7079d5c6

@georgemoralis
Copy link
Collaborator

Beyond two souls plays video now

419093806-e1837f4d-d1f0-457b-bc65-298d68f0f2f7

@georgemoralis
Copy link
Collaborator

steins gate 0 seems ok

413917111-c0a8fee7-f283-4d50-aa33-f624cb93b846

@aakh1361

This comment was marked as off-topic.

@roamic roamic force-pushed the avplayer-improvements branch from 1c832e1 to 517c1f2 Compare April 6, 2025 09:21
@roamic roamic force-pushed the avplayer-improvements branch from 517c1f2 to 5692fd3 Compare April 6, 2025 09:23
@shinra-electric
Copy link

Dark Souls 2 plays the intro video with this PR:
Screenshot 2025-05-16 at 17 25 10
Screenshot 2025-05-16 at 17 25 19

@shinra-electric
Copy link

Nioh plays the intro FMV:
Screenshot 2025-05-16 at 17 43 56

(Could be my imagination, but it seems to be playing faster than normal)

@thecatontheceiling
Copy link

What needs to be done before merging?

@roamic
Copy link
Collaborator Author

roamic commented May 17, 2025

What needs to be done before merging?

I need to fix avplayer usage in unity games. For example Gris is all choppy. Probably something to do with internal timer.

@RainKikyou
Copy link

QQ图片20250518130351
Fixed the video playback here in Fatal Frame-Maiden of BlackWater, which was black screen but kept playing in a loop in the mainline build

@aakh1361
Copy link

whit this pr DARK SOULS™ II: Scholar of the First Sin now go ingame

{5EE2DC08-D035-4650-A146-36189EF634E0}
{6DCA3B0A-5EC1-47D4-840E-4200FF069DAA}

{D53CCDCD-7007-47C1-ACD9-58E7EED5726B}

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

Successfully merging this pull request may close these issues.

10 participants