Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

AVI Gain corrupting video/audio


djvj

Recommended Posts

My process flow to produce the sample clip is this:

Record in Camtasia Studio to uncompressed video and PCM audio --> Edit in Sony Vegas Pro 9 --> output is same as input with uncompressed video and PCM audio.

I tried using AVI Gain on a few files, but result is this:

capturetvl.png

Color became negative, picture is upside down and zoomed, and audio is missing. VLC can't even play it, I got that shot from Vegas.

Here is the sample uncompressed 2sec video clip before putting through AVI Gain which resulted in the above screenshot. Its audio peaks at about -12db, want to raise it to standard levels. I think emumovies clips are what, -6db or 0db?

Video

Would appreciate knowing how to change the AVI Gain batch settings to produce a valid video.

Link to comment
Share on other sites

when using avi gain make sure your audio is already in mp3 format.

Link to comment
Share on other sites

Yeah Circo's build of AVI Gain requires MP3 audio stream...it simply won't work on PCM...as for the video I'd guess that MEncoder screwed the pooch there.

I have my own build of AVI Gain...which is greatly different than the build Ciro offer's...mine is GUI based and works on nearly everything...it will work on PCM...but it converts it over to AAC as AAC is a better audio stream than MP3...and well PCM doesn't support Replay Gain where MP3, AAC, Vorbis do. My current build will hang when converting DTS audio streams...and there maybe issues when used against MKV & MP4 containers.

Keep in mind my build will not convert MP3 to AAC as well it would be foolish to...damage is already done...and like I said above MP3 supports Replay Gain.

Mine also supports multiple Audio, Video and Subtitle streams if present in the original asset file...I am working on adding support for adding external streams & meta data...along with preserving current meta data.

I'm not currently sure if I have filtering in place in cases where a mono audio stream needs to made stereo. (AAC)

My build can be currently found here. (I need to start hosting stuff here before Circo starts throwing stuff at me)

Anyways I use FFMpeg rather than MEncoder so it is far less likely to screw up your video stream.

*Update*

Added my build to the Download section of the site...currently awaiting approval.

Link to comment
Share on other sites

My build can be currently found here. (I need to start hosting stuff here before Circo starts throwing stuff at me)

Anyways I use FFMpeg rather than MEncoder so it is far less likely to screw up your video stream.

*Update*

Added my build to the Download section of the site...currently awaiting approval.

Let me fix that approval thing for ya!

I changed the settings so that only Basic Members need approval, supporting and above is now auto approved.

Link to comment
Share on other sites

Thanks Nologic. I run the exe, I check PCM box, point to the folder with my test.avi and click run. Says batch complete literally as soon as I clicked the button. I look in the new completed folder and nothing is there.

Link to comment
Share on other sites

Thats odd as hell...got a sample vid you can post so I can take a peek and see if I can find out what is going on?

scratch that...I just tested on my own TSCC + PCM file and it failed....I'll get a replacement up later today. :)

Link to comment
Share on other sites

My sample vid is in my first post, it's only 2 seconds because it's uncompressed (83MB). Go ahead and test on your end so you know what i'm working with.

Link to comment
Share on other sites

Replace the executable with this one...it's a limited build...it'll convert whatever to MP3 only...as AAC has an issue when in AVI containers...I noticed I got a few conditionals missing...anyways for AVI & FLV's this should be fine.

I'll get a proper build up later that will hopefully fixes all out standing issues.

AVI Gain Beta.zip

Link to comment
Share on other sites

ok audio is good, it converted fine. Video though, got even more messed up.

captureja.png

It's not like I am using some odd codec, it's just uncompressed video.

Link to comment
Share on other sites

hmm question have you tried playing it in a media player that supports Direct Show? Also are you using the latest build of VLC...as VLC in the past had issues with TSCC, however the latest plays TSCC just fine for me.

Link to comment
Share on other sites

I don't have an issue with TSCC in players. I can view the movies just fine. The issue is after I run the videos through AVI Gain scripts, it corrupts the video. Just try the video I posted above, you will see.

I just realized an issue with vegas in being able to edit TSCC formatted clips...You can't use the 64bit version, any codec or codec pack you install will never appear in Vegas 64bit. You need to install the 32bit Vegas and you can now edit and output the TSCC format along with other codecs you install. You would think codecs would start to come out that support 64bit apps...

Link to comment
Share on other sites

Okay looked at the video and its not TSCC...its "Codec: 32 bits RGB (RV32)" as reported by VLC.

Your right the scripts do screw up the video stream...I'll look over my code...but honestly it shouldn't as it's a direct stream copy.

Link to comment
Share on other sites

Right, I said in the first post, I do everything uncompressed. You brought up TSCC, not me :)

What vlc is telling you there is not a codec, just what the video is, because uncompressed is not really a codec, it's just raw video.

Now that I got TSCC working in vegas, I can try converting one of my uncompressed videos to TSCC and making sure I don't see a quality difference. I prefer uncompressed because I know you can't get better quality then this and it's what many editors use professionally.

Link to comment
Share on other sites

Okay I brought up TSCC...its a lossless codec so you won't notice any difference in quality...however you will notice a much smaller file size.

While you can't get better...you can get the same quality. :)

Normally folks capture in TSCC & PCM...then do their edits...then finally encode audio and video streams.

Typical video streams are encoded to VP6 or xVid...however h264 is a better encoder, which can be used in FLV & AVI containers.

Typical audio streams are only done in MP3...but AAC & Vorbis are better...however applying Replay Gain to Vorbis sucks.

However I think I may have found an answer to putting AAC in AVI. :)

If all goes well a real update should be coming. :)

Link to comment
Share on other sites

