Cutscene video with FFmpeg: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(Created page with " == History: ROQ == Historically, ROQ was the only video format supported by Doom 3 and TDM. All the missions created before TDM 2.06 use ROQ format for their briefings. The...")
 
No edit summary
Line 20: Line 20:
If you use wrong type of container, then TDM would generate a warning "''Opening video file "%s", which is compressed inside PK4''", and the video will not play properly.
If you use wrong type of container, then TDM would generate a warning "''Opening video file "%s", which is compressed inside PK4''", and the video will not play properly.


'''IMPORTANT:''' Use '''mp4'''/'''m4v''' or '''avi''' containers for video files!
'''IMPORTANT:''' Use MPEG-4 or AVI container! So the video file must have one of the following extensions: '''mp4''' or '''m4v''' or '''avi'''
 
== Play video with sound ==
 
'''TODO'''
 
== Automatic duration ==
 
'''TODO'''




Line 32: Line 40:


Issue [http://bugs.thedarkmod.com/view.php?id=4535 4535]: Showing video for its full duration
Issue [http://bugs.thedarkmod.com/view.php?id=4535 4535]: Showing video for its full duration
All related cvars start with the common prefix "'''r_cinematic_'''".


{{editing}}
{{editing}}

Revision as of 17:47, 10 November 2017

History: ROQ

Historically, ROQ was the only video format supported by Doom 3 and TDM. All the missions created before TDM 2.06 use ROQ format for their briefings. The ROQ is rather old and weird, and it is not supported by most software. That's why it is considered a "legacy" option now.

Common formats

Since 2.06, most of the video formats can be used in TDM directly. In order to achieve it, specify the path to your video file in the videoMap keyword of the material definition (just as usual).

You can encode the video with any codec supported by the libavcodec/FFmpeg (see the approximate list). But please be wise in codec choice: better use common and widespread codecs with default options. Codecs XVID and x264 are good examples here.


Although FFmpeg supports many different containers, TDM can only play a limited set of them from inside a pk4 file. If you use wrong type of container, then TDM would generate a warning "Opening video file "%s", which is compressed inside PK4", and the video will not play properly.

IMPORTANT: Use MPEG-4 or AVI container! So the video file must have one of the following extensions: mp4 or m4v or avi

Play video with sound

TODO

Automatic duration

TODO


References

Forum thread "Why ROQ" about FFmpeg cinematics.

Issue 4159: Investigate using videos of common formats

Issue 4534: Playing sound stream from video file

Issue 4535: Showing video for its full duration

All related cvars start with the common prefix "r_cinematic_".