View Page Source

Revision (current)
Last Updated by EZGames69 on 11/2/2023 6:35 PM
Back to Page

%%TOC%%

!!! Dolphin 5.0

!! Prerequisites

* This guide assumes you have ''English'' as your ''Language'' in ''Config -> Interface''.
* Download this build of Dolphin that fixes video dumping to work well with AVISynth and VirtualDub:
** https://github.com/vadosnaprimer/dolphin/releases/tag/5.0-ffv1
* If you create an empty file called {{portable.txt}} in your Dolphin folder, different versions of Dolphin won't try to override and corrupt global settings, and each one of them will keep its settings in its own folder.
* To decode Dolphin video dumps, you will need http://ffdshow-tryout.sourceforge.net/download.php (make sure to enable the VfW interface in the installer) or https://codecguide.com/download_k-lite_codec_pack_mega.htm (make sure to enable ''ffdshow'' in ''VFW video codecs'' when selecting components to install).
* Familiarize yourself with this post about potential issues with Dolphin:
** [Forum/Posts/439486]
* Some games may require different settings in order to run properly, or to avoid any visual bugs.  To check if your game needs special settings, you can go to the Dolphin Wiki, and find the page for your game to see what settings work best: https://wiki.dolphin-emu.org/index.php?title=Main_Page

!! Guide

# In ''Graphics -> General -> Aspect Ratio'' __make sure you use ''Auto''__. That way Dolphin will render the video with correct pixel aspect ratio, and __you will not need__ to stretch the video afterwards to 4:3 or 16:9.
# In ''Graphics -> Advanced'' check ''Frame Dumps use FFV1'' to get lossless video output.
# In ''Movie'' check ''Dump Frames'' and ''Dump Audio''.
# Go to ''Config -> General'' and set ''Speed Limit'' to ''Unlimited''.
# Go to ''Config -> Paths'' and ''Add...'' the folder you keep GameCube and Wii images in. Hit ''OK'', wait for the game list to get populated, and then select the game you want to run by highlighting it in the list. Otherwise, load the game directly via ''File -> Open''.
# Replay the movie by going to ''Movie -> Play Input Recording'' and selecting your .dtm file.
# When you're done dumping, hit the ''Stop'' button in the GUI. The resulting files will be in {{Dolphin-x64-5.0-ffv1\User\Dump\Frames}} and {{Dolphin-x64-5.0-ffv1\User\Dump\Audio}}.

