How to record video?

So, I’m trying to figure out how video recording works, and it all seems very daunting.

Every time I select “enable video recording” in RA, it fails to stick.

Is there a comprehensive guide to this somewhere? I’ve downloaded ffmpeg and set up a recording directory but I never get video output when I press the record button when a game is running, although it says it’s recording. I get a bsv file only, which I understand is a recording of the button presses, but I have no idea what to do with this file.

I’ve only recorded video once and it was years ago when I did a flawless run of Gradius III, and I don’t even remember how I did it back then.

This is old but should still be mostly applicable:

I haven’t done any recording since the RetroArch-Phoenix days, personally, but the way I would do it is record a bsv and then play it back with video dumping enabled to get your video. Video dumping with shader effects added is a slower-than-realitime process, so you won’t want to actually play that way.

[QUOTE=hunterk;29709]This is old but should still be mostly applicable:

I haven’t done any recording since the RetroArch-Phoenix days, personally, but the way I would do it is record a bsv and then play it back with video dumping enabled to get your video. Video dumping with shader effects added is a slower-than-realitime process, so you won’t want to actually play that way.[/QUOTE]

How do I play back a .bsv using retroarch? I looked, but couldn’t find anything in the documentation.

Also, how do I enable video dumping? Sorry to keep asking so many questions! You’ve been a huge help.

I’m not sure how to do it through the GUI but it’s all accessible via the command line. Unfortunately, I don’t remember those switches, either :stuck_out_tongue:

