Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Lazyfire
Feb 4, 2006

God saves. Satan Invests

Admiral H. Curtiss posted:

Are the resulting video and audio lengths different? Call Info() on the clip directly after loading and compare.

If yes, then that should be easily fixable by just matching those. I had a function somewhere that emulates the old VDub "change framerate to match audio" thing if you want that.

I didn't really think to check that as the sound gradually desyncs instead of starting off desynced. I'll check to see if that's the case when I get home, but it seems like a longshot. I'm going to give recording at a lower framerate a try, not only will the file be more manageable, but frame spikes and dips in the game itself probably won't kill the audio/visual sync if it is recording at a lower rate.

Adbot
ADBOT LOVES YOU

Xenoveritas
May 9, 2010
Dinosaur Gum
How are you loading the video in the first place?

The videos that Shadowplay creates are inherently variable frame rate, if you're just using a simple FFVideoSource it won't correct for that and audio will slowly desync. Instead you need to specify a framerate for it using fpsnum and possible fpsden (if not using an integer framerate), like fpsnum=60.

Lazyfire
Feb 4, 2006

God saves. Satan Invests

Xenoveritas posted:

How are you loading the video in the first place?

The videos that Shadowplay creates are inherently variable frame rate, if you're just using a simple FFVideoSource it won't correct for that and audio will slowly desync. Instead you need to specify a framerate for it using fpsnum and possible fpsden (if not using an integer framerate), like fpsnum=60.

I generally just change the FPS to 60 via the ChangeFPS command, but I've never had to code the frames into the video source line before and that could clear it up.

Xenoveritas
May 9, 2010
Dinosaur Gum
Don't use ChangeFPS in this instance.

The problem is that MP4s can happily change framerate midstream, but AVIs cannot. AviSynth, being an AVI generator, requires a constant framerate.

Without specifying fpsnum FFVideoSource generates frames in the dumbest way possible: it takes the average framerate from the MP4 file, and then just outputs the frames from the video at that framerate. Which will cause an overall desync as frames that should be at 60FPS are passed just slightly lower and frames where the graphics card couldn't manage 60FPS will instead be "sped up" to the average rate.

All ChangeFPS will do is take that desynced video and change its framerate. Basically, specifying the framerate to FFVideoSource does the exact same thing ChangeFPS would do, but on the original variable framerate video and not the weird "all frames are the same length" version FFVideoSource by default spits out.

Lazyfire
Feb 4, 2006

God saves. Satan Invests

Xenoveritas posted:

Don't use ChangeFPS in this instance.

The problem is that MP4s can happily change framerate midstream, but AVIs cannot. AviSynth, being an AVI generator, requires a constant framerate.

Without specifying fpsnum FFVideoSource generates frames in the dumbest way possible: it takes the average framerate from the MP4 file, and then just outputs the frames from the video at that framerate. Which will cause an overall desync as frames that should be at 60FPS are passed just slightly lower and frames where the graphics card couldn't manage 60FPS will instead be "sped up" to the average rate.

All ChangeFPS will do is take that desynced video and change its framerate. Basically, specifying the framerate to FFVideoSource does the exact same thing ChangeFPS would do, but on the original variable framerate video and not the weird "all frames are the same length" version FFVideoSource by default spits out.

Understood, I'll give it a shot when I get home tonight. Is it weird that the source video is not lined up either? The audio on that gradually desyncs as well and I have to imagine that's a shadowplay thing.

Xenoveritas
May 9, 2010
Dinosaur Gum
What are you playing it in? It sounds like you may need Admiral Curtiss's script as well if the video and audio actually desync.

See what happens with fpsnum, it may not solve everything but it (should) help.

Lazyfire
Feb 4, 2006

God saves. Satan Invests

Xenoveritas posted:

What are you playing it in? It sounds like you may need Admiral Curtiss's script as well if the video and audio actually desync.

See what happens with fpsnum, it may not solve everything but it (should) help.

I'm using VLC to play it back both before and after encoding. I've never had it do that to me in the past.

Psion
Dec 13, 2002

eVeN I KnOw wHaT CoRnEr gAs iS

Xenoveritas posted:


Without specifying fpsnum FFVideoSource generates frames in the dumbest way possible

This probably explains so very much of my weird Shadowplay poo poo I've also encountered.

Admiral H. Curtiss
May 11, 2010

