Thursday, April 24, 2014

And More: Editing NVIDIA's Shadowplay Recordings and 'The VFR/CFR Problem' (Text-Only Version)

[Updates at bottom of article]

Just a quick post on the problem many people seem to be having with editing NVIDIA's Shadowplay recordings and how to work around it, for now...

For those who don't know, Shadowplay is a free game recording capability that is included in NVIDIA's GeForce Experience utility and is accessible by anyone with an NVIDIA GPU that is a GTX 650 or higher [they state "600 Series or higher"]. Simply install the GFx utility [my abbrev.] and turn it on and Shadowplay will record a buffered period of time, overwriting that space/file again and again, until you decide to save something cool that happened in the game.

Whether FRAPS sold NVIDIA the code to do buffered/looped recording (as FRAPS has had it for many years), or NVIDIA developed it on their own, the end result is the same. The problem is, a ton of people [if technical and game forums everywhere are an indication] are unable to edit the end output correctly, when using Shadowplay.

The main reason why this seems to happen, could be due to Shadowplay utilizing VFR to record it's video data into a file. VFR stands for Variable Frame Rate, and essentially it allows the frame rate to change from slow to fast, above and below the 'set' frame rate, many times if needed, within a single video file. This helps to save space by making low-motion (or static) scenes use less frames within the video file and make complex scenes (with high-action/movements) look smoother by inserting more frames into the video file. Sounds good and test videos look fine, but the problem is when going to then edit the 'Shadowplays'.

