Jump to content
The Dark Mod Forums

[2.06] Videos without ROQ


stgatilov

Recommended Posts

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?

Link to comment
Share on other sites

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:

 

 

 

  • Like 1
Link to comment
Share on other sites

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.

  • Like 2
Link to comment
Share on other sites

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).

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

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 :)

Link to comment
Share on other sites

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
  • Like 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 0 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...