I think there are a bunch of people who can create trailing images. I know some who could do this as if they were just going out for a stroll.
Also in case someone ends up needing them, here's the functions.

code:
function MatchVideoToAudio(clip v) {
	return MatchVideoToAudio(v, v)
}
function MatchVideoToAudio(clip video, clip audio) {
	samplerate = AudioRate(audio)
	samples = AudioLength(audio)
	seconds = samples/float(samplerate)
	return video.StretchTo(int(seconds * video.framerate))
}
function StretchTo(clip c, int number_of_frames) {
	ratio = float(number_of_frames) / float(c.FrameCount)
	return c.ChangeFPS(c.FrameRate * ratio).AssumeFPS(c.FrameRate)
}

Mico
Jan 29, 2011

A billion dollars.

Admiral H. Curtiss posted:

Are the resulting video and audio lengths different? Call Info() on the clip directly after loading and compare.

If yes, then that should be easily fixable by just matching those. I had a function somewhere that emulates the old VDub "change framerate to match audio" thing if you want that.

I still have it in my global.avsi file.

I'll post it here again for reference because it can be pretty useful.

code:
function FixDesync(clip c)
{
secondsaudio =  AudioLength(c)/float(AudioRate(c))
secondsvideo = framecount(c)/float(framerate(c))
diffms = (secondsvideo - secondsaudio) * 1000
c.TimeStretch(tempo=(c.AudioLengthF/(c.AudioLengthF+(diffms*(c.audiorate/1000)))*100))
}

Lazyfire
Feb 4, 2006

God saves. Satan Invests

So after reviewing the video I think the issue is that the first file I was attempting to work with was corrupted in some way, causing issues. For example, if I index the file and then open the script it would give me an error saying that the file was simply not searchable, so I had to pull in the raw MP4 to do any editing. The problems with that file were probably causing the issues I was seeing.

The second large file I think is actually totally fine, having watched it a few times over and I can edit the Avisynth file when it returns. The issue comes in trying to put any sort of frame rate to the thing through the FPSnum or FPSden codes. It completely kills it. Even the numbers generated under FPSnum and FPSden will cause late video desync. However, I spent some time with the Handbrake utility I mentioned in my first post about this. Letting that encode at 60FPS and not messing with the settings leaves everything perfectly synced. Putting the fpsnum=60, fpsden=1 info into my raw file's Avisynth doesn't fix it, oddly enough. Whatever operation Handbrake does to the file seems to even out the audio much better. Here's the information from the raw file index:


Here's a few seconds of video showing what the desync is like

Notice the Video and Audio lengths. Here's the Handbrake'd file:


Here's the same segment as before in Handbrake

For some reason Handbrake is able to keep the files close to parity. I can't figure out where the missing sound actually is, it doesn't seem to be at the beginning or just at the end,as putting silence at either end to match the video length causes worse desync. I would say that as long as I keep using Handbrake on longer clips I should be just fine. Thanks for looking into this one and all the help, everyone. Admittedly it will be a while before I can use this on an LP, but it's good to know there's a process out there I can make use of if necessary.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Tired of compressing and optimizing GIFs? I just wrote a replacement. Doesn't work in Internet Explorer.

Xenoveritas
May 9, 2010
Dinosaur Gum
Or, based on the giant black rectangle beneath your post, Firefox.

Edit: and, since I accidentally opened this thread, it also doesn't work in Mobile Safari. Shocker, I know.

Xenoveritas fucked around with this message at 19:12 on Oct 17, 2014

Hyper Crab Tank
Feb 10, 2014

The 16-bit retro-future of crustacean-based transportation
Oh dear, is that a streaming SVG? It only kind of works in Firefox; it works while I'm forcing the window to refresh (by scrolling up or down) but not when it's static.

Mico
Jan 29, 2011

A billion dollars.

Hyper Crab Tank posted:

Oh dear, is that a streaming SVG? It only kind of works in Firefox; it works while I'm forcing the window to refresh (by scrolling up or down) but not when it's static.

And here I thought it was just taking its sweet-rear end time to load.

Sevalar
Jul 10, 2009

HEY RADICAL LARRY HOW ABOUT A HAIRCUT

****MIC TO THE WILLY***
Anyone use a blue yeti microphone with a co host sitting next to you? I've been doing a few videos like this but the co host is quiet at times.

