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

Audio problems with the hysteria project 1 and 2 #3844

Closed
pisti094 opened this issue Sep 19, 2013 · 23 comments
Closed

Audio problems with the hysteria project 1 and 2 #3844

pisti094 opened this issue Sep 19, 2013 · 23 comments

Comments

@pisti094
Copy link

Problems with the hysteria project psp game the game load and start perfectly but then game begin the ppsspp show black screen pls fix the problem

@pisti094
Copy link
Author

ppsspp android version

@unknownbrackets
Copy link
Collaborator

Hmm, this doesn't give a lot of information. Does this happen on Windows? Can you post a log?

-[Unknown]

@ydamigos
Copy link
Contributor

ydamigos commented Dec 8, 2013

The problem also happens in linux.
The games starts normally but when you select new game there is a lot of flickering and after the selection of the first action it shows black screen.
Here is the log: Hysteria_project.log

@ydamigos
Copy link
Contributor

ydamigos commented Dec 9, 2013

Similar problem also has Hysteria Project 2.

@unknownbrackets
Copy link
Collaborator

Has this changed or improved at all?

-[Unknown]

@ydamigos
Copy link
Contributor

ydamigos commented Jan 6, 2014

If you select non-buffered rendering the flickering stops but after the selection of the first action in the game it shows black screen.

PPSSPPSDL v0.9.6-348-g9f4feaf

@unknownbrackets
Copy link
Collaborator

It seems like it's trying to play a video and failing. Does it make any difference to hold fast forward and mash the buttons a bunch? Is it supposed to show a long video or one in the background maybe?

-[Unknown]

@ydamigos
Copy link
Contributor

I tried both games with v0.9.7-24-g384af34 (non-buffered rendering to stop the flickering) and it seems to work (no black screen).
But now there is a problem with sound when it plays the game videos before the actions. In action selection, sound works.

45:58:610 Render Threa E[ME]: /home/xekarfwtos/projects/ppsspp.git/Core/HW/SimpleAT3Dec.cpp:128 Error decoding Atrac3+ frame
45:58:610 Render Threa E[ME]: /home/xekarfwtos/projects/ppsspp.git/Core/HW/MediaEngine.cpp:743 AT3 decode failed during video playback

@unknownbrackets
Copy link
Collaborator

How are the videos now (in the latest git build, which... isn't available on the buildbot atm... arg)?

-[Unknown]

@daniel229
Copy link
Collaborator

Saigo no Yakusoku no Monogatari is also missing BGM during video.and report these errors when ffmpeg at3+ stuff merged,Last working build is 0.91-1963-g8de3d88,0.91-2005-gdea4668.
main I[ME]: HW\MediaEngine.cpp:85 FF: Frame data doesn't match channel configuration!
main E[ME]: HW\SimpleAudioDec.cpp:179 Error decoding Audio frame
main E[ME]: HW\MediaEngine.cpp:809 Audio (AT3+) decode failed during video playback

@unknownbrackets
Copy link
Collaborator

Has this improved, especially the flickering? Also, maybe the au changes helped here?

I suppose we are not decoding the right audio data... but I'm not sure why. That or it really is a problem in ffmpeg.

-[Unknown]

@daniel229
Copy link
Collaborator

Audio of the video in Saigo no Yakusoku no Monogatari is not changed

@unknownbrackets
Copy link
Collaborator

Apparently, this hack fixes the audio in the Last Promise Story video:

Core/HW/SimpleAudioDec.cpp, from:

    codecCtx_->channels = channels_;
    codecCtx_->channel_layout = channels_ == 2 ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
    codecCtx_->sample_rate = sample_rate_;

To:

    codecCtx_->channels = 1;
    codecCtx_->channel_layout = AV_CH_LAYOUT_MONO;
    codecCtx_->sample_rate = sample_rate_ * 2;

This might mean we're not demuxing this properly or something (maybe our frame size is wrong? or maybe it's actually mono or something?), not really sure. It sounds like the channels are 2/STEREO by default and the sample rate is 44100 (so this sets it to 88200.) Seems questionable, anyway...

If you extract the video and play it with this patch (not sure if you have a build with it?):
https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2014-December/166169.html

Does it play correctly? I know it's a pain to build ffmpeg/ffplay so if you don't already have it maybe we can find some other way.

Also, does such a thing help Hysteria Project?

-[Unknown]