I would recommend grabbing RetroArch-Phoenix from somewhere (here’s a super-old build: http://www.mediafire.com/download/e9m4mkc891j939e/retroarch-phoenix-64bit-0996.exe ; I think that’s probably the latest) and using it, as it has buttons for all of that stuff and prints its command line invocation to the log window so you can copy/paste/modify that as needed.

[QUOTE=hunterk;29727]I’m not sure how to do it through the GUI but it’s all accessible via the command line. Unfortunately, I don’t remember those switches, either :stuck_out_tongue:

I would recommend grabbing RetroArch-Phoenix from somewhere (here’s a super-old build: http://www.mediafire.com/download/e9m4mkc891j939e/retroarch-phoenix-64bit-0996.exe ; I think that’s probably the latest) and using it, as it has buttons for all of that stuff and prints its command line invocation to the log window so you can copy/paste/modify that as needed.[/QUOTE]

Ah, okay. It looks like this is kind of an obscure feature - is bsv recording going to be replaced by something else? Or is there just very little interest in video recording?

Do you have a recommended alternative for recording that is a little more user-friendly?

Video and BSV recording are both pretty niche. Twinaphex isn’t a big fan of the bsv stuff because it’s essentially dead code insofar as it hasn’t been touched in a long time. Plus, it’s not reliable enough for something like TASing and is a holdover from the old libsnes days. IMO, there’s no point cutting it out if it still works, which it does.

You could try Bizhawk. I think it might have some video recording stuff built in…? Snes9x also has AVI recording, IIRC.

If that can help I managed to record a video by launching:

retroarch  -L cores/desmume_libretro.dll --record records/record.mkv --recordconfig records/config.cfg "E:\Roms\Nintendo-DS\Mario Kart DS (E).zip"

in the records/config.cfg:

vcodec = libx264rgb
acodec = libmp3lame
audio_global_quality = 75
sample_rate = 44100
threads = 0
video_preset = ultrafast

Didn’t tweak much as I just wanted the sound.

[QUOTE=hunterk;29727]I’m not sure how to do it through the GUI but it’s all accessible via the command line. Unfortunately, I don’t remember those switches, either :stuck_out_tongue:

I would recommend grabbing RetroArch-Phoenix from somewhere (here’s a super-old build: http://www.mediafire.com/download/e9m4mkc891j939e/retroarch-phoenix-64bit-0996.exe ; I think that’s probably the latest) and using it, as it has buttons for all of that stuff and prints its command line invocation to the log window so you can copy/paste/modify that as needed.[/QUOTE]

[QUOTE=Tatsuya79;29743]If that can help I managed to record a video by launching:

retroarch  -L cores/desmume_libretro.dll --record records/record.mkv --recordconfig records/config.cfg "E:\Roms\Nintendo-DS\Mario Kart DS (E).zip"

in the records/config.cfg:

vcodec = libx264rgb
acodec = libmp3lame
audio_global_quality = 75
sample_rate = 44100
threads = 0
video_preset = ultrafast

Didn’t tweak much as I just wanted the sound.[/QUOTE]

Using RA-Phoenix, I was able to get as far as getting the .bsv to playback, so that’s something. However, I still can’t figure out how to get ffmpeg movie output. I set up a directory and a config file, but there’s probably something wrong with my config. I used the one Tatsuya79 provided. I’m guessing that I don’t have the right codecs or something? I’m using Win 7 64 bit, if that helps.

I have lame mp3 codec installed, perhaps that’s needed.

But anyway the video is without any shader on top, perhaps nvidia shadowplay or something will be better.

No, no codecs are needed.

I use this:

vcodec = libx264 acodec = libmp3lame pix_fmt = yuv420p scale_factor = 4 threads = 4 video_crf = 25 video_preset = fast video_tune = animation audio_global_quality = 75 sample_rate = 44100 format = matroska

[QUOTE=Radius;29782]No, no codecs are needed.

I use this:[/QUOTE]

Thanks!

I’m definitely getting closer. Using the config you provided, I was able to get a .mkv recording out of Retroarch, but my system immediately froze up upon launching the game, forcing me to do a hard restart. I’m using RA-Phoenix to launch, if that matters.

I’m guessing there’s one or more options under video recording that I need to disable. Right now, I have all the recording options enabled. I’m not really sure what they all do. I’m also attempting to output video with shaders enabled, could that be causing the problem?

I’m running this on a pretty old system, but I think it should be powerful enough to encode video since I did video recording on an even weaker system a few years ago using ZSNES.

RA’s video encoding is much more intensive than ZSNES’. It dumps raw, lossless frames at the full output size, with effects. Real-time isn’t going to happen.

Sorry, I should have been more clear. I attempted to play back the .bsv file, which worked fine. However, when I play back the .bsv file with video recording enabled (through RA-Phoenix), the game launches but my system immediately freezes. RA produces a .mkv file in the desired directory, so that part’s working, but it’s 0 kb because the computer crashes immediately.

I have GPU record ON and post filter record enable ON, and record enable is ON. I also have shaders applied in RA while attempting to record, I don’t know if that makes a difference.

The system I’m attempting this on is a 3.0 gHz dual core with 4GB RAM and an ASUS HD graphics card from around 2010.

I don’t have lockups but remember, when you’re recording post-processed output you might be recording framebuffers waaaaay bigger than the screen size, it’s a lot to take, also it uses read backs, grabbing a frame using readbacks may take more than a second, then the frame needs to be dumped and encoded. I have a quite beefy system and I can’t record with complex shaders.

Yeah, try some without shaders first to make sure that everything actually works. Once that’s established, add in something simple and work your way up to the fancy stuff.

[QUOTE=Radius;29816]I don’t have lockups but remember, when you’re recording post-processed output you might be recording framebuffers waaaaay bigger than the screen size, it’s a lot to take, also it uses read backs, grabbing a frame using readbacks may take more than a second, then the frame needs to be dumped and encoded. I have a quite beefy system and I can’t record with complex shaders.[/QUOTE]

Okay, so I actually managed to record some video, but it was horrible quality :stuck_out_tongue: I used Open Broadcast Software because it’s lightweight and has an easy GUI.

I think I just need to find the right encoding settings to use for my system, I was probably trying to do too much.

Now that I think about it, recording with shaders enabled probably isn’t a good idea, anyway. You have no idea how people are going to be viewing your video once uploaded. Ideally, they’d watch it in the native resolution, but that almost never happens in real life. If it’s on YouTube for example, it’s going to be stretched and distorted any number of ways. In that case, it’s probably better to NOT try to add scanlines to recorded video, since they’ll look awful at anything but the original resolution the video was recorded in.

After playing around some more with encoding settings, I think this particular system just can’t really handle it. The best I could get was to downscale the video by 2x with lanczos filter, which looks like shit when upscaled.

Oh well. At least I can record the .bsv file and use it to encode video on a more powerful machine. Actually, that might be a good reason to keep some form of button-input recording around, since there are a lot of low powered devices running RA.

I tried shadowplay by curiosity and that’s amazing, you can’t beat hardware encoding with the GPU I guess. Really go for this if you’re on nvidia.

I could record Mario kart DS with colors alteration + lcd shader on top at 1080 60fps.

Yeah they have some sort of propietary readbacks that allow them to record in real-time with little overhead. Some shaders cause the video to go green though… dunno why

[QUOTE=Tatsuya79;29837]I tried shadowplay by curiosity and that’s amazing, you can’t beat hardware encoding with the GPU I guess. Really go for this if you’re on nvidia.

I could record Mario kart DS with colors alteration + lcd shader on top at 1080 60fps.[/QUOTE]

There’s also an AMD equivalent, Raptr, but it didn’t work on my old system.