Jump to content


Photo

[2.06] Videos without ROQ

video

13 replies to this topic

#1 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 28 May 2018 - 08:50 AM

*
POPULAR

In 2.06 you can use standard video formats for cutscenes: no need to mess with long-forgotten ROQ any more.

This wiki page explains how to set it up, including the question how to play audio embedded in the video file.

Note that video files must have extension .mp4 or .m4v or .avi, other extensions won't work properly.

 

P.S. And in case of any trouble with this feature, I am the most suitable person to ask.


  • Bikerdude, Judith, PsymH and 6 others like this

#2 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 20228 posts

Posted 28 May 2018 - 12:10 PM

For anyone wanting to see a working example, Goldwell I would say is the most likely candidate for either changing the vids in his current FM's or using the new formats in his next FM.



#3 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1595 posts

Posted 28 May 2018 - 02:03 PM

Thats brilliant, man. A much more versatile system, will make it a lot easier to design briefings now. Even if you can create a sort of stop motion intro, using images and text, with the current "bookpage" system in place, I reckon even those would be preferable as videos, as you can control the timing of the stills and use sound on several layers. 

 

A question, though: could this system be used inside missions, as video cutscenes? Maybe applied to GUIs?



#4 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9043 posts

Posted 28 May 2018 - 02:11 PM

Yes, it's material defined so you can have video textures (etc). Just don't go hog-wild or you'll destroy performance.
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#5 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1650 posts

Posted 28 May 2018 - 02:32 PM

For anyone wanting to see a working example, Goldwell I would say is the most likely candidate for either changing the vids in his current FM's or using the new formats in his next FM.

 

+1, compare how ROQ destroys the quality of SoN I intro vs. the YT .mp4 version:

 

 

 


  • stgatilov likes this

#6 Goldwell

Goldwell

    Team Member

  • Active Developer
  • PipPipPipPip
  • 2425 posts

Posted 28 May 2018 - 03:57 PM

For anyone wanting to see a working example, Goldwell I would say is the most likely candidate for either changing the vids in his current FM's or using the new formats in his next FM.

 

Yes that assumption is correct, I am currently in the process of updating all of my FMs, I am going through and doing bug fixes and updating the briefing videos from ROQ to MP4 too. However I wasn't planning to reveal anything about that until the project was finished.

 

I haven't had enough time to tweak or setup anything yet though, so i'm probably not the best source of information or example at the moment.


  • Bikerdude, Abusimplea and Petike the Taffer like this

The Accountant
Part 1: Thieves and Heirs | Part 2: New In town

 

Shadows of Northdale Campaign

ACT I
 
Stand Alone Missions
Lord Edgar's Bathhouse | Spring Cleaning


#7 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 28 May 2018 - 11:01 PM

A question, though: could this system be used inside missions, as video cutscenes? Maybe applied to GUIs?

Probably  :laugh:

 

Theoretically, a video is still just a material which can be put on objects. The concept did not change in this sense. So you can probably do with new videos whatever you could do with ROQ, even texture 3d objects with them. If you use embedded sound, then it gets a bit more complicated and fragile.

But I did not test anything except replacing the single-mission briefing cutscenes. If you test some non-standard scenario, please write here about it. I would like to hear both positive and negative outcomes. In the positive case, I'll know what is possible, and in the negative case, there is a chance to fix it in future.

 

The video cutscene inside mission does not sound any different from normal briefing cutscene. But since there is no stock GUI code for in-mission cutscenes, you will have to set up GUI yourself.

Applying videos to GUI elements is exactly how things work internally. You can specify a material to any GUI element, and you can use e.g. a looping video for a button. But I think having too much videos is not a good idea.

BTW, there is a FM "Score to Settle", where two looping ROQ videos are being played on same screen with GUI text around. And it plays well with FFmpeg playback.

 

Note that in 2.06 all videos (including ROQ) are played with the same FFmpeg code. The old ROQ-playing code is no longer used (but can be enabled by cvar).


  • RPGista and Goldwell like this

#8 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 17 June 2018 - 03:41 AM

Attention to everyone who has started creating new videos or intends to do so before 2.07.

 

FFmpeg is a huge library with tons of codecs and formats, and the actual set of supported formats greatly depends on how it was configured.

It is hard to keep this set constant over time, which can potentially result in breaking TDM cutscenes regularly in some distant future.

To avoid breaking maps, there is a plan to restrict the set of supported formats/codecs to the bare minimum.

This way the chance of breaking existing video files should become much lower.

 

