View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004507 | The Dark Mod | Coding | public | 15.04.2017 08:25 | 14.06.2018 07:16 |
Reporter | stgatilov | Assigned To | stgatilov | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | SVN | ||||
Target Version | TDM 2.06 | Fixed in Version | TDM 2.06 | ||
Summary | 0004507: Horrible performance of playing ROQ video from pk4 | ||||
Description | Playing some ROQ videos is very slow. | ||||
Steps To Reproduce | Start mission "A score to settle" and watch briefing videos. It is quite slow, FPS often drops to less than 5. Process explorer shows that TDM reads about 6 GB of data from disk during briefing playback. | ||||
Additional Information | Original ID's code for playing ROQ videos (located in renderer/Cinematic.cpp) was replaced with code calling FFMPEG library (located in renderer/CinematicFFMpeg.cpp). This changes were ported from dhewm3 repository into our x64 branch. Now the x64 branch is merged intro trunk, so we have to fix it. | ||||
Tags | x64 | ||||
Attached Files | 4507_duzenko_roq_fix.patch (838 bytes)
Index: renderer/CinematicFFMpeg.cpp =================================================================== --- renderer/CinematicFFMpeg.cpp (revision 6866) +++ renderer/CinematicFFMpeg.cpp (working copy) @@ -127,12 +127,22 @@ _packetTimeOffset = 0; _looping = looping; - return OpenAVDecoder(); + return true;// OpenAVDecoder(); } bool idCinematicFFMpeg::OpenAVDecoder() { _file = fileSystem->OpenFileRead(_path.c_str()); + if (idStr::FindText( _file->GetFullPath(), ".pk4/", false ) >= 0) { + byte *b = new byte[_file->Length()]; + _file->Read( b, _file->Length() ); + idFile *extrFile = fileSystem->OpenFileWrite( _path ); + extrFile->Write( b, _file->Length() ); + delete b; + delete _file; + delete extrFile; + _file = fileSystem->OpenFileRead( _path.c_str() ); + } if (_file == NULL) { | ||||
It turns out that the problem gets away if you unpack the videos from pk4 archive. So most likely the problem is caused by lots of seeking through pk4 file. The same problem applies to reading ogg files from pk4, see the related issue. |
|
Added code to unpack any video from a pk4 to fm/mission_name on first play. | |
I think this is a good solution for now. Taaaki and Greebo can pow-wow about tdm_updater or other options like making changes to the in-game downloader for 2.07 (etc) |
|
I have just committed the repacking code. More explanations in the related 4504 issue. |
|
I believe there is no reason for unpacking the videos from pk4 now. Duzenko, can I rollback your changes from revision 6844 now? Or at least put them behind cvar? |
|
By all means. Mine was just a temporary workaround. ... The less workaround stuff the better. |
|
Ok, I reverted revision 6844. Attached TortoiseSVN patch of it here (just in case circumstances change again in future). |
|
Date Modified | Username | Field | Change |
---|---|---|---|
15.04.2017 08:25 | stgatilov | New Issue | |
15.04.2017 08:25 | stgatilov | Status | new => assigned |
15.04.2017 08:25 | stgatilov | Assigned To | => stgatilov |
15.04.2017 08:26 | stgatilov | Relationship added | related to 0004504 |
15.04.2017 08:27 | stgatilov | Note Added: 0008794 | |
15.04.2017 08:46 | stgatilov | Tag Attached: x64 | |
01.05.2017 19:24 | duzenko | Note Added: 0008822 | |
02.05.2017 01:32 | nbohr1more | Note Added: 0008823 | |
02.05.2017 01:32 | nbohr1more | Note Edited: 0008823 | |
02.05.2017 01:33 | nbohr1more | Status | assigned => feedback |
02.05.2017 17:19 | stgatilov | Note Added: 0008826 | |
02.05.2017 17:19 | stgatilov | Status | feedback => assigned |
06.05.2017 17:22 | stgatilov | Note Added: 0008837 | |
06.05.2017 17:57 | duzenko | Note Added: 0008838 | |
06.05.2017 17:59 | duzenko | Note Edited: 0008838 | |
07.05.2017 02:12 | stgatilov | File Added: 4507_duzenko_roq_fix.patch | |
07.05.2017 02:13 | stgatilov | Note Added: 0008840 | |
07.05.2017 02:17 | stgatilov | Relationship added | related to 0004529 |
07.05.2017 02:26 | stgatilov | Status | assigned => resolved |
07.05.2017 02:26 | stgatilov | Fixed in Version | => TDM 2.06 |
07.05.2017 02:26 | stgatilov | Resolution | open => fixed |
14.06.2018 07:16 | nbohr1more | Relationship added | related to 0004835 |
17.07.2018 16:49 | stgatilov | Relationship deleted | related to 0004835 |