View Issue Details

IDProjectCategoryView StatusLast Update
0004847The Dark ModCodingpublic26.06.2018 17:37
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product VersionTDM 2.06 
Target VersionTDM 2.07Fixed in VersionTDM 2.07 
Summary0004847: Support FFmpeg videos in testVideo command
DescriptionThere is testVideo command, which allows to check that video file is loadable and plays correctly.
However, it does not work with FFmpeg videos now.

The goal is to support FFmpeg cinematics in it, including the withAudio case.
TagsNo tags attached.

Relationships

related to 0004519 resolvedstgatilov Investigate using videos of common formats (avi, mp4) 
related to 0004845 resolvedstgatilov Restrict set of features in FFmpeg cinematics 

Activities

stgatilov

stgatilov

24.06.2018 10:07

administrator   ~0010572

Last edited: 24.06.2018 10:08

Committed in svn rev 7510.

I had to do a terrible hack to support sound: the poiner idCinematic* is printed in hexadecimal format and inserted into __testvideo:%p__ sound name. Then it is passed into sound engine, which has a special case for such name in two places. As a result, idSoundSample::LoadFromCinematic is called with the pointer parsed from sound name.

Also I now allow test cinematics to leak. Instead of deleting cinematics when new one is created, I let it live forever. This is necessary to avoid crash due to sound thread accessing the deleted cinematics.
Note that this memory leak affects only test videos. Normal cinematics are attached to material, so they are destroyed when material is.

stgatilov

stgatilov

24.06.2018 10:12

administrator   ~0010573

Last edited: 24.06.2018 10:13

In order to use the command you must be already in game. testVideo does NOT work in the main menu. I suggest starting Closemouthed Shadows FM since it is a very small mission --- fast to load.


The command syntax is:

1. testVideo video\briefing_video.roq
   Opens corresponding video without sound (even if it is present in the file). The engine tries to simultaneously load a wav-file with same name if it is present, but usually it fails =)

2. testVideo video\briefing_video.roq withAudio
   Opens corresponding video with sound taken from it. Note that "withAudio" must be second parameter, not the first one.


In any case, after you run the command, you should see the video running in a rectangular part of your screen. When the cinematic ends, it disappears.

stgatilov

stgatilov

26.06.2018 17:37

administrator   ~0010589

Wrote about testVideo command on wiki:
  http://wiki.thedarkmod.com/index.php?title=Cutscene_video_with_FFmpeg#Quick_test

Issue History

Date Modified Username Field Change
23.06.2018 10:56 stgatilov New Issue
23.06.2018 10:56 stgatilov Status new => assigned
23.06.2018 10:56 stgatilov Assigned To => stgatilov
23.06.2018 10:57 stgatilov Summary Resurrect testVideo command and in it => Support FFmpeg videos in testVideo command
23.06.2018 10:57 stgatilov Description Updated
23.06.2018 10:58 stgatilov Relationship added related to 0004519
23.06.2018 10:58 stgatilov Relationship added related to 0004845
24.06.2018 10:07 stgatilov Note Added: 0010572
24.06.2018 10:08 stgatilov Note Edited: 0010572
24.06.2018 10:12 stgatilov Note Added: 0010573
24.06.2018 10:13 stgatilov Note Edited: 0010573
24.06.2018 10:13 stgatilov Status assigned => resolved
24.06.2018 10:13 stgatilov Fixed in Version => TDM 2.07
24.06.2018 10:13 stgatilov Resolution open => fixed
26.06.2018 17:37 stgatilov Note Added: 0010589