@daniel229
Copy link
Collaborator

I had built ffplay with that patch long time ago and it play the sound.That hack also help Hysteria Project.

ffplay version N-68259-g7cdc997 Copyright (c) 2003-2014 the FFmpeg developers
  built on Dec  6 2014 20:25:24 with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-static --disable-shared
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 14.100 / 56. 14.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mpeg, from 'Z:\FPS_OP.PMF':B vq=    0KB sq=    0B f=0/0
  Duration: 00:01:30.00, start: 0.945211, bitrate: 2066 kb/s
    Stream #0:0[0x1e0]: Video: h264 (Main), yuv420p(tv, smpte170m), 480x272 [SAR
 1:1 DAR 30:17], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1bd0]: Audio: atrac3p, 44100 Hz, mono, fltp, 64 kb/s
  27.73 A-V: 10.317 fd=  58 aq=    2KB vq= 3101KB sq=    0B f=0/0

But not help Prince Of Persia Revelations

user_main    I[ME]: HW\MediaEngine.cpp:85 FF: Frame data doesn't match channel configuration!
user_main    E[ME]: HW\SimpleAudioDec.cpp:201 Error decoding Audio frame (744 bytes): -1094995529 (bebbb1b7)
user_main    E[ME]: HW\MediaEngine.cpp:803 Audio (AT3+) decode failed during video playback

@daniel229
Copy link
Collaborator

hysteria project 1 in ffplay

ffplay version N-68259-g7cdc997 Copyright (c) 2003-2014 the FFmpeg developers
  built on Dec  6 2014 20:25:24 with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-static --disable-shared
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 14.100 / 56. 14.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mpeg, from 'Z:\1.pmf':   0KB vq=    0KB sq=    0B f=0/0
  Duration: 00:00:42.17, start: 0.945211, bitrate: 393 kb/s
    Stream #0:0[0x1e0]: Video: h264 (Main), yuv420p(tv, smpte170m), 480x272 [SA
 1:1 DAR 30:17], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1bd0]: Audio: atrac3p, 44100 Hz, mono, fltp, 33 kb/s
  19.53 A-V: -0.051 fd=  27 aq=    1KB vq=  403KB sq=    0B f=0/0

@unknownbrackets
Copy link
Collaborator

Interesting, it states that both are actually mono. So, one way or another, we are misdetecting the audio. This isn't shocking, since we always assume videos have stereo audio from what I can tell?

But, I wonder why the doubling of the sample rate is necessary then. Maybe just that we demux mono incorrectly.

Prince of Persia - is it broken as well, without any hack? Definitely that hack is not "right". If it's also currently broken, what does ffplay say about it? Is it also mono?

-[Unknown]

@daniel229
Copy link
Collaborator

JPCSP also think it's mono,some tool also tell it's mono. I think it's mono.
Prince of Persia is always broken. Prince of Persia one is stereo.

Prince of Persia video info

ffplay version N-68259-g7cdc997 Copyright (c) 2003-2014 the FFmpeg developers
  built on Dec  6 2014 20:25:24 with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-static --disable-shared
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 14.100 / 56. 14.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mpeg, from 'Z:\UBISOFT.PMF': vq=    0KB sq=    0B f=0/0
  Duration: 00:00:08.41, start: 0.953556, bitrate: 851 kb/s
    Stream #0:0[0x1e0]: Video: h264 (Main), yuv420p, 480x272 [SAR 1:1 DAR 30:17
, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1bd0]: Audio: atrac3p, 44100 Hz, stereo, fltp, 128 kb/s
   5.70 A-V: -0.102 fd=  21 aq=    5KB vq=  127KB sq=    0B f=0/0

@hrydgard
Copy link
Owner

Did #8472 help?

@daniel229
Copy link
Collaborator

Yes,it did.

@unknownbrackets
Copy link
Collaborator

How about Prince Of Persia Revelations? Or is that a separate issue?

-[Unknown]

@daniel229
Copy link
Collaborator

Prince Of Persia Revelations the video sound is fixed, but the atrac has issue.

@unknownbrackets
Copy link
Collaborator

Darn, I guess we should create a new issue? I suppose it's probably new since v1.1.1?

-[Unknown]

@daniel229
Copy link
Collaborator

Oh,no,the Prince Of Persia Revelations is still same as before,both video sound and the ingame sound have problem,and it's always before

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

No branches or pull requests

5 participants