Bug 20566 - PPSSPP badly decodes videos with ffmpeg
Summary: PPSSPP badly decodes videos with ffmpeg
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact: Rémi Verschelde
URL:
Whiteboard: MGA6-64-OK
Keywords: advisory, UPSTREAM, validated_update
Depends on:
Blocks:
 
Reported: 2017-03-25 19:28 CET by JanKusanagi
Modified: 2018-11-17 23:24 CET (History)
6 users (show)

See Also:
Source RPM: ppsspp-1.4.2-1.mga6.tainted
CVE:
Status comment:


Attachments

Description JanKusanagi 2017-03-25 19:28:29 CET
Trying to load any game which loads a video (apparently) results in a crash.

Trace below:

27:51:036 threadmain   I[KERNEL]: HLE/sceKernelThread.cpp:2064 0=sceKernelStartThread(346, 40, 09753260)
27:51:036 threadmain   I[KERNEL]: HLE/sceKernelThread.cpp:2064 0=sceKernelStartThread(347, 16, 0974f210)
27:51:037 MPEGreadThre I[ME]: HLE/sceMpeg.cpp:352 Stream offset: 2048, Stream size: 0x82800
27:51:037 MPEGreadThre I[ME]: HLE/sceMpeg.cpp:353 First timestamp: 90000, Last timestamp: 1080990
27:51:043 threadmain   E[ME]: HW/MediaEngine.cpp:82 FF: Assertion 0 failed at libavcodec/utils.c:601
Aborted (core dumped)



I guess this needs rebuilding against newer libavcodec.

Thanks!
JanKusanagi 2017-03-25 19:28:48 CET

CC: (none) => jan-bugs

Comment 1 Marja Van Waes 2017-03-26 09:27:54 CEST
(In reply to JanKusanagi from comment #0)
> Trying to load any game which loads a video (apparently) results in a crash.
> 



> 
> I guess this needs rebuilding against newer libavcodec.
> 


@ Rémi

Are you OK with being the assignee for this bug report?

Assignee: bugsquad => rverschelde
CC: (none) => marja11

Comment 2 Rémi Verschelde 2017-03-27 09:29:09 CEST
PPSSPP was already rebuilt against the newest ffmpeg, but that's indeed what causes the issue.

There is an upstream bug report about it, but without a fix so far: https://github.com/hrydgard/ppsspp/issues/9026

See Also: (none) => https://github.com/hrydgard/ppsspp/issues/9026
Keywords: (none) => UPSTREAM

Rémi Verschelde 2017-03-27 09:41:13 CEST

Severity: major => critical

Comment 3 JanKusanagi 2017-03-27 16:45:15 CEST
Thanks Rémi!

Keeping an eye on that issue now.
Comment 4 JanKusanagi 2017-03-28 20:43:01 CEST
Looks like they're making good progress \o/

https://github.com/hrydgard/ppsspp/issues/9026#issuecomment-289855718
Comment 5 Rémi Verschelde 2017-07-24 18:45:08 CEST
For the reference, ppsspp 1.4.2 in Cauldron and Mageia 6 no longer crashes on videos, but they are badly decoded so not really enjoyable. Still, much less critical as games can still be played.

Summary: PPSSPP crashes on video load => PPSSPP badly decodes videos with ffmpeg
Severity: critical => normal

Rémi Verschelde 2017-07-24 18:45:25 CEST

Source RPM: (none) => ppsspp-1.4.2-1.mga6.tainted

Rémi Verschelde 2017-07-24 18:45:31 CEST

Whiteboard: (none) => MGA6TOO

Comment 6 JanKusanagi 2018-06-14 17:07:06 CEST
Seems like they fixed this upstream, so hopefully their next release can (really) fix this bug (that is, the video corruption) =)
Comment 7 Rémi Verschelde 2018-06-14 17:20:50 CEST
I tested the patch locally on top of 1.6.3 and it's indeed much better. Not perfect yet (it's pretty choppy on the video I tried), but I'll wait for 1.6.4 and push that to Mageia 6.
Comment 8 JanKusanagi 2018-11-06 01:29:53 CET
For the record, 1.7.1 is out, and should have the fix for this included:
http://ppsspp.org/#news =)
Comment 9 Rémi Verschelde 2018-11-06 08:28:21 CET
Thanks for the reminder, I'll work on the update now.
Comment 10 Rémi Verschelde 2018-11-06 10:42:09 CET
Fixed in Cauldron with ppsspp-1.7.2-1.mga7.tainted!