Short of us both huddling over the mic, are there any neat tricks to boost the audio. I know the yeti has a few audio modes on it but it just makes the quality shitter than my standard mode (the one where it only picks up audio from the front)

The T
May 29, 2010

A sufficiently chaotic system is maximally fair.

simosimo posted:

Anyone use a blue yeti microphone with a co host sitting next to you? I've been doing a few videos like this but the co host is quiet at times.

Short of us both huddling over the mic, are there any neat tricks to boost the audio. I know the yeti has a few audio modes on it but it just makes the quality shitter than my standard mode (the one where it only picks up audio from the front)

Disclaimer: I don't recommend this as a good option and would look into a better recording device. I've had nothing but trouble using the Blue Yeti, as it just picks up so much background noise and I had to put a lot of work into removing it.

That said, on the final video, use a Compressor in audacity to automatically level out the audio, making yourself quieter and your co-host louder.

Also, naturally, talking loud helps.

Wooper
Oct 16, 2006

Champion draGoon horse slayer. Making Lancers weep for their horsies since 2011. Viva Dickbutt.
So far I've been coloring inside the lines by using avidemux and only cutting at keyframes. Recently I've been using the replay buffer feature of OBS, which only makes one keyframe at the beginning of the video.

I wonder how I should go about fixing this. How do I go about re-encoding? Does it help if I know where I want the new keyframes?
These are only 2 minute videos.


edit: I might be retarded, forgetting how to use avidemux. There actually ARE keyframes all over.

Wooper fucked around with this message at 11:44 on Oct 20, 2014

PerrineClostermann
Dec 15, 2012

by FactsAreUseless
So I'm trying to put together a simple trim of footage. The script I've created is as follows:

code:
vid = DirectShowSource("S:\Elgato\Dust 514 - Some more DUST after christmas - 2014-10-20 10-56-25.mp4", audio=false)
aud = DirectShowSource("S:\Elgato\Dust 514 - Some more DUST after christmas - 2014-10-20 10-56-25.mp4", video=false)
AudioDub(vid, aud)
LanczosResize(1280, 720)
Trim(42919, 43298)
Trim(0, 373)
The video works fine, but no audio is produced. Any idea why that might be?

code:
Video: MPEG4 Video (H264) 1920x1080 29.97fps 29414kbps [V: English [eng] (h264 high L4.0, yuv420p, 1920x1080, 29414 kb/s)]
Audio: AAC 48000Hz stereo 221kbps [A: SoundHandler [eng] (aac, 48000 Hz, stereo, 221 kb/s)]
e: It appears my installation of Avisynth was bad. Installed the latest version, seems to have fixed it. Sorry for the trouble. When in doubt, reinstall!

PerrineClostermann fucked around with this message at 06:44 on Oct 21, 2014

Admiral H. Curtiss
May 11, 2010

I think there are a bunch of people who can create trailing images. I know some who could do this as if they were just going out for a stroll.
More likely an issue with DirectShowSource, which is inconsistent and unreliable. Get the FFMS2 plugin for loading MP4 instead.

