Wavu:Video recording tutorial

From Wavu Wiki, the 🌊 wavy Tekken wiki

This tutorial explains one way of recording videos as per Wavu:Videos. You don't have to make videos with this method. If you have another workflow that works better for you, use that.

This method uses a command line interface. If you'd prefer a graphical interface, Avidemux can be used for the trim and encode steps.

Setup

Configure OBS

Create a scene to capture Tekken 7 video:

  1. Open Tekken 7
  2. Press the "+" under the Scenes tab in OBS
  3. Press the "+" under the Sources tab in OBS and select "Game Capture"
    • Mode: Capture specific window
    • Window: [TekkenGame-Win64-Shipping.exe]: TEKKEN 7
    • Window Match Priority: Match title, otherwise find window of same executable

Change settings:

  • Output:
    • Recording Path: C:\Users\<username>\Videos
    • Recording Quality: Lossless Quality, Tremendously Large File Size
  • Video:
    • Base (Canvas) Resolution: 1920x1080 (whatever your Tekken resolution is)
    • Output (Scaled) Resolution: 1920x1080 (same as above)
    • Common FPS Values: 60
  • Hotkeys:
    • Start Recording: Shift + Q
    • Stop Recording: Shift + Q

Create scripts

Save this to C:\Users\<username>\Videos\trim.ps1:

Param(
   $InFile,
   [int32] $Sec0,
   [int32] $Frame0,
   $Duration,
   $OutFile = '_trim.avi'
)

$Sec = $Sec0 + ($Frame0 / 60)
ffmpeg.exe -y -ss $([math]::round($Sec, 3)) -i $InFile -c copy -t $Duration $OutFile

Save this to C:\Users\<username>\Videos\enc.ps1:

Param(
   $OutFile = '_encode',
   $InFile = '_trim.avi',
   $Scale = '640x360',
   [bool]$Mp4 = 1,
   [bool]$Nut = 1
)

if ($Mp4) {
   Write-Host "Encoding $InFile to $OutFile.mp4"
   ffmpeg.exe -y -i $InFile -an -b:v 0 -c:v libx264 -preset veryslow -crf 25 -vf "scale=$Scale" -pix_fmt yuv420p "$OutFile.mp4"
}

if ($Nut) {
   $Master = "Master/$OutFile.nut"
   Write-Host "Encoding $InFile to $Master"
   "-pass 1 -f nut NUL",
   "-pass 2 $Master" | ForEach-Object {
      ffmpeg.exe -y -i $InFile -b:v 0 -an -c:v ffv1 -level 3 -slices 4 -g 1 -context 1 -coder 1 -slicecrc 1 $_.split(' ')
   }
}

Remove-Item ffmpeg2pass*

Method

Open everything

  • Open OBS and select the Tekken scene
  • Open Tekken
  • Open the Videos folder in File Explorer
  • Open PowerShell and run cd C:\Users\<username>\Videos

Record

  1. Press Shift + Q (start recording)
  2. Do whatever you want to record in Tekken
  3. Press Shift + Q (stop recording)

Trim

  1. Open the recorded video in VLC
  2. Find the frame you want the video to start at:
    • Pause just before the exact frame
    • Use the "e" hotkey to step forward one frame at a time
    • Once you get to the frame you want, start counting frames until the time in the bottom-left corner changes, e.g. if it says 00:03, keep counting until it changes to 00:04, then subtract the amount you counted from 60
  3. In PowerShell, run ./trim.ps1 <infile> <sec0> <frame0> <duration>
    • <infile> is the name of the video file to trim, e.g. 2020-11-26_15-47-00.avi
    • <sec0> is the starting point in seconds, added with <frame0>
    • <frame0> is the starting point in frames, added with <sec0>
    • <duration> is how long you want the trimmed video to be in seconds
    • e.g., if you counted 27 in the prior example, and want it to be about 1.4 seconds long, run ./trim.ps1 2020-11-26_15-47-00.avi 3 33 1.4
      • Press Tab in PowerShell to auto-complete the filename
  4. Close VLC
  5. Open _trim.avi in VLC and check that the trim looks good
    1. If it doesn't, run ./trim.ps1 with slightly altered parameters to fix the timing up
      • VLC will loop the trimmed video, reloading the new one when you overwrite it
      • Press up in PowerShell to auto-complete to the previous command
    2. Repeat until the trim is good (i.e., there's no dead time in the video)

Encode

  1. In PowerShell, run ./enc.ps1 <filename>
    • This will save a video encoded for the wiki to <filename>.mp4 and a lossless encoding to Master/<filename>.nut

If you don't have disk space to hold master recordings, change the line in enc.ps1 from [bool]$Nut = 1 to [bool]$Nut = 0, or change the parameter when you run the script: ./enc.ps1 -Nut 0 ...