Many video editing applications (especially NLE's [Non-Linear Editors]) may not like Shadowplay and will choke on the video, hold back sound in spurts and spit up bits of food on your screen if you try to edit the recordings. This could be due to the usage of VFR.


Note: I don't want to 'put the blame' on NVIDIA or VFR here, NVIDIA is a fantastic company with great innovations and products, and VFR is a great method for organizing frames within video data that creates a lot of 'headroom for compression' (lower file sizes by reducing the number of frames used) while trying to maintain Quality as well (by increasing the frames utilized per second within the GOP data of the file, as the codec decides it is beneficial). It merely is not as compatible, when it comes to video editing programs. As another example, Plays.Tv uses Accelerated VFR in its' Client to buffer/record with, which it notes here in their Support section, is simply less compatible and can create audio/video synchronization problems - the issue is VFR and editing compatibility -  not these companies/utilities themselves...



Fortunately, the 'fix' [which in my opinion of more of a work-around] is relatively easy, if slightly time-consuming:

Simply re-render the Shadowplay recordings into CFR (constant frame rate) video (where 60fps really is 60 frames being recorded or played back in sequence, in the video, every second, throughout the entire clip). There are many apps that can do this, but the most popular [most-popularly-used in the video-editing circles that are experiencing this problem] is probably Handbrake (it is completely free to use). Simply import your video and choose Constant Framerate in the Video Tab. That's it.

Another program you can use, is built right in (if you use Windows): Windows Movie Maker [Note: Windows Movie Maker does not seem to be bundled with Windows 10, it may however be available as a separate download]. Simply import the video and without adjusting anything, export (render) it out to MPEG-4 (MP4) format. It will produce a CFR (Constant Frame Rate) video that you can then import into programs that were having trouble with VFR - like Adobe's Premiere and other video editing applications.
[Choose a high quality setting or high bitrate, to maintain as much of your original recording detail as possible (so it won't compress it even more and lose detail). If you need to set a BitRate for the export, make sure to set it higher than the original video clip(s) BitRate ((Personal Suggestion: 2x more if you can))]

Once this is done, you'll be able to import your Shadowplay 're-renders' without problem, whether you use Premiere, Vegas, Lightworks or some other video editing application that has been having trouble importing your VFR video (for instance, some people have had problems with Shadowplay recordings using CyberLink's PowerDirector and others have not had a problem with PowerDirector at all, importing it fine - I have not used Shadowplay Recordings in PowerDirector yet [I do not have a GPU capable of using Shadowplay at this time] but I have personally imported VFR material into PowerDirector 12 without problem).

[I might come back and add screenshots to this article in the future, or create a new one talking more specifically about VFR and importing it into Premiere, but for now I wanted to bang it out and get it up here to help people who have been having this problem (many since last year, when Shadowplay first came out, with even more people having the problem earlier than that with Premiere and VFR recordings from their cameras)]

I hope that helps some people out for now, anyway. Have fun recording - and See You In The Games!




Update 1:

Bandicam has now implemented an option in their game recording software (as of July 2015), which allows choosing CFR recording or VFR recording. Since it also uses GPU-accelerated codecs such as AMDAPP, NVENC, QuickSync (and can be made to use CUDA, if you still have that), it seems to have become a viable alternative to this problem. As a Registered User of Bandicam, I shall test out this latest version of the software and perhaps write a post about it Soon™


Update 2:

I have done some quick testing with this new version of Bandicam (with the ability to choose CFR as well as use VFR if desired) and have written a short post about it at this blog, here.


Update 3 - 2018.06:

NVIDIA's Game Recording Utility seems to have changed names a few times, known as Shadowplay, then Share, then In-Game Overlay. Whatever it is called today, while this issue with editing VFR might remain, on some older video editing applications; it seems to be less of an issue on the most recent versions of video editing apps (as of 2018) - tested personally with a few programs, such as Sony's Vegas Pro 14 (now taken over by MAGIX), CyberLink's PowerDirector 16, and Corel's VideoStudio 2018 - all three video editors did not have an issue Importing and Editing VFR material (as of June 2018 when I did these short tests) [I do not own and did not test Adobe's Premiere/Elements, at this time, sorry]. So, if you are having an issue editing Shadowplay/NVENC recordings circa 2018 or later, try updating your video editing application(s), if you can.



10 comments:

  1. Thanks for this. I'm a video editing newb and was totally confused why my shadowplay vids were choppy. The more you know.

    ReplyDelete
  2. Record with shadowplay put it in windows movie maker let it load enjoy

    ReplyDelete
  3. We have a Gaming YouTube Channel and noticed that some games records and edits perfectly, some doesn't. We are trying to record Resident Evil HD Remaster and when we put in Premiere Pro CC 2014 is terribly out of sync. This is really annoying. Hope Nvidia will insert a CFR option in a future update.
    Thank for the tips anyway!

    ReplyDelete
    Replies
    1. I haven't had a chance to do any testing with Shadowplay more, but I did notice that some games 'force' VFR with MP4 recording [in Bandicam for example], and some don't (the recorded file comes out as CFR), as you found. It may be tied to how a specific game refreshes/utilizes the screen buffer or displays it, but I'm just shooting in the dark and not 100% sure.
      Yes, hopefully NVIDIA can find a way to work this out with either an update within their own software/drivers, or a collaboration with video editing application companies.
      You're most welcome, by the way!

      Delete
  4. Wait... what...? If I put a shadowplay video into movie maker, it doesn't work. All I get is a black screen.

    Email: Sakibsakib1@gmail.com

    ReplyDelete
    Replies
    1. Hmmm.. I upgraded away from NVIDIA now, but it did work with Windows Movie Maker when I was testing out Shadowplay for this article...

      Have you tried installing the H.264 codecs?
      You may have to install both the 64-bit and the 32-bit versions.
      You can also try doing a search at the Microsoft website for "windows media codecs" and install those.
      They mainly have to do with the WMV format, but may open/install some Libraries (system files) that aren't there on your system (yet), such as some DirectX libraries, etc.

      I know it sounds dumb to hear, but make sure that the video can play fine in a regular Player first, like the built-in Windows Media Player or something else, like VLC Media Player or Media Player Classic. If you 'freshly recorded' the video and can't import it, it may not play at all (it may be corrupted). Try other recordings, too.

      There may have also been changes ("updates") to the Shadowplay codec and how NVIDIA is utilizing it, and these changes may have rendered Shadowplay un-importable into Movie Maker now.. (which would be unfortunate, it barely worked with it back then).

      Hopefully, it's just some installation or configuration problem for you and it'll still work. Try some of the above ideas out and see if it starts working for you. Good luck with it!

      Delete
  5. Hi GTAM blog! Just wanted to say thanks for posting this up so long ago. I'd heard of Handbrake before, but never seen an exact description of what to do with shadowplay corrupted mp4's, and it worked great.

    Very informational! Much thanks again.

    ReplyDelete
    Replies
    1. Thanks for saying so, Don! There were already so many good/long guides out there for Handbrake, I felt that just explaining that one [related] function was 'ok' here, heh.

      You are most welcome - I always enjoy hearing when my little tidbits (or long posts) have helped out :) Take care

      ~Troy from The Game Tips And More Blog

      Delete
  6. Thank you so much for this blog post. Trying HandBrake right now and I hope it fixes the problem. It could have been nice to have an idea of all the settings you put before encoding the video since there are tons :D

    ReplyDelete
    Replies
    1. You're most welcome! I'm sorry I didn't mention that (maybe I'll add it in) - but all I did was tick the CFR option, leaving everything else 'Default'.
      I don't have HB installed at the moment, but if you have trouble finding it, let me know and I'll install it and give some directions :)

      Delete