xeose4
Sep 22, 2014
I ran into a strange problem while trying to record video for my LP. 2 years ago, I was able to record from the game just fine (the problem is, I can't remember what software I was using or what configuration options I was running). Now, I am using VirtualDub and HyperCam 2 and both of them record whiteness instead of the game whenever I use them. Is there a problem in my configuration? I've tried every combination of choices I could think of, but I am flat-out clueless why they can't record.

From what I can tell from poking around in google, it seems like some screen capture programs won't capture games at all?

nielsm
Jun 1, 2009



Have you tried reading the OP?

There are lots of capture software made specifically for games, and neither VDub nor HyperCam are among them.

Xenoveritas
May 9, 2010
Dinosaur Gum
Some day I should find out what your avatar actually is, nielsm, but it always looks like a lemming to me.

But, yes, not being able to record games is a thing (basically, games use a different set of Windows APIs in order to run faster, and capture software not designed to work with those won't "see" those windows) and you should try something like OBS or FRAPS. OBS has the advantage of being free.

xeose4
Sep 22, 2014

nielsm posted:

Have you tried reading the OP?

There are lots of capture software made specifically for games, and neither VDub nor HyperCam are among them.

I've definitely read the OP, and I took the bit under Fraps to mean "the best choice" rather than "the only choice".

I suppose I'll just try to find a free capture software that works for games, thanks.

Xenoveritas posted:

But, yes, not being able to record games is a thing (basically, games use a different set of Windows APIs in order to run faster, and capture software not designed to work with those won't "see" those windows) and you should try something like OBS or FRAPS. OBS has the advantage of being free.

My sincerest thanks. :shobon:

xeose4 fucked around with this message at 20:21 on Oct 21, 2014

PerrineClostermann
Dec 15, 2012

by FactsAreUseless

Admiral H. Curtiss posted:

More likely an issue with DirectShowSource, which is inconsistent and unreliable. Get the FFMS2 plugin for loading MP4 instead.

I've switched to FFMS2 anyway; DirectShowSource was resulting in a gradual audio desync.

Hizke
Feb 14, 2010
Edit: It turns out I got it all fixed! Thanks/sorry!

Hizke fucked around with this message at 20:10 on Oct 23, 2014

Captain Flame Guy
Mar 11, 2012

A couple of weeks ago I purchased a ModMic to use with a pair of headphones, replacing another broken LX-3000 headset.
When I tried plugging it in and recording sound samples in Audacity, I noticed that the volume of the microphone is incredibly soft. Looking at the microphone volume indicator in Windows only shows it barely getting up to one or two bars out of around 10 or so.

When I try to use it in Mumble it sounds fine as far as I can tell, while it's also audible if not a bit soft in Skype. Boosting it seems to help a bit, but introduces an excessive amount of noise unlike what I got with the LX-3000's microphone.

Is there anything I can do about this?

Hizke
Feb 14, 2010
Hate to post again after I figured out my last problem, but I'm running into a new situation with audio.

I'd like to do live commentary on something, but I can't seem to figure out a good way to do it. I've kinda pinned down that I can record both the capture footage and audacity for live commentary, but syncing is my next big hurdle. And even after I sync, what would be a good way to encode? Before or after?

Here's my workflow issue: Megui, get video/audio then go into Vegas with Video and audio to sync. Can I also make edits from there and then mux in megui or will it be a headache?

I have not tried yet, I spent most of the day trying to bang through video encoding/audio issues that I'm going to sleep on it, but any advice from other people on how they encode and sync live commentary would be great. I'm quite bad at avisynth, but I'm willing to learn. Any helpful tips would be appreciated!

PerrineClostermann
Dec 15, 2012

by FactsAreUseless
For syncing, what I occasionally do is count as I flip through menu options, just to give me an event to compare across streams.

CJacobs
Apr 17, 2011

Reach for the moon!
To sync live commentary, start recording your voice audio before starting your video recording. Then, count down from 3 and say 'sync' as you hit the record button on your game. Also works with co-op commentary by having everyone else do it too. As for encoding, I can't really be of help there since I just render my final video straight from Sony Vegas, sorry.

El Generico
Feb 3, 2009

Nobody outrules the Marquise de Cat!

Captain Flame Guy posted:

A couple of weeks ago I purchased a ModMic to use with a pair of headphones, replacing another broken LX-3000 headset.
When I tried plugging it in and recording sound samples in Audacity, I noticed that the volume of the microphone is incredibly soft. Looking at the microphone volume indicator in Windows only shows it barely getting up to one or two bars out of around 10 or so.

When I try to use it in Mumble it sounds fine as far as I can tell, while it's also audible if not a bit soft in Skype. Boosting it seems to help a bit, but introduces an excessive amount of noise unlike what I got with the LX-3000's microphone.

Is there anything I can do about this?

Make sure that the audio playback level in Audacity isn't turned down. For a while I didn't notice Audacity's own playback level slider near the mic level slider and thought my recordings were really quiet.

Hizke
Feb 14, 2010

CJacobs posted:

To sync live commentary, start recording your voice audio before starting your video recording. Then, count down from 3 and say 'sync' as you hit the record button on your game. Also works with co-op commentary by having everyone else do it too. As for encoding, I can't really be of help there since I just render my final video straight from Sony Vegas, sorry.

What settings do you typically render at in vegas?

The T
May 29, 2010

A sufficiently chaotic system is maximally fair.

CJacobs posted:

To sync live commentary, start recording your voice audio before starting your video recording. Then, count down from 3 and say 'sync' as you hit the record button on your game. Also works with co-op commentary by having everyone else do it too. As for encoding, I can't really be of help there since I just render my final video straight from Sony Vegas, sorry.

I don't recommend this because various programs/capture cards could have a lag before they start recording, or your computer could hitch at the moment you hit the record button, setting everything off a second. Always sync with something actually in the video.

Captain Flame Guy
Mar 11, 2012

El Generico posted:

Make sure that the audio playback level in Audacity isn't turned down. For a while I didn't notice Audacity's own playback level slider near the mic level slider and thought my recordings were really quiet.

It isn't just Audacity that's recording at a really low volume. When I try use my microphone when streaming using OBS or when I use Windows' own recording program, the audio is not audible at all.

The T
May 29, 2010

A sufficiently chaotic system is maximally fair.

Captain Flame Guy posted:

A couple of weeks ago I purchased a ModMic to use with a pair of headphones, replacing another broken LX-3000 headset.
When I tried plugging it in and recording sound samples in Audacity, I noticed that the volume of the microphone is incredibly soft. Looking at the microphone volume indicator in Windows only shows it barely getting up to one or two bars out of around 10 or so.

When I try to use it in Mumble it sounds fine as far as I can tell, while it's also audible if not a bit soft in Skype. Boosting it seems to help a bit, but introduces an excessive amount of noise unlike what I got with the LX-3000's microphone.

Is there anything I can do about this?

First thing I would do is check in: Control Panel, Sound, Recording, the Microphone, Levels, and see if it's unusually low (and if it isn't, still boost it anyway and see if that fixes poo poo)?

Metroixer
Apr 25, 2009

maddecent
I'm trying to record Oddworld: Abe's Exoddus on the PC. It's a relatively old game, and made weirdly enough that neither Fraps nor OBS recognize it as a game. I tried using OBS' monitor capture as a workaround, and it captures the game, but it doesn't keep the original resolution of the game. I'm not sure what else to try as a recording tool. Camtasia simply doesn't record the game, and hypercam makes the FMV cutscenes/transitions look like trash. Should I just settle with what OBS gives me, is there a way to stop OBS from stretching things out?

For comparison, here's a video of Oddworld: Abe's Oddysee that I finished not too long ago. I recorded this on a Playstation emulator. The aspect ratio was normal, but I had nothing but a nightmare of problems playing this way (Crashes, accidentally pressing button prompts that would close the game and have me lose an hour of recording, glitches that literally made me have to replay through to my last save at least once).

https://www.youtube.com/watch?v=ursm0b9RNps

Now here's a quick clip I just recorded from Abe's Exoddus. Both games use the same engine. You can see how there are no black borders on the sides here.

https://www.youtube.com/watch?v=3zUbmxH46jM&feature=youtu.be

Sorry if I missed something similar to this in the last few pages. I should also mention that Abe's Exoddus will not play in a window. It's forced full screen and there's no settings to change that. I've tried using dxwnd to force it into a window, and got a choppy screen at best/black screen at worst.

Xenoveritas
May 9, 2010
Dinosaur Gum

Metroixer posted:

I tried using OBS' monitor capture as a workaround, and it captures the game, but it doesn't keep the original resolution of the game.

I'm not certain what you mean here. Do you mean something like, for example, the window is 640x480 but OBS is stretching it to, say, 1280x720? If that's the case, hit "Edit Scene" and right click on the window capture, choose Position/Size, and choose "Reset Size." (Or just hit Ctrl-R.) That should make it be 1:1 in the video OBS is recording.

If instead you mean that it's showing up stretched in the fullscreen window and OBS is properly recreating that, then I don't have a solution.

Metroixer
Apr 25, 2009

maddecent
You're right in saying it's the former. I tried what you suggested and it doesn't seem to have any affect (pressing Ctrl-R while recording doesn't do anything either). To clarify, the game on my actual monitor is full screen 640x480, but with black bars on the side to keep aspect ratio.

Admiral H. Curtiss
May 11, 2010

I think there are a bunch of people who can create trailing images. I know some who could do this as if they were just going out for a stroll.
And what does OBS give you if you set the OBS recording area resolution to 640x480?

Adbot
ADBOT LOVES YOU

Metroixer
Apr 25, 2009

maddecent

Admiral H. Curtiss posted:

And what does OBS give you if you set the OBS recording area resolution to 640x480?

It only records that corner of the screen. I know what you're getting at, though. I recorded the last 2 eps of Oddysee with Camtasia and it turned out fine. This was also on my old windows 7 laptop. I'm on Windows 8 now, if that makes any difference.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply