TASVideos

Tool-assisted game movies
When human skills are just not enough

Encoding Guide / Publication Manual

<< Encoding Guide

This page is dedicated to teaching the publication process, including official encoding aspects and publishing tips. If you just want to make a custom encode of a movie, visit Custom Encoding.

If you are a Publisher or an Encoder, subscribe to this thread to get updated about changes in the workflow.

Capture lossless AVI

First of all, you need to dump the lossless video from emulator. Use a lossless codec for that, which works with VideoForWindows. CamStudio and Lagarith are the best choices. The size of the lossless dump does not affect the resulting video encode size, so aim for dumping speed, choosing your codec and settings. Still use some compression to avoid 2GB+ files, which are hard to preview (some emulators allows splitting at that mark).

See Encoding Guide / Video Dumping page for how to set up emulators to capture AVI.

CamStudio

  • Check the GZIP radiobutton
  • Select the desired compression Level (start from Level 5, that leaves room for speeding up the emulator)

Lagarith

  • Check Enable Null Frames
  • Check Use Multithreading
  • Select Mode: RGB (Default)


Encode the video

Set up the package

The TASVideos comunity has developed an all-in-one script package that does:

  • audio encoding
  • video encoding
  • audio and video muxing
  • YouTube stream uploading

Every publication needs three encodes. The first 2 (Standard Definition) are uploaded on Archive.org, the third (High Definition) is for YouTube.

  • Primary downloadable (10bit444)
  • 512kb stream, secondary downloadable (8bit420)
  • HD stream

Extract the encoding package to any folder, put the AVI you dumped in the root package folder, name it movie.avi.

You can use 2 logos (for HD and SD separately), or only one. When using only one, it's desired to have it in a good resolution, to avoid artifacts when upscaling. The recommended resolution is 960x720. For a single logo, uncomment # file = "logo.png" and comment out file = hd ? "hdlogo.png" : "logo.png"

This is triggered automatically once the HD encode is done (see below), but you need to edit *\programs\credentials.txt first. Use your forum name as a username, and the password can be obtained here: https://encoders.tasvideos.org/transform.html

As uploading starts, the batch will open this link in your browser, so that you can control the process and get the YT link after sideoading finishes.

First it is uploaded to TASVideos server, using your identity, then every 45th minute the sideloading is triggered, which means the file gets uploaded to YouTube.

Adjust the AviSynth script

Open encode.avs with Notepad++, it's a text file, so you can edit it. Make sure to keep the AVS script, the BAT script, logo and movie files in the same folder. All other dependencies lie in specific folders of the package.

Preview is done by drag'n'dropping the AVS script into VirtualDub window, to pick the frame numbers from the encode and to adjust the subtitles position (and also to check if all is working as you wish). Each time you edit the script, save it in Notepad++ and press F2 in VirtualDub to reload the updated source file.

If the dump is too huge, you will get several AVI files split near 2GB. If there are only few of them, you can import them as a single command:

AVISource("movie.avi", "movie_02.avi")

But if the amount of segments is big, it's not useful to do the above. For that, we have the AppendSegment() function. If you are going to use it, comment the normal AVISource line out (putting # before it) and uncomment the AppendSegment line (removing #).

AppendSegment accepts the following parameters:

  • Base string, the word all segments have in common, like "movie_".
  • The number of the first segment. Can be 1 or 0. If the first segment doesn't have a number, and the rest have, add the according number to it.
  • The number of the last segment you want to import.
  • The format string, telling the script how those numbers are formatted. If they are padded with zeros, you add 0 before the integer. The integer itself stands for the amount of digits the number has. The fractional part if not used, leave it ".0"
  • The target width you want to resize to. Required when the segments have different resolution. Default value is 0, which means no resizing.
  • The target height you want to resize to. Required when the segments have different resolution. Default value is 0, which means no resizing.

AppendSegment("movie_", 0, 72, "%03.0f", 320, 240)

The above means that you have 73 segments (0 - 72), each looks like "movie_004.avi", and you're resizing all the segments to 320x240.