File size is not an issue for me, also keeping it uncompressed speeds up render times by like 5x. I noticed it took a long time to render as TSCC.

Converting my video to TSCC then running it through your batch now works correctly. Quality looked good too. Thanks Nologic.

Link to comment
Share on other sites

hmm I never noticed any rendering lag with TSCC...course I used VitualDub as an editor...which is rather light weight...course lacks a shit load of features as well.

Well honestly you would likely do better to do your final encode for AV then run my app on the resulting file(s).

If you are going to do a lot of vid's you may want to try this workflow package out. I still need to update to use newer tools & code...but mostly that is waiting on me updating my Avi Gain build as that is part of the code base.

Link to comment
Share on other sites

I'm not sure how much time that would save me as 90% of the time is editing. After that, I would dump all the avis from vegas into a dir and run your avi gain tool, then dump all those outputs into AME and I'm done. If I'm reading it right, your workflow script would just do those last 2 steps at the same time, rather when wait for input from me.

Link to comment
Share on other sites

Well it should make editing 99.99% of your time...by using the VitualDub script on the parent folder containing sub folders (one per game) should cut actual editing time by 30% or more as you are just making two clips...title & game if I recall correctly...and that's it...the scripts will toss in the fades.

Anyways you should always be going from lossless to final encode...re-encoding from AVI to FLV is bad as it introduces noise into the video & audio...if you are not doing a stream copy for the audio. The extra noise will not only make the resulting file looks worse but will also increase file size.

One thing to keep in mind is with my stuff...should you later find a better encoder\container or what have you...you can batch load the AVISynth scripts and process things as you like.

Like I personally prefer On2's Flex encoding software for FLV creation over the freeware VP6 encoder.

Link to comment
Share on other sites

I always keep everything lossless until Adobe Media Encoder converts to FLV. The only thing is your script converts my lossless PCM to MP3, is this ok because audio is no longer lossless?

I do all my transitions manually, and I often do multiple gameplay clips in games with different transitions in between them. From the last gameplay clip to title I do the standard fade. The biggest timesink is getting good gameplay and title shots, then cropping the right section of my recorded clip I want to use. Each transition and fade takes me about 5-10 seconds in vegas.

What do you like better about on2flex vs VP6? Adobe Media Encoder uses VP6 for it's video.

Oh and my encoding times decreased to TSCC after rebooting, so it was just my system was slowing down after having it on for awhile. That and possibly giant fragmented files slowing things down.

Link to comment
Share on other sites

The biggest timesink is getting good gameplay and title shots, then cropping the right section of my recorded clip I want to use.

Yes, loading the game and play it is by far the most time consuming task.

Oh and my encoding times decreased to TSCC after rebooting, so it was just my system was slowing down after having it on for awhile. That and possibly giant fragmented files slowing things down.

Weird, I've had the same problem. Encding gets slower and slower, and after a reboot it's fast again. Has to be a bug in TSCC.

Link to comment
Share on other sites

@ djvj -

Well you should run my AVI Gain against the resulting FLV's rather than your lossless source files...however if you have...then with AME you should do a direct stream copy...not a re-encode & all should be fine.

Well at present my WorkFlow only supports two clips (Title, Game), however I could add support for multiple clips...with different transitions if so desired. However right now I'm just looking to refine it rather than add more bells and whistles since I don't think anyone has actually tried\used it.

I prefer On2 Flex above all for FLV...however far as I'm aware only the freeware VP6 allows FPS above 30...as I've been able to do 60fps 2-pass encodes.

@ bLAZER -

Well Tempest or myself can do up simple scripts to automate loading games...so that part can be made a bit faster. However as you stated getting good footage is still going to take some time & effort.

Link to comment
Share on other sites

Unless your script can play the game, it's not going to get the footage that I get from doing that myself. Half the games don't have good enough gameplay footage I would use in its attract mode. So I have to learn and play the game myself. Some things you just can't script.

I'll try your script against my final encodes. I did find a shortcoming in using TSCC, the codec does not have a 64-bit version, so you are forced to use all your apps in 32-bit mode in order to keep compatibility on each step. If you don't, all the video gets lost. I can't use 64-bit vegas, or 64-bit AME... I really wish Techsmith would release their 64-bit codec already. They talked about it on their forum, but still nothing :)

Link to comment
Share on other sites

Hehe no the scripts wouldn't play the games for you...just allow you to jump from one game to the next quickly...skip over games you have already done or have listed in a exclude list...or maybe switch to a different emulator if required and reload the game. Along with making sure the resulting capture has proper naming. So automate small things to aid in speeding up production.

Yeah I'm surprised they dont' have a 64bit build out already given that 64bit Vista has been around for a while now...not to mention Win7 is now out and about.

Link to comment
Share on other sites

So CS5 collection does not contain a 32-bit AME, I had to install the CS4 AME which is 32-bit. I was able to encode TSCC successfully now. Only thing about encoding FLV in AME is it still forces me to re-encode the audio again to mp3 at a max of 256 bitrate. It doesn't care that the source may be mp3 already. I hate that there is a speedbump at every step.

I ran a movie through your script, then final encode in AME and the audio sounded exactly the same still. That may be because I have your script set to 320 bitrate, then AME lowers it to 256 (it's not losing much if any quality).

Link to comment
Share on other sites

Well if you are re-encoding the audio stream you are likely losing the Replay Gain values added to the audio stream. So probably best leave the original source as PCM...as running my script at that point seems like it would be a waste of time.

Honestly I don't notice anything over 192kb when it comes to MP3 on PC speakers...granted I have some hearing loss since I'm a carpenter (bridges, dams,...).

Anyways I'd run my script post AME.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...