There's another issue when building against recent FFmpeg (upstream froze their version at 3.0.2) which causes choppy playback of videos, but that's already better than a crash and games are playable: https://github.com/hrydgard/ppsspp/issues/11490

With some luck it might perform fine on Mageia 6 with ffmpeg 3.3.x.

Mageia 6 advisory incoming once I've managed to build the update candidate.

Version: Cauldron => 6
Whiteboard: MGA6TOO => (none)

Comment 11 Rémi Verschelde 2018-11-06 11:42:57 CET
Advisory:
=========

Updated ppsspp package fixes crash on video decoding

  PPSSPP before 1.7.0 used to crash on video decoding when built against a
  recent FFmpeg system library (bug 9026).

  This is now fixed with version 1.7.2, also providing many new features and
  bug fixes. Video playback issues may still occur (bug 11490), but should no
  longer crash.

  This updates also introduces the rapidjson package in Mageia 6, which is a
  dependency for recent PPSSPP.

References:
 - https://github.com/hrydgard/ppsspp/issues/9026
 - https://github.com/hrydgard/ppsspp/issues/11490


RPMs in core/updates_testing:
=============================

rapidjson-1.1.0-1.mga6

RPMs in tainted/updates_testing:
================================

ppsspp-1.7.2-1.mga6.tainted


SRPMs:
======

core:
  rapidjson-1.1.0-1.mga6
tainted:
  ppsspp-1.7.2-1.mga6.tainted

Assignee: rverschelde => qa-bugs
QA Contact: (none) => rverschelde

Comment 12 Rémi Verschelde 2018-11-06 11:43:57 CET
@ Jan: I had choppy video playback after this update on Cauldron playing Crisis Core - could you test on Mageia 6 and see if it's the same, or if it performs better with older FFmpeg?
Comment 13 Herman Viaene 2018-11-06 14:45:16 CET
MGA6-32 MATE on IBM Thinkpad R50e
No installation issues.
At CLI:
$ ppsspp 2008-08-28\ 07.51.03\ aus2008win2.avi 
Vulkan is not available.
I: Config.cpp:490: Longest display side: -1 pixels. Choosing scale 1
40:14:129 Core/Config.cpp:1462 E[LOADER]: Failed to read /home/tester6/.config/ppsspp/PSP/SYSTEM/controls.ini. Setting controller config to default.
I: NativeApp.cpp:560: Boot filename found in args: '2008-08-28 07.51.03 aus2008win2.avi'
40:14:188 Core/Config.cpp:1135 E[LOADER]: Error saving config - can't read ini '/home/tester6/.config/ppsspp/PSP/SYSTEM/ppsspp.ini'
40:14:203 Core/Config.cpp:1180 I[LOADER]: Config saved: '/home/tester6/.config/ppsspp/PSP/SYSTEM/ppsspp.ini'
40:14:203 Core/Config.cpp:1186 E[LOADER]: Error saving config - can't read ini '/home/tester6/.config/ppsspp/PSP/SYSTEM/controls.ini'
40:14:204 Core/Config.cpp:1193 I[LOADER]: Controller config saved: /home/tester6/.config/ppsspp/PSP/SYSTEM/controls.ini
Pixels: 960 x 544
Virtual pixels: 960 x 544
Sorry, this program requires OpenGL 2.0.
GL init error ''
E: SDLMain.cpp:575: Output audio samples: 1024 (requested: 2048)
loading control pad mappings from gamecontrollerdb.txt: SUCCESS!
Segmentatiefout (geheugendump gemaakt)

This old laptop has OpenGL 1.3, so this test is not possible. At least the avi file still plays OK in vlc, so the insttallation of ppsspp does not affect it.

CC: (none) => herman.viaene

Comment 14 JanKusanagi 2018-11-06 16:10:53 CET
@ Rémi, thanks for the update!

I also use Cauldron, not Mga6, but I might be able to test on an Mga6 machine one of these days.

I've checked that I also get choppy video playback (but at least, you can see the video xD). Choppy, in this case = fine for a few frames, then stop for 1/3 of a second or so, repeat, and so on.

RE: rapidjson, I don't have that package installed after upgrading ppsspp to this 1.7.2.
Comment 15 Rémi Verschelde 2018-11-06 17:18:43 CET
@ Jan: Ok, you can test on Cauldron then. I've since pushed -3.mga7 and -4.mga7 which should also work around the choppy playback issue: http://svnweb.mageia.org/packages?view=revision&revision=1328671

It's not a proper fix as I had to revert an upstream commit, but it should be better than the alternative for the time being. I'll add that to the mga6 update candidate too.

> RE: rapidjson, I don't have that package installed after upgrading ppsspp to
> this 1.7.2.

That's ok, it's a header-only compile-time dependency.
Comment 16 JanKusanagi 2018-11-06 20:50:27 CET
Video playback seems perfect with 1.7.2-4.mga7, thanks!! =)
Comment 17 Rémi Verschelde 2018-11-07 12:29:25 CET
@ Jan: Just pushed a less intrusive workaround for the choppy playback issue in 1.7.2-5.mga7, please check that it still works as expected.

@ Herman: Indeed OpenGL 2 is needed for this one.

Pushing the same to Mageia 6 too (building now, will be available within 1h):

Advisory:
=========

Updated ppsspp package fixes crash on video decoding

  PPSSPP before 1.7.0 could crash on video decoding, or produce a garbled
  output, when built against a recent FFmpeg system library (bug 9026).

  This is now fixed with version 1.7.2, also providing many new features and
  bug fixes. A workaround is also included for further video playback issues
  (bug 11490).

  This updates also introduces the rapidjson package in Mageia 6, which is a
  build dependency for recent PPSSPP.

References:
 - https://github.com/hrydgard/ppsspp/issues/9026
 - https://github.com/hrydgard/ppsspp/issues/11490


RPMs in core/updates_testing:
=============================

rapidjson-1.1.0-1.mga6

RPMs in tainted/updates_testing:
================================

ppsspp-1.7.2-1.2.mga6.tainted


SRPMs:
======

core:
  rapidjson-1.1.0-1.mga6
tainted:
  ppsspp-1.7.2-1.2.mga6.tainted
Comment 18 JanKusanagi 2018-11-07 15:49:32 CET
@ Rémi, everything's still fine with 1.7.2-5.mga7 =)
Comment 19 Thomas Andrews 2018-11-15 22:45:53 CET
Something's not right here.

I installed the older ppsspp on my 64-bit Plasma system, and it installed cleanly. I do not have any PlayStation games, so could not test that out.

But, when I went to use Mageia Update to test if the update would install cleanly, it did not come up with the new rapidjson as a dependency, as described in Comment 11 and Comment 17. In fact, rapidjson did not appear on the Mageia Update list at all. And as I look at "New Dependencies" in the update's description, it tells me all dependencies are installed. 

Backing out of Mageia Update and going to drakrpm with testing repos still enabled, I see both ppsspp and rapidjson, but when selected they do not show as dependent on one another.

As it stands now, if a user were to update ppsspp using Mageia Update, he would not get the rapidjson package with it.

CC: (none) => andrewsfarm

Comment 20 Rémi Verschelde 2018-11-16 08:54:44 CET
As mentioned in comment 15, rapidjson is only a build time dependency for ppsspp - it's used when building the package, but does not need to be installed on the users' system afterwards. So all good :)
Comment 21 Rémi Verschelde 2018-11-16 08:55:50 CET
Yet rapidjson still needs to be pushed with this update candidate, so that's it's available in Mageia 6 next time we want to build a ppsspp update.
Comment 22 Thomas Andrews 2018-11-16 15:36:21 CET
(In reply to Rémi Verschelde from comment #20)
> As mentioned in comment 15, rapidjson is only a build time dependency for
> ppsspp - it's used when building the package, but does not need to be
> installed on the users' system afterwards. So all good :)

Thanks, Remi. I had missed that. Skipped over it, I guess. Going to claim a "senior moment."

The ppsspp package updated cleanly, and rapidjson installed cleanly on my 64-bit system. Since the OP says ppsspp now works properly, it must be that rapidjson does, too.

On the basis of all that, giving this a 64-bit OK, and validating. Advisory in Comment 17.

CC: (none) => sysadmin-bugs
Whiteboard: (none) => MGA6-64-OK
Keywords: (none) => validated_update

Comment 23 Lewis Smith 2018-11-17 21:23:08 CET
Advisory done from comment 17.

CC: (none) => lewyssmith
Keywords: (none) => advisory

Comment 24 Mageia Robot 2018-11-17 23:24:25 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2018-0172.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.