Audio dump usually consists of 2 files: {{dspdump.wav}} and {{dtkdump.wav}}. In most games, {{dtkdump.wav}} is empty, but [https://www.gc-forever.com/wiki/index.php?title=Audio_Streaming#List_of_Audio_Streaming_Titles|there are games that use it], so you'll have to mix them together for those. This can be done in AviSynth with MixAudio: %%% {{MixAudio(dspdump, dtkdump, 1.0, 1.0)}}

Sometimes those audio dumps are also split into 2 more files. It's because Dolphin changes sameplarate on the fly. You'll need to set them to the same samplerate in order to splice them.

If for some reason, you can't preview the AVI in VirtualDub, you can convert the resulting AVI with ffmpeg:
* For UT Video: %%% {{ffmpeg -i framedump.avi -c:v utvideo -pix_fmt gbrp -pred median framedumpconv.avi}}
* For libx264rgb: %%% {{ffmpeg -i framedump.avi -c:v libx264rgb -qp 0 -preset veryfast -pix_fmt rgb24 framedumpconv.avi}}

!! Antialiasing

There a lot of ways to apply antialiasing, and options will differ in different Dolphin versions and revisions. Here's some basic principles.

# In ''Graphics -> Enhancements'' select the highest ''Anisotropic Filtering'' option.
# In ''Graphics -> Enhancements'' select the highest ''Anti-Aliasing'' option your GPU supports.
#* If supported and works well, this option may be replaced with ''Post-Processing Effect -> FXAA'', which works much faster and gives comparably good results at high resolutions.
# Make sure ''Scaled EFB Copy'' is enabled.
# If you're doing a high definition encode for youtube, increase ''Internal Resolution'' to something close to 2160p.

Note that option names for ''Internal Resolution'' may not match the exact resolution your video will be in, so to check what internal resolution it actually is in, hit the ''ScrShot'' button in Dolphin GUI and see what resolution the image in {{Dolphin-x64-5.0-ffv1\User\ScreenShots}} will have. Note that you don't have to match 2160p exactly, because rendering at non-integer scale factors may cause bugs in how the games render video. You'll resize it to your target resolution during encoding in the AVISynth script.

Another issue to be aware of is that Dolphin doesn't allow its window to go beyond your screen resolition.
* Depending on your Operating System, patches applied to Dolphin to overcome this limitation may or may not work for you. Talk to the community to figure this out. This may still not work in revisions of Dolphin that use Qt.
* If your monitor doesn't support 2160p or higher resolutions out of the box, you may try to create such a resolution manually and then set your monitor to it. Everything will look very blurry, but the video dump will be fine. On laptops, you will need to enable ''Virtual Super Resolution'' in AMD Radeon Software settings, or enable all ''DSR factors'' in nVidia 3D settings (Optimus needs to be disabled in BIOS).
** If you can't create such a resolution, try something smaller and use that instead.
** Sometimes 2160p is available but anything higher isn't. Configure Dolphin to use 2160p as a fullscreen resolution and switch to it for dumping, because the GUI window will still not fit, resulting in smaller resolution.

Some games outright refuse to apply anti-aliasing, because it's how they are configured in Dolphin's game database to prevent desyncs and emulation problems. Dump such games at native resolution and upscale via point-resize or lanczos-resize.

!! Aspect ratio

Dolphin tries not to render black bars that are present in some games, because that allowes to fill more of the screen with actual data in fullscreen mode. So aspect ratio of the video (ratio between width and height of the frame) may not always match that of the emulated console (namely, 4:3 for GameCube and 16:9 for Wii). Dolphin uses heuristics to determine proper [https://en.wikipedia.org/wiki/Pixel_aspect_ratio|pixel dimensions] for any given video frame. So if the video is to be resized, ''both width and height need to be resized by the same exact factor''.

Setting ''Graphics -> General -> Aspect Ratio'' to ''Auto'' forces correct aspect ratio most of the time, and you don't have to stretch the footage in either dimension to "fix" aspect ratio. However, with some games, Dolphin doesn't properly detect if the current mode is meant to be 4:3 or 16:9, so you may need to ensure the dump doesn't look unnaturally stretched or squiched.
* If the movie doesn't explicitly set anammorphic widescreen for a GameCube game, then forcing 4:3 is safe.
* For Wii, there's a system option to use the 4:3 mode and some games use it, also some games have an in-game option for it. But most of the time it's safe to force 16:9.

!! Resolution changing on the fly

Some games change resolution on the fly. Usually they have one resolution in gameplay segments and another in the rest of the footage. Aspect ratio (between width and height) may also be different in those segments.

After the game has changed resolution, Dolphin 5.0 stretches the video to whatever the initial resolution was. That means that if aspect ratio of the raw video frame also changes, [https://en.wikipedia.org/wiki/Pixel_aspect_ratio|pixel dimensions] will be incorrect across segments.
* One workaround is dumping in segments, but you'll need to manually start and stop dumping when resolution changes. 
** Use Dolphin's screenshot freature to determine internal resolution of any given frame.
** When splicing segments, keep resolution of gameplay segments and only resize the rest of the footage if needed.
** Do not stretch width and height by different factors, ''resize them equally'' and add black borders on the side that's too small.
* Another workaround is forcing gameplay resolution on the Dolphin window and letting it handle the rest.
** Enable ''Graphics -> General -> Auto-Adjust Window Size''.
** Start the game and let it reach gameplay.
** Stop emulation.
** Disable ''Graphics -> General -> Auto-Adjust Window Size''.
** Set ''Graphics -> Enhancements -> Internal Resolution'' to ''Auto (Window Size)''.
** Make sure ''Graphics -> General -> Aspect Ratio'' is __not__ ''Stretch to Window''.
** Dump the video as usual.
* Third workaround is letting the entire thing run in initial resolution of frame 0 and then ''stretching'' the whole video to gameplay resolution. That way PAR in gameplay segments will be incorrect in the dump, but you will fix it while encoding.

Newer revisions of Dolphin allow to ''Dump at Internal Resolution'' in ''Graphics -> Advanced'', but if the game changes resolution on the fly, that will cause drifting audio-video desync when you splice them back together. ''Auto-Adjust Window Size'' in ''Graphics -> General'' causes the same problem even if ''Dump at Internal Resolution'' is disabled. So use the above workarounds to force gameplay resolution to the entire video (while dumping or in post-production).

!! Audio sync

[Forum/Posts/516226]

!!! Dolphin pre-5.0

!! Prerequisites

Make sure you get the correct Dolphin version, which should be stated in the submission notes, as different releases are neither sync-stable nor sync-compatible with each other. In versions before 4.0-3595, it is obligatory to fix Dolphin's broken video and audio dumping feature prior to obtaining a capture. Either rely on patched binaries or, as a Windows user, try patching yourself:
* https://github.com/nattthebear/dolphin-avsync/branches
* https://github.com/RisingFog/dolphin-avsync/releases
For Linux systems [user:Ilari] has created a set of patches providing similar functionality; ask on IRC if you need them. In any case applying the patches will likely result in merge conflicts, that have to be resolved manually. __Ignoring this step will result in broken audio/video dumps on versions older than 4.0-3595!__ Some movies may require functionality (like memory card or disk switching) for playback that is not part of any official release. In these cases it is advisable to check the submission notes and discussion thread for provided patches or binaries.

Hint: Before starting the capturing process try to fully sync the run (Follow steps 1, 2 or 3, 7 (without ''Dump Audio'') and 8). This is to make sure possible frustration caused by unnoticed late desyncs is kept to a minimum. __Important__: Sometimes a movie will desync on a second playback due to files being present that were created on first playback. Keep in mind that these have to be deleted before starting the capture! Check the submission details or discussion thread to be aware of such causes of desync. Should you get graphical glitches (missing/black or otherwise corrupted textures) try a different backend (e.g. OpenGL instead of DirectX) if possible.

Note: Windows Dolphin avsync versions older than 4.0-1711 crash after splitting the first 2GB segment. To overcome that, use one of these:
* Ask the person who made a build for you to move the piece of code that closes the timecodes file (AVIDump.cpp) from {{AVIDump::CloseFile()}} to {{AVIDump::Stop()}}.
* Use x264vfw codec and configure it to output a lossless single-segment file (seeking won't break):
** ''Basic'' -> last (nameless) drop-down menu -> ''Keep/Accept only RGB''.
** Check ''Zero latency''.
** ''Rate control'' -> ''Single pass - lossless''.
** ''Output'' -> ''Output mode'' -> ''File''.
** ''Output file'' -> specify the global path. Use the AVI container.
* Use [user:natt|Pipedec].
* Build Dolphin yourself, applying the fix from method 2. Use [Forum/Posts/398488|these steps] then.

!! Guide

The following instructions assume you are using either [user:natt]'s or [user:Ilari]'s AVhack. Menu structure as well as names of menu items may change between releases.

* Note: the settings are in the following format ''Dolphin 4.0 UI / Dolphin 5.0 UI''.

To avoid unnecessary hassle ensure you fulfill the assumptions made in step 9, first sentence.

# Navigate to ''Options->Configure''. Uncheck ''Enable Dual Core'' and ''Enable Idle Skipping''. Set ''Framelimit'' to ''off'' / ''Speed limit'' to ''Unlimited''. Make sure the CPU emulator engine is set to ''JIT Recompiler''.
# For some Gamecube games:  Navigate to ''Options->Configure->Gamecube'' and check ''Skip BIOS''. Some movies require a memory card inserted, while others expect none to be present. Set the ''Slot'' options accordingly.
# For some Wii games: Navigate to ''Options->Wiimote Settings''. Click ''Configure'' for Wiimote 1 and ''Clear''. Also choose or unset the extension controller. These instructions are not required for all games.
# Go to ''Options->Graphics Settings -> Hacks'', disable ''External Frame Buffer'' (related to movie sync), enable ''EFB Copies'' and set it to ''RAM'' (and enable ''Cache'' if you wish).
# Dumping is to be done on highest graphical settings. Navigate to ''Options->Graphics Settings'' and check ''Auto adjust Window Size''. From that window navigate to ''Enhancements'' and set ''Internal Resolution'' to ''2x Native'', ''[EncoderGuidelines#Antialiasing|Anti-Aliasing]'' to ''16xQ CSAA'' or equivalent (8x SSAA) and ''Anisotropic Filtering'' to ''16x'' (anisotropic filtering leads to graphical glitches with some games. Leave it set to ''1x'' if this is the case.)
#* Linux specifics: For games displaying their content in 16:9 it may be necessary to force widescreen mode at this point: ''Options->Graphics Settings'', set ''Aspect Ratio'' to ''Force 16:9''. This however will not suffice because Dolphin will always resize the window to a 4:3 resolution and as the window dimensions determine the video resolution, you have to resize the window to the correct resolution (2x the native 16:9 resolution, i.e. 1536x864) yourself. Ensure the window content (that is without titlebar and other decoration by your window manager) has the correct dimensions with e.g. xwininfo.
#* ''TODO: Windows specifics: Does the same apply to Windows?''
# Start the game without any dumping feature enabled. This way Dolphin will resize its window to the correct resolution. Now Dolphin has to be configured to write audio and video data to disk.
# Navigate to ''Options->Graphics Settings'' and uncheck ''Auto-adjust Window Size''. From that window navigate to ''Enhancements'' and set'' Internal Resolution'' to ''4x Native''. Check ''Dump Frames'' on the ''Options->Graphics Settings->Advanced tab'' / ''Movie->Dump frames'' menu.
#* Linux specifics: Check ''Frame Dumps use FFV1'' as well. The ''Dump Frames'' option will make Dolphin dump audio too.
# Navigate to ''Options->DSP Settings'' and choose ''DSP LLE recompiler'' as DSP emulator engine. This type of sound emulation requires ''dsp_coef.bin'' and ''dsp_rom.bin'' to be present in the ''User\GC\'' on Windows or ''$HOME/.dolphin-emu/GC'' on Linux directory or you will receive an error message. On Windows check ''Dump Audio'' in the ''Emulation / Movie'' menu and set ''Options->DSP / Audio settings->Audio Backend'' to ''"No audio output"'' (sound will be dumped nevertheless).
# Assuming the game is in your library and you have started it at least once, choose ''Play Recording'' from the ''Emulation / Movie'' menu and select the movie file to be captured. On Windows and Dolphin 4.0 select a lossless RGB video codec of your choice and click ''Ok''. Audio and video are now being captured. Should the emulator crash at this point examine the ''User\Dump\'' directory of your Dolphin installation (''$HOME/.dolphin-emu/GC'' on Linux) and create the folders ''Audio'' and ''Frames'' if either of those are missing.
#* Linux specifics: __Important__: During the entire video capture no window must overlap with the one showing the actual gameplay, so it is wise to check ''Keep window on top'' in ''Options->Graphics Settings''.
# To stop the capturing process at the desired end point click ''Emulation->Stop''.

Read on if you want to find out how to deal with the files that have been created for encoding: [Forum/Posts/349931|Dolphin encoding guide]