View Page Source

Revision (current)
Last Updated by fsvgm777 on 1/16/2024 6:24 PM
Back to Page

%%TOC%%

This page is dedicated to teaching the publication process, including official encoding aspects and publishing tips. If you just want to make a casual encode of a movie, visit __[EncodingGuide/CasualEncoding|Casual Encoding]__.

__If you are a Publisher or an Encoder, subscribe to [Forum/Topics/14327|this thread]__ to get updated about changes in the workflow.


!!!! Capturing lossless AVI


!!! Dump the video

----

First of all, you need to dump lossless video from the emulator. Use a lossless codec that works with [http://en.wikipedia.org/wiki/Video_for_Windows|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 while 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).

----

!! Downloads

* [http://lags.leetcode.net/codec.html|Lagarith Installer]
* [https://github.com/umezawatakeshi/utvideo/releases|UtVideo Installer]

----

!! Emulator settings

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

----

!! Codec settings

Lagarith
* Check __Enable Null Frames__
* Check __Use Multithreading__
* Select __Mode__: RGB (Default)

UtVideo
* Select __UtVideo RGB VCM__ in codec list and configure it
* Set __Intra-frame prediction type__ to __Predict Median__

!!!! Encoding


!!! Set up the package

----

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

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

Every publication needs two encodes. The first one (Standard Definition at 480p) is uploaded to Archive.org, the second one (High Definition) is for YouTube.

----

!! Downloads

* TASEncodingPackage with all encoding dependencies:
** [https://github.com/TASEmulators/TASEncodingPackage/archive/refs/heads/x64.zip|64-bit version]
** [https://github.com/TASEmulators/TASEncodingPackage/tree/x64|Code repository]
* [https://github.com/AviSynth/AviSynthPlus/releases/|AviSynth+ installer]
* [http://virtualdub.sourceforge.net/|VirtualDub portable]
* [http://notepad-plus-plus.org/download/|Notepad++ installer] for adjusting the script
* [https://sourceforge.net/projects/feos-tas/files/userDefineLang.xml/download|AviSynth synthax highlighter] (paste __%AppData%\Notepad++__ in windows explorer address line and put the file there)

----

!! Your files

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

Since you will encode in several resolutions, and intended aspect ratio can change drastically between systems, the script is configured to use several files for a logo:
* {{logo.png}} - standard definition
* {{hdlogo.png}} - high definition
* {{logonds.png}} - standard definition for NDS
* {{logohdnds.png}} - high definition for NDS
* {{logoGrey.png}} - high definition for VirtualBoy
You might never need some of them, but it's required to use at least the first two, to prevent great loss in picture quality to resizing.

* See [Encoding Guide / Logo] for what should be on your logo. Note also that your logo must be approved by a [Staff|Senior Publisher].

----

!! YouTube upload

Uploading to YouTube is done on YouTube itself. If you are an editor for TASVideosChannel, simply follow the following steps:

1) Switch over to TVC (Google Account profile pic -> Switch Accounts)%%%
2) Click on Upload and drag-and-drop the YouTube encode.%%%
3) Put in a title and, optionally, a description.%%%
4) Click Next several times, then wait for it to be uploaded.%%%

----

!!! Adjust the AviSynth script

----

Open __encode.avs__ in __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 frame numbers from the encode and to adjust the subtitles (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 you don't have the [https://www.microsoft.com/en-us/download/details.aspx?id=48145|Visual C++ Redistributable] installed, one of the scripts won't load.

----

!! Multiple segments

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. [Forum/Posts/462891|Here's a post] describing how to use it.

----

!! Movie length

As you preview your encode in __VirtualDub__, navigate to the movie ending. The idea is to present all contents of the game in the encode, but keep it as small as possible.

* If the game restarts, select the frame right before 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, and the picture does not change, find the frame when the first full loop ends

Copy the framenumber and paste it as the "trimframe" value. The script assumes you are using the preview to figure out the trimframe, and automatically subtracts the logo length.

----

!! Subtitles

! Movie info

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

* The game name
* The branch name, if applicable (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 is broken, showing an unfairly low number, write "unknown".

* __Always double-check the game names put into submissions. Always apply [PublisherGuidelines#GameName|our standards] to them.__

! Timing and placement

* __subFF__ is the first frame for subtitles. Use the first frame of the first level for that.
* __subEntry__ is how many subtitle entries (from 2 up to 4) are going to be present in the encode.
* __subYpc__ is in how many percent of the video height to shift the subtitles down by. Use 0 to have them on top, other positions must be figured out at previews.
* __subAlign__ gives the alignment relative to the encode width (which is automated depending on which align you use). 8 aligns to the center, 7 - to the left, 9 - to the right.
* __subXpc__ is used when you need to push the subtitles away from the screen edge. Leave 0 if you align at the center.
* __subFF2delay__, __subFF2delay2__ and __subFF2delay3__ are used when you need to have a delay between subtitle entries.

* __Always make sure that your subtitles don't cover any important in-game elements, action, overscan area or internal game borders (avoiding screen transitions is also a good habit). Adjust the timing and position if you have to. If unsure, ask in tasvideos chats (IRC or Discord), or send a private message to a Senior Publisher.__

!! LWLibavVideoSource for tricky codecs
LWLibavVideoSource is a source filter (e.g. AviSource) for AviSynth from the [http://avisynth.nl/index.php/LSMASHSource|LSMASHSource] plugin collection.
%%%__Pros:__
* Can decode anything that FFmpeg can, including sometimes-troublesome codecs like CamStudio and FFV1
* Doesn't care about bitness
__Cons:__
* Harder to use
* Must build an index file
* Slower than an installed codec
! How to use
# Download LSMASHSource from the above link, and copy the 32- and 64- bit LSMASHSource.dll files to the appropriate plugin locations.
# Instead of writing {{AviSource("file.avi")}} in your AviSynth script, you would write {{LWLibavVideoSource("file.avi", fpsnum=60000, fpsden=1001, format="RGB24")}}.
#* You __must__ supply accurate values for the {{fpsnum}} and {{fpsden}} parameters, or the filter will mess up the framerate. Check the dumped video's framerate and match it. For 59.94 fps NTSC video: {{fpsnum=60000, fpsden=1001}}. For 60.099 fps SNES video: {{fpsnum=60099, fpsden=1000}}. For 60 fps video: {{fpsnum=60}} (you can leave out {{fpsden}} and it will default to 1).
#* VirtualDub/FFmpeg/x264 don't like LWLibavVideoSource's default format, so you will always need to supply the {{format}} parameter. {{"RGB24"}} is a good default to use as it will do a lossless, fast conversion.
# The first time an AVS script with a call to {{LWLibavVideoSource}} gets executed, it will generated an index file for the source video with the extension {{.lwi}}.
#* If the script is loaded for the first time in VirtualDub, you will not see any progress meter and the program will simply appear to hang while the file is being generated. This could take an hour or more for 4K video!
#* You can instead run your script for the first time with {{ffprobe -hide_banner myscript.avs}} and you will get a progress indicator while the file is built.
# Dub the source video's audio with {{AudioDub( WavSource("file.avi") )}} as LWLibavVideoSource does not read any audio data.
! Troubleshooting
* This index file needs to stay with the source file or the filter will have to regenerate it each time.
* AviSynth seems to decide at random that it's time to rebuild the index file for no good reason. To avoid this, always make a backup copy of the {{.lwi}} file immediately, and set the original to read-only.
* The index doesn't seem to like being copied between computers. If you are getting an error message stating that the video track of the file could not found, you may need to let the index file get rebuilt on the new computer.

----

!!! Run global.bat

----

* Aspect ratio options
** If you encode for a handheld console, type __1__
** If your console is intended for use with a CRT TV, type __2__
** If your console is intended for use with an LCD TV, type __3__
** If you're encoding for a game that needs other aspect ratio (like multi-screen arcades), type 4 to enter the specific aspect ratio
* What encode do you want to do
** Encode all in one flow (__3__) or choose a 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


!!! Encode file names

----

__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.
* Separate multiple authors names with a comma (,) or an underscore (_).
* Encode type is usually only needed if it's an alternate encode (e.g. camhack or slowed down encode)
If not sure about a token, investigate similar publications, how their files are named. Example:

> battletoadsj-tasv3-1player-feos

----

!!! Upload to Archive.org

----

Upload __the downloadable 480p encode__.

* Go to https://archive.org/upload/ and drag'n'drop the file you are about to upload onto the gray area.
* The titles, as well as the item link, will be autofilled.
* 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.

----

!!! Cataloguing the submission

----

In order to be able to publish the movie proper, the submission needs to be catalogued. This is done as follows:
* On the submission, click "Catalog". This will bring up a page with the platform, framerate, game name and the ROM used. Generally, the platform and framerate are left untouched.
* If the game name is known, select it in the drop-down menu and click Update, if it hasn't been already selected. This will bring you back to the submission page. Click on "Catalog" again.
** If it isn't known by the site, then it will need to be created [Games/List|right here]. Fill out the info about the game there, including the game genre, then hit Save. Afterwards, follow the previous step.
* Select the ROM used, if it is known, then click "Update". If it isn't, a new entry will need to be created. Click on "New", then fill out the information about the ROM as needed (Version usually isn't necessary to be filled in). Click on "Save", then click on "Update".
* Select the goal of the TAS. If no goal has been created for the TAS so far, it will need to be created. Simply click on "New", then put in the branch label without quotes or {{baseline}} for a branchless movie, then click on "Create". Afterwards, select the newly created branch, then click on "Save".

Note: Currently, Octoshock submissions need to have the framerate changed to 59.94005994005994 FPS (approx. 60000/1001 FPS), as they default to the wrong framerate upon submission. This does not affect Nymashock movies, as they usually have a cycle count attached to them.

----

!!! Capture the screenshot

----

* 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 [http://advsys.net/ken/utils.htm#pngout|PNGOUT.EXE]

Note: For BizHawk using the Saturnus or Octo/Nymashock cores, you need to account for proper aspect ratio correction. Please check out [Screenshots#ResizingToAccountForProperAspectRatioCorrectionBizhawkUsingSaturnusAndNymaOctoshockCoresOnly|this section] for more details.


!!!! Publish the movie


!!! Claiming

----

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

* Edit its text and select __Publication Underway__ in the movie status drop-down list.
* Add a comment in the text under the horizontal ruler (4 minuses) like:
> [''''user:feos'''']: Processing...

Alternately, hit the Claim button.

----

!!! Publishing

----

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

* __Always double-check the game names put into submissions. Always apply [PublisherGuidelines#GameName|our standards] to them.__

* Set flags if any of them are appropriate.
* Type the movie file name, taking the name of encodes, just dropping away __-tas/-playaround__, and putting the author at the beginning:
> feosv3-battletoadsj-1p
* Choose screenshot from your computer
* Put the direct link to downloadable encode from the Archive.org collection into the __mirror site URL__ field.
* Put the YouTube HD stream link to the __online-watching URL__ field.
* For the Description and categories tab, type in the movie number 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, and the new time is actually shorter, you can calculate the frame difference yourself and manually create the module:
> This movie beats the [''''1000M|previous run''''] by [''''module:frames|amount=300|fps=ntsc''''] seconds
* If this run has [Commentaries|commentary], add a note about it to the movie description under a ruler ''''----'''', telling the user their form, and how to access them.
* Add tags 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.

For a movie that starts from a save RAM, the verificiation movie needs to be added as an additional movie file. Simply edit the publication, and add the verification movie as an additional movie file, following the same naming convention as the publication movie file, adding {{-verif}} at the end of the verification movie file name. Put {{Verification movie}} as the display name and click on Add.


!!!! More detailed information

!!! Links

----

* [Roles#Publisher|Publisher role]
* [Publisher Guidelines]
* [Encoder Guidelines]
* [EncoderGuidelines/EncodeChecklist|Encoding Checklist]
* [Screenshots]
* [Movie Tag Guidelines]

For troubleshooting, use [Forum/Subforum/52|Encoder forums] or [LiveChat|live chat with our staff members and encoders].