Basic guide to input recording with RetroArch (.bsv files)

This is the main shmups forum. Chat about shmups in here - keep it on-topic please!
Post Reply
User avatar
Krushal
Posts: 73
Joined: Sat May 04, 2019 4:14 pm
Location: Hyperspace

Basic guide to input recording with RetroArch (.bsv files)

Post by Krushal »

Since there's a real lack of info about this feature on the webz, here's a quick how-to.

ULTRA MODE (Linux peeps):
Spoiler

Code: Select all

retroarch --help (Look at -R and -P flags) 
NORMAL MODE (Windows):
-Input recording-

For each game...
Create a shortcut to retroarch.exe.
Move & rename.
Right-click, properties, edit "target" similar to:

Code: Select all

C:\RetroArch\retroarch.exe -L cores\fbneo_libretro.dll "C:\Games\Roms\batsugunsp.zip" -R recordings\batsugunsp.bsv -M noload-nosave
-Input playback (with movie recording)-

Either make another shortcut or just use the command-line:

Code: Select all

cd C:\RetroArch
retroarch.exe -L cores\fbneo_libretro.dll "C:\Games\Roms\batsugunsp.zip" -P recordings\batsugunsp.bsv -M noload-nosave -r recordings\batsugunsp.mkv --eof-exit

ARRANGE MODE (not generally useful):
Spoiler
This setup uses two minimal batch files (record and playback) as "launchers" for each game.
For example, "batsugunsp-record.bat":

Code: Select all

SET game_name=batsugunsp
SET core_name=fbneo
::::::::
CALL _Record.bat
and "batsugunsp-playback.bat":

Code: Select all

SET game_name=batsugunsp
SET core_name=fbneo
::::::::
CALL _Playback.bat
To allow for this, three "utility" batch files will need to be created...

-STEP 1-
Create a folder to store the batch files. My default is recordings\batches in the main RetroArch directory.

-STEP 2-
Create "_DefineDirectories.bat", open (edit), and paste the following:

Code: Select all

@ECHO OFF
:: CHANGE THESE ::
SET retroarch_dir=C:\RetroArch
SET roms_dir=C:\Games\Roms\Arcade
:: CHANGE IF NECESSARY ::
SET batch_dir=%retroarch_dir%\recordings\batches
SET core_dir=%retroarch_dir%\cores
SET record_dir=%retroarch_dir%\recordings
::
:: DON'T CHANGE ::
SET rom=%roms_dir%\%game_name%.zip
SET core=%core_dir%\%core_name%_libretro.dll
SET recording=%record_dir%\%game_name%.bsv
SET mode=noload-nosave
SET video=%record_dir%\%game_name%.mkv
CD %retroarch_dir%
Make the necessary changes and save.

-STEP 3-
"_Record.bat" is this:

Code: Select all

@ECHO OFF
CALL _DefineDirectories.bat
retroarch.exe -L %core% %rom% -R %recording% -M %mode%
CD %batch_dir%
-STEP 4-
"_Playback.bat":

Code: Select all

@ECHO OFF
CALL _DefineDirectories.bat
retroarch.exe -L %core% %rom% -P %recording% -M %mode% -r %video% --eof-exit
CD %batch_dir%
Playback ends automatically and also invokes video recording, since this is the likely use case.

-STEP 5-
Now, simply make the pair of "launcher" batch files for any game where you want input recording, as with the "batsugunsp" example above.
-ISSUES-
Easiest to just exit RA when finished recording. The two "recording toggle" hotkeys seemed to also toggle video recording.
Rename or move any .bsv file you want to keep, it will be overwritten on the next record-session.
As regards the technical limitations of the feature or ways that de-syncs etc. might occur (configs/nvram), I'm no expert. Probably similar to MAME's .inp files.
The sram 'noload-nosave' mode is set as a precaution.

Short test-runs so far have worked as desired, but I'd quickly playback and dump the video file. Perfect sync could be broken easily (updates/configs) and sharing might be difficult.
Last edited by Krushal on Thu Jan 30, 2020 2:06 pm, edited 3 times in total.
Free indie/doujin STGs: Download | List (incomplete)
User avatar
Mark_MSX
Posts: 411
Joined: Mon Mar 05, 2018 6:58 am
Contact:

Re: Basic guide to input recording with RetroArch (.bsv file

Post by Mark_MSX »

MY DUDE! I've been trying to figure this out and you're right, there is very little info on how to do this! Medal of honor for sure!
User avatar
Krushal
Posts: 73
Joined: Sat May 04, 2019 4:14 pm
Location: Hyperspace

Re: Basic guide to input recording with RetroArch (.bsv file

Post by Krushal »

Glad to help! I saw your recent video where you mentioned it. Which got me thinking about how it could be incorporated into ShmupArch, hence all that batch file stuff.

I've posted a much saner solution. Peace.
Free indie/doujin STGs: Download | List (incomplete)
User avatar
casualcoder
Posts: 346
Joined: Sat Apr 21, 2012 4:35 am
Location: West Coast, Canada

Re: Basic guide to input recording with RetroArch (.bsv file

Post by casualcoder »

Was curious about this and found this post. A few things that I found:

Best to wrap the target links in quotes to avoid issues with paths that have spaces. Also, best to use absolute rather than relative paths.

Since it fails silently, it can be a real pain so best to avoid the problems to begin with. Here's an example on my machine that I got working:

RECORDING (target path)
"E:\~GAMES~\EMU Games\EMULATORS\RetroArch\retroarch.exe" -L "E:\~GAMES~\EMU Games\EMULATORS\RetroArch\cores\fbalpha_libretro.dll" "E:\~GAMES~\EMU Games\PLATFORMS\Arcade\espgal.zip" -R "E:\~GAMES~\EMU Games\EMULATORS\RetroArch\bsv\espgal.bsv" -M noload-nosave

PLAYBACK (target path)
"E:\~GAMES~\EMU Games\EMULATORS\RetroArch\retroarch.exe" -L "E:\~GAMES~\EMU Games\EMULATORS\RetroArch\cores\fbalpha_libretro.dll" "E:\~GAMES~\EMU Games\PLATFORMS\Arcade\espgal.zip" -P "E:\~GAMES~\EMU Games\EMULATORS\RetroArch\bsv\espgal.bsv" -M noload-nosave --eof-exit

To break that down for people, that's "path to emulator" -L (Load) "path to core" "path to game" -P or -R (Playback || Record)

Note that in the playback path I didn't set it to "Retroarch\recordings" as this woudl also fail silently. Probably some sort of conflicting write issue, or the app trying to write to a particular (non-bsv) file type.

So I just made my own directory called "bsv"


One major problem on my end that I haven't been able to resolve. Playback never outputs audio. It just launches and plays back fine but... pffft... no sound. Otherwise, playback seems to be working fine.
User avatar
Krushal
Posts: 73
Joined: Sat May 04, 2019 4:14 pm
Location: Hyperspace

Re: Basic guide to input recording with RetroArch (.bsv file

Post by Krushal »

casualcoder wrote:One major problem on my end that I haven't been able to resolve. Playback never outputs audio. It just launches and plays back fine but... pffft... no sound.
Strange problem. Audio works for me.
I can't think of any suggestions, but if you want I can upload a bsv file or my config file or whatever.
Free indie/doujin STGs: Download | List (incomplete)
Post Reply