Unfortunately, the unrestricted FFmpeg is already released with TDM 2.06, so the restricted version will be used starting from 2.07.

It means that if you now add FFmpeg cutscenes in wrong format to your missions, then they won't play in 2.07.

This is why your attention is important here  :unsure:

 

After some internal discussion, we decided to start with this set of codecs and containers:

containers:
    avi
    m4v
    mp4
    roq

video codecs:
    h264
    mpeg4
    roq

audio codecs:
    mp3
    aac

As you see, it provides two options in each domain (in addition to legacy roq).

One option is usually the most widespread currently (i.e. mp4+h264+aac), and the other option is something which was popular in the past (avi, mpeg4, mp3).

 

BTW, all the above-mentioned codecs (except roq) are patent-encumbered. Our conclusion is that it is not a problem for TDM given that the game is free and will remain free for eternity.

There exist completely free codecs and formats (ogg+theora+vorbis and webm+vp8+opus), but it seems that they are so unpopular that it is hard to find a converter which could create such videos.

 

 

 

The plan is to come to final conclusion about the set of codecs/formats in the nearest future.

After that I'll probably release a tool (e.g. ffplay.exe) which could be used to check that a video is going to be playable in uncoming TDM 2.07.

 

If you already have done some work for compressing videos for TDM 2.06, please check which container, video codec and audio codec you used.

Any comments on the situation are welcome  :)



#9 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 488 posts

Posted 17 June 2018 - 03:26 PM

As the list of stuff to support for backwards-compatibility reasons will never shrink, i would recommend to start as small as possible with only roq, mp4, h264, aac.

Also the restricted FFmpeg should be released as a "quick fix" for 2.06. As no assets change, it would be a rather small one and would prevent any problems when 2.07 gets released around xmas or later.


Edited by Abusimplea, 17 June 2018 - 03:28 PM.

  • stgatilov likes this

#10 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 21 June 2018 - 12:24 AM

Also the restricted FFmpeg should be released as a "quick fix" for 2.06. As no assets change, it would be a rather small one and would prevent any problems when 2.07 gets released around xmas or later.

I'm afraid such hotfix needs more work than you think.

Doing it for one change which neither affects player nor affects existing missions is overkill.


  • Springheel likes this

#11 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 28 June 2018 - 11:12 AM

I have stripped FFmpeg libraries in the current developer's trunk.

You can find the rules about which videos are supported and which are not on the main wiki page about FFmpeg cinematics.

 

If you create a video right now, you can check it for compatibility with future 2.07 version using ffmpeg test build.

The build consists of two files, which are simply TDM binaries of the current trunk.

You can copy them to your 2.06 installation and run them from there just as you usually run TDM.

 

With ffmpeg test build, you can use testVideo command to check that your video plays well.

I have described how to use testVideo command in "Quick test" section.

 

Note that using the ffpmeg test build for anything except starting some map and calling testVideo command is not supported and not recommended.

Do not play or dmap with it  :D  

 


  • RPGista likes this

#12 kingsal

kingsal

    Member

  • Member
  • PipPip
  • 355 posts

Posted 01 July 2018 - 10:35 AM

This is incredible and a huge addition to the mod. I just hooked up my missions with the high res .mp4s and it adds so much.

 

Huge thanks for doing this!!



#13 kingsal

kingsal

    Member

  • Member
  • PipPip
  • 355 posts

Posted 15 July 2018 - 12:19 PM

Found a minor bug- The wiki states:

 

It is no longer necessary to explicitly specify the duration of a video file, as it was for the ROQ files.

 

Goldwell and I have both tested this and its necessary to specify a time in milliseconds in order to bring the objectives screen up after the video is done. 



#14 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1049 posts

Posted 15 July 2018 - 01:21 PM

Found a minor bug- The wiki states:

It is no longer necessary to explicitly specify the duration of a video file, as it was for the ROQ files.

Goldwell and I have both tested this and its necessary to specify a time in milliseconds in order to bring the objectives screen up after the video is done. 

This is strange.

 

I added the following code to stock mainmenu_briefing_video.gui:

// #4535: this event fires up only for non-legacy (i.e. FFmpeg-based) videos
onNamedEvent CinematicEnd
{
  // Hide video
  set "HideBriefingVideo::notime" "0";
  resetTime "HideBriefingVideo" 0;
}

Unless something got broken, it should do an action equivalent to end of video duration.

 

If you have custom gui file, then you have to intercept this event yourself.

Also, all sort of debriefings, campaigns, and SDK-controlled videos are not modified to intercept this event.





Reply to this topic



  



Also tagged with one or more of these keywords: video

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users