rom name is first, .inp filename is second. It's basically "record dkong rom to dkong .inp filename"
what are you using to stream? As Wes suggests, twitch will archive, and you can then create highlights from the archive. If you are using OBS, there is a "start recording" button underneath the "start streaming" button, which will allow you to record locally. If you go into OBS settings->broadcasting you can set the location that recorded files are saved, and there is also a checkbox to automatically start recording locally when starting a stream.
If you're using xsplit or some other program, I'm not familiar with those softwares.