Drag and drop your movie dump into the VirtualDub window. Navigate to the movie ending. The idea is to present all contents the game has in the encode, but keep it as small as possible.

  • If the game restarts, select the frame right before restart
  • If it does not restart:
    • If the music stops playing at some point, where nothing new is shown visually, pick the frame when it stops playing.
    • If the music loops, fing the frame when the first full loop is over (considering the picture does not change)

Copy the framenumber and paste it as a "trimframe" parameter. Add "- 120" to it to disregard the logo length. If your framerate is 120fps, or 50fps, or even 30fps, calcluate the length of the logo in frames yourself and subtract that value.

This and the following steps imply you drag'n'drop not the source movie file into VirtualDub, but the very AVS file.

Movie info

Go to the submission page and copy/paste into the corresponding script strings:

  • The game name
  • The branch name (paste inside 'such quotes', so that the result looks like that "'branch'")
  • The Author's name
  • The completion time
  • The rerecord count
If the rerecord count was broken, showing an unfairly low number, write "unknown".

Timing and placement

  • subFF is the first frame for subtitles. Use the first frame of the first level for that.
  • subYpos is the pixel to shift the subtitles down from. Use 2 to have them on top, other positions must be figured out at previews.
  • subAlign gives the alignment relative to xpos (which is automated depending on align you use). 8 aligns to the center, 7 - to the left, 9 - to the right.

Font

The default AVISynth subtitles font is not used, because it looks bad in low and high resolutions. Instead, we use the bitmap pixel fonts for SD encodes and a BigHalo function for default fonts for HD. These are automated, but you may want to change the exact to use for SD, so edit the script where it links to the font file (browse the fonts folder with the included program to choose the font file).

Since some day, Youtube supports 60 fps video uploads. It means we don't have to reduce the framerate of our videos that are supposed to go there. But due to Youtube carelessness, we can't rely on it in two cases: when there's really heavy alternate frame flickering in the video, and when the game originally runs at 30 fps.

  • blend - set to false if there's little to no alternate frame flickering in the video
  • ngdb - use ng_deblink(), the most powerful deblink function. It calculates which objects blink, creates a mask and blends within it (does not work for background shaking). Set to true to enable. If false, TASBlend is used instead. The latter might be handy, when it's the entire BG that flickers - ng_deblink() can't handle those.
  • halffps - set to true to cut every other frame out of the video, for games that duplicate every frame.

ng_deblink() parameters

  • Default: ng_deblink(0.5).SelectOdd - (30 fps, NTSC encodes)
  • Change 0.5 to 1.0 to get half framerate flickering.
  • Leave empty () for default; some transparency, some flickering - TASBlend style.

Run global.bat

  • If you encode for a TV-based console, type y when prompted, if it's handheld or Arcade, type n
  • Encode all in one flow (4), or choose the single method. Be ready to wait several hours for each encode.
After all is over, get your files in the output folder.

Prepare all files

gamenameregion-tasv#-branch-author_encodetype

  • The game name should be concise, use common abbreviations (smb for Super Mario Bros.) and precedent when possible (chipdale instead of chipndale). Required.
  • Add the region letter (j or e) if it is not USA (if USA version exists at all). Optional.
  • Use -tas if it's a speedrun, otherwise use -playaround. Required.
  • If it's not the first version of that game by the same author, add v2 (or any other appropriate number), otherwise avoid. Optional.
  • Add the branch name only if it is not default. Note: when setting percentage, use p instead of %. Optional.
  • For the Author's name, use a standard abbreviation of a long name if it exists (cad for CtrlAltDestroy). Separate multiple authors names with comma (,).
  • Encode type is added for 512kb (use that as a token), primary and HD encodes don't need that.
If not sure about a token, investigate similar publications, how their files are named. Example:

battletoadsj-tasv3-1player-nach

Upload primary downloadable and 512kb stream.

  • Go to https://archive.org/upload/ and drag'n'drop the 2 files you are about to upload onto the gray area.
  • The titles, as well as the item link, will be autofilled, but they might contain _512kb, that is in the second (mp4) file's name. Remove that part from both Page Title and Page URL.
  • In the Description field, provide the submission link
  • Subject Tags: some words from the submission page title, or just tas.
  • Select a specific collection from the pop-down list, if allowed: Speed Runs.
  • You might also need to remove the additional metadata.
