1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. Hey guys, we've posted the Results for the 30th Modeling Contest. Check them out!
    Dismiss Notice
  3. The 15th Mini-Mapping Contest came to an end. The Secrets of Warcraft 3 are soon to be revealed! Come and vote in the public poll for your favorite maps.
    Dismiss Notice
  4. The 12th incarnation of the Music Contest is LIVE! The theme is Synthwave. Knight Rider needs a song to listen to on his journey. You should definitely have some fun with this theme!
    Dismiss Notice
  5. Join other hivers in a friendly concept-art contest. The contestants have to create a genie coming out of its container. We wish you the best of luck!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Custom Movie Tutorial (patch 1.30.1+)

Discussion in 'General Mapping Tutorials' started by Tommi Gustafsson, Oct 30, 2018.

  1. Tommi Gustafsson

    Tommi Gustafsson

    Joined:
    May 26, 2017
    Messages:
    270
    Resources:
    6
    Tools:
    1
    Maps:
    2
    Tutorials:
    3
    Resources:
    6
    Warcraft III has capability of playing movies similar to Blizzard's intro and ending movies. However, you need to know to what format to encode your movie that it works in the game. The video format changed with the patch 1.30, and a working support for custom movies was added in patch 1.30.1.

    Warcraft III Movie Resolution and Frame Rate
    By default, Warcraft III supports movies with a maximum width of 800 pixels. Therefore, a 16:9 movie will be 800x450 pixels in size. Blizzard used about 24 frames per second in their movies, but in this tutorial we will encode them with 25 frames per second. We also found that using about 25 fps for the movie helps it to play correctly with low-end computers, which might have performance problems decoding higher frame rate movies.

    Preparing Your Movie
    You can create your movie in any video editing software and then export it to MP4 or similar common format. It can be in any resolution and frame rate as long as it is at least 800x450 @ 25 fps. For the Gnoll Campaign intro movie, we used Final Cut Pro X and exported it to 1920x1080 @ 50 fps MP4. It was also the format we uploaded it to YouTube.

    Encoding Your Movie for Warcraft III 1.30 and later
    Warcraft III 1.30 uses a very specific format for movies. You also need to encode video stream and audio stream separately.

    Encoding Video Stream
    You need to encode the video stream into VP9 AVI using the Constant Quality (CQ) mode. You can do this using the FFMPEG command line tool. This is how you do it:

    Code (Text):
    ffmpeg -i "Your Source Movie.mp4" -c:v libvpx-vp9 -crf 30 -b:v 0 -s 800x450 -r 25 -an WC3Movie.avi
    -c:v libvpx-vp9 makes FFMPEG to use the VP9 codec.
    -crf 30 determines the quality. We found that 30 was quite good.
    -b:v 0 must be 0 to enable the CQ mode.
    -s 800x450 scales the video down to 800x450.
    -r 25 set the frame rate to 25.
    -an removes the audio track.

    The end result is WC3Movie.avi, which is a VP9 CQ AVI file. It can have any name, but the extension must be avi.

    Encoding Audio Stream
    The audio stream needs to be encoded to MP3. You can do it also with FFMPEG.

    Code (Text):
    ffmpeg -i "Your Source Movie.mp4" -c:a libmp3lame -b:a 128k -vn WC3Movie.mp3
    -c:a libmp3lame makes FFMPEG to encode using the MP3 codec.
    -b:a 128k sets the bitrate to 128 kbps.
    -vn removes the video stream.

    The end result is WC3Movie.mp3. It must have the same name as the video stream file, except the extension is mp3.

    Importing the Encoded Files to Warcraft III
    When you have the files ready, you need to import them to Warcraft III. In campaigns, you can import them using the campaign import manager (F7). After importing, you need to change their paths to

    Movies\WC3Movie.avi
    Movies\Audio\WC3Movie.mp3

    Creating a Movie Map to Campaign
    The next step is to create a separate movie map to your campaign. You need to create some triggers and import a few files. The purpose of the files is to remove all useless user interface and make the screen look totally black. The triggers are used to do the same and finally play the movie.

    You can find an example one in our Gnoll Campaign. Download it (version C1R5 or later) and open it in the World Editor using the Campaign Editor (F7). Export the CinematicIntro.w3x map or open it through the Edit Map command. You will see that the triggers look like this:

    movie-triggers.png

    You can see here that
    • Game music is first stopped.
    • Game screen is made black with the Black Mask.
    • Letter Box Mode is used to remove the user interface (letter box mode graphics are removed by imports).
    • Custom Script "call PlayCinematic" is used to play the movie at the end of the map. In the Gnoll Campaign, the movie is named GCIntro. If you used WC3Movie, then you need to use it also here.
    • Wait 0.00 seconds is needed or things do not work.
    • Next level is set to Chapter 1.
    • The game is finished immediately, skipping dialogs and scores.
    Now the movie will play immediately on startup and the game will automatically move to the next chapter after the movie.

    You can import CinematicIntro.w3x into your campaign or create a similar one. You need to change the loading screen, though.

    Playing the Movie
    You can now play the movie by clicking its button in the campaign main screen.

    Playback Problems
    Movies may not work on Windows 7. They have been tested to work on Windows 10 and macOS High Sierra.
     
    Last edited: Oct 30, 2018
  2. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,427
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Really cool to know, didn't know they had changed this with 1.30.

    Approved!
     
  3. winter twilight

    winter twilight

    Joined:
    Jun 9, 2019
    Messages:
    27
    Resources:
    0
    Resources:
    0
    is it possible to change move to a lot of blp images and a mp3 sound and use the images as a filter mask then play them in turn with 0.01 wait trigger ?play mp3 file fade using "first image "in 0 second wait 0.01 second fade using "2nd image "....
     
  4. Tommi Gustafsson

    Tommi Gustafsson

    Joined:
    May 26, 2017
    Messages:
    270
    Resources:
    6
    Tools:
    1
    Maps:
    2
    Tutorials:
    3
    Resources:
    6
    This tutorial is not about showing images in-game but about playing movies before, after, or in-between chapters of a campaign, using the PlayCinematic native.
     
  5. winter twilight

    winter twilight

    Joined:
    Jun 9, 2019
    Messages:
    27
    Resources:
    0
    Resources:
    0
    Hi.
    i don't mean to show pictures i mean to show a lot pictures instead of a real movie
    picture 1 >picture 2 >picture 3 >pictures 4 > ...
    00:01.01>00:01.02>00:01.03>000:01.04> ...
    and the mp3 file is playing
    so i think it will work as a movie
    does it work ?
    tx for you answer
     
  6. Tommi Gustafsson

    Tommi Gustafsson

    Joined:
    May 26, 2017
    Messages:
    270
    Resources:
    6
    Tools:
    1
    Maps:
    2
    Tutorials:
    3
    Resources:
    6
    It would be highly impractical and has nothing to do with this tutorial.