Once all is done, press the Upload and Create Your Item button.

Make torrents for primary downloadable and 512kb stream.

  • Put these files in a folder where you keep torrent downloads.
  • Create torrents for them with the names like below. Make sure you uncheck the private marker.
battletoadsj-tasv3-1player-nach.mkv.torrent.
  • Pick the downloadable files links from your Archive.org item and paste them to Web-seeds field in the torrent creation dialog accordingly (1 encode - 1 torrent - 1 link).
  • Our tracker is http://tracker.tasvideos.org:6969/announce
  • Run the created torrents, pointing to those 2 encodes, start seeding.

  • Drag the lossless AVI to VirtualDub
  • Find the frame that has the most intense action
  • Press Ctrl + 1 and paste in standard Paint program.
  • Save as PNG, file name can be any.
  • Drag the file onto PNGOUT.EXE


Publish the movie

If you have started working on some submission for publication, notify other publishers you're already encoding it:

  • Edit its text and set the radiobutton Set to publication underway
  • Add a comment in the text under the horizointal ruler (4 minuses) like:
[user:feos]: Processing...

After all files are ready, click the Publish link on the submission page.

  • Select the tier in the Game header tab. The tier to publish to is chosen by a judge.
  • Set flags if any of them are appropriate in the Flags tab.
  • If the player entry you're publishing for exists already, pick it from the dropdown list in the third tab: Player -> Select player, otherwise the site will create a new one.
  • In the Files tab, type the movie file name, taking the name of encodes, just dropping away -tas/-playaround, and putting the author in the beginning:
nachv3-battletoadsj-1player
  • Choose screenshot and torrents from your computer. Fill the encode duration.
  • Put the direct links to downloadable encodes from the Archive.org collection into the mirror URL fields. Replace hppts with http, or webseeds won't work!
  • Put the YouTube HD stream link to online-watching URL field.
  • For the Description and categories tab, select the movie to be obsoleted (if it was decided by the judge), fill the description (1 paragraph about the game, 1 about how it was played in that TAS). If it obsoleted some movie, calculate the frame difference and put it in a module:
This obsoleted the [1000M|previous run] in [module:frames|amount=300] seconds.
  • If this run has commentary, add a note about it to the movie description under a ruler ----, telling the user their form, and how to access them.
  • Add categories listed by the submission author. Still, don't copy them blindly, some physics-abusing tricks do not mean it is Heavy glitch abuse, the same is with Heavy luck manipulation.

When you are sure all is done properly, click the Proceed button.

If the player entry you're publishing for is new, you will need to update it with forum account(s) (otherwise, pick it from the list prior publishing).

  • Go to Players page
  • Search on the page for an exclamation mark (Ctrl+F) - !. It denotes the player entry without linked forum account(s).
  • Make sure it's the player(s) you've just published for (the second player may be missing, click the exclamation mark to see the movie linked to the player entry: must be the one you've just published), and click Edit.
  • The top field is the player(s)' name(s) along with nickname(s). The latter goes after each player's name, in brackets.
  • The second field is nickname(s) only. For 2 players, use &. For 3 and more, use commas and &.
  • The right panel lists available forum account names that you should select the corresponding ones from, and add them to the Selected list. The order doesn't matter.
Sometimes, the player won't specify his/her name in the submission, so you would need to either check his/her other submissions for that matter, or don't fill the name at all, leaving only nickname in both fields.
  • When you're done, click Save.

Since autoupdating of youtuber title and description broke, you have to do the following:


Links


See those pages for more detailed, but potentially outdated information.

For troubleshooting, use Encoder forums or #tasvideos IRC channel at irc.freenode.net.



Combined RSS Feed
EncodingGuide/PublicationManual last edited by feos on 2017-06-02 16:12:36
Page info and history | Latest diff | List referrers | View Source