Log in

View Full Version : Encoding 2 videos simultaneously in VirtualDub?


iCookie
15th August 2008, 15:00
Okay so I'm currently in the process of encoding some Simpsons, Futurama and Family Guy episodes. I am converting them all from MPEG-2 (capture) to Xvid. The problem is that it is REALLY slow on my T7200 CPU.

So my question here is, do you think it would be okay if I open two instances of virtualdub at a time, and then encode two videos simultaneously in different virtualdub windows?

Or is this not a smart idea? Will the encoding quality suffer in forms of skipping or whatever?

Oh and when doing this, I will of course assign the different VirtualDub windows to different cores...


Oh and also, in some videos I am having this (http://img356.imageshack.us/img356/7395/wtfhk2.png) weird problem. These lines are sorta flowing downwards on all horizontal black lines that are close to eachother...Does there excist any filter to fix it?
I am capturing via analog cable, PAL.

Dark Shikari
15th August 2008, 15:02
Or is this not a smart idea? Will the encoding quality suffer in forms of skipping or whatever?Nope, you can do as many as your CPU can handle.

You could also try the multithreaded Xvid encoder (though its not very good) or a fully-threaded encoder like x264.

iCookie
15th August 2008, 15:09
Nope, you can do as many as your CPU can handle.

You could also try the multithreaded Xvid encoder (though its not very good) or a fully-threaded encoder like x264.

Yea I am using the multithreaded version of Xvid but it only uses 50-60% of my CPU at the best.

So therefore I am thinking it will be better to instead run xVid configured to singlethreaded, and instead running 2 instances of virtual dub.

Dark Shikari
15th August 2008, 15:11
Yea I am using the multithreaded version of Xvid but it only uses 50-60% of my CPU at the best.

So therefore I am thinking it will be better to instead run xVid configured to singlethreaded, and instead running 2 instances of virtual dub.Also note that Xvid's multithreading is not very efficient; that is, it uses X% more CPU to go Y% faster, where X > Y. So you might be better off not using multithreading at all and just doing many encodes at once.

iCookie
15th August 2008, 15:13
Also note that Xvid's multithreading is not very efficient; that is, it uses X% more CPU to go Y% faster, where X > Y. So you might be better off not using multithreading at all and just doing many encodes at once.

Yea that's basically what I'm thinking.
As long as it won't hurt my encode quality it should be okay :)

Oh and one more thing. Is it in anyway harmful for the encoding process if I run media players with videos / music in the background while encoding? Sorry if it sounds like a noob question, but I am a noob to encoding :D

Dark Shikari
15th August 2008, 15:15
Yea that's basically what I'm thinking.
As long as it won't hurt my encode quality it should be okay :)

Oh and one more thing. Is it in anyway harmful for the encoding process if I run media players with videos / music in the background while encoding? Sorry if it sounds like a noob question, but I am a noob to encoding :DOf course not, its like any CPU-intensive task; doing something else while encoding might slow it down a little but certainly won't affect the output.

iCookie
15th August 2008, 15:20
Ah okay :D Good to know...Thanks for your quick replies...by the way do you know a way I can possibly resolve the other problem in my 1st post, with the flickering horizontal lines?

iCookie
15th August 2008, 15:50
Oh and one more thing :P

I am overclocking my CPU from 2,0 to 2,35 GHz...And that overclock is stable for normal desktop use and for 3Dmark, but it tends to crash when playing certain games...

Do you think that overclocking might somehow hurt the results?

Dark Shikari
15th August 2008, 15:56
Oh and one more thing :P

I am overclocking my CPU from 2,0 to 2,35 GHz...And that overclock is stable for normal desktop use and for 3Dmark, but it tends to crash when playing certain games...

Do you think that overclocking might somehow hurt the results?I don't see why; if it doesn't crash you should be fine...

iCookie
15th August 2008, 18:16
Okay, thanks for all your help...

But there is one more issue.

In some videos I am having THIS (http://img356.imageshack.us/img356/7395/wtfhk2.png)weird problem. These weird blue and purple lines are sorta flowing downwards on all horizontal black lines that are close to eachother...Does there excist any filter to fix it?
I am capturing via analog cable, PAL.

mikeytown2
15th August 2008, 21:36
iCookie, that appears to be an interlacing issue. post (http://en.wikipedia.org/wiki/Online_storage#Comparison_of_notable_file_hosting_services) a short clip (60 frames or so) of the original mpeg2 stream and we should be able to offer some advice.

iCookie
16th August 2008, 00:31
Here you go:
http://www.savefile.com/files/1732144

rtjnyoface
16th August 2008, 04:58
The problem is that it is REALLY slow on my T7200 CPU.

I understand as I too have the same processor. Your laptop correct? 2.0GH right

So my question here is, do you think it would be okay if I open two instances of virtualdub at a time, and then encode two videos simultaneously in different virtualdub windows?

You could but it might be better to try something different.See below

Or is this not a smart idea?

Not particluarly the SMARTEST of ideas.

Will the encoding quality suffer in forms of skipping or whatever?

It might produce some skipping but not picture quality.



Oh and when doing this, I will of course assign the different VirtualDub windows to different cores...

Ok. Got the right idea but it my be better to try something different.

Here's something different:I use vdubmod all the time. I also had the problem of slow encodes but thought it was because of my lame cpu. I've always seen and read that if the threads option in xvid is set to 0 then xvid will figure out whether or not your processor is capable of encoding more than one thread. BUT...I've recently become an x264 fan (because the file sizes are much smaller) and I started using MeGUI to do my encodes with x264. Well we can also use xvid within MeGUI and I decided to do some encoding in MeGUI. MeGUI comes with a different build of xvid(xvid encraw) than the one available from the xvid website. So I decided to use this build and the threads option was not greyed out and defaulted to 0 as the the build I had been using with vdubmod. So I set it to 2 (since it is recommended only using the same number of threads as you have cores and the T7200 has two) and DEAR GOD my encodes pretty much multiplied themselves by 2. On a normal encode with a crop filter, resize filter, and msu deblocking (all internal vdubmod filters except msu deblocking), my first pass would shoot to about 50 fps and the second about real time.


Oh and also, in some videos I am having this (http://img356.imageshack.us/img356/7395/wtfhk2.png) weird problem. These lines are sorta flowing downwards on all horizontal black lines that are close to eachother...Does there exist any filter to fix it?

Yes. your source is interlaced. You can DEinterlace it with vdubmod's internal filter deinterlace:). Just set it to blend. It usually produces the best results. If your watching it closely (such as a foot or two away) then it would help to deinterlace. But, strangely, it doesn't make sense to deinterlace it, and spend the cpu power to do so I might add, if you are going to watch it from more than 3 or so feet away (like on your tv). Televised programs are normally interlaced but we don't usually see it.I see it only because (1)my tv is kind of a crappy crt and (2) I have become able to notice it because of my encoding experience. If you're truly paying attention to what you are watching you won't really notice it IF you are watching it on a tv, otherwise you'll still see it as it is very noticeable on a pc screen.

iCookie
16th August 2008, 05:40
Well I tried the VirtualDub integrated blend filter, but it still does not remove those weird looking artifacts... :( :( Help please :(
Also, I have a video of the artifacts...it's here:
http://www.savefile.com/files/1732144

The T7200 is in my laptop...that's correct. Also, I have tried using MEGui, but I find it sorta hard to get into and properly understand...Also VirtualDub offers more filter options than MEGui I think...

rtjnyoface
16th August 2008, 06:51
it still does not remove those weird looking artifacts...

Yeah if you want that gone you should either (1) increase file size for more quality or (2) use constant quality encoding(which will also increase your filesize:)). Thats what we get when the quality isn't good enough.

Also, I have tried using MEGui, but I find it sorta hard to get into and properly understand...

Yeah, if you want to be able to use megui you're going to have to be able to use dgindex and avisynth (I only use the basics of these programs). You'll also need to know the entire process of what really goes on and the settings for both video and audio. Then you'll have to find out what works for you. E.G. audio and video settings such as at what audio setting can YOU notice a difference in quality, and what settings for video encoding that compliment your ability to see macroblocking, noise, etc.

Also VirtualDub offers more filter options than MEGui I think...
You know, it might be debatable. They both really have the same abilities pretty much. Oh I'm sorry I thought you meant general options. As far as filters vdubmod has internal filters(and external ones) yes but they both use avisynth which has an innumerable amount of filters. So, TECHNICALLY, vdubmod does have more filter options but just because they are internal doesn't mean much because they can both use avisynth (which you can load all the same filters).

Any more questions?

If you really want to increase your encoding speed I would really recommend using megui. It's pretty darn easy to learn the basics of avisynth and dgindex. I'm thinkin about writing up my own encoding guide and setting it up on el interneto.

mikeytown2
16th August 2008, 07:25
Here's some AviSynth code that takes care of most of the glaring issues. The first post in this thread (http://forum.doom9.org/showthread.php?t=134078) is quite effective for animation, but it's quite slow!


#Load Source
AVISource("Horizontal_Flicker_Test.avi")

#Deinterlace
TDeint()

#Denoise
deen("a3d",4,8,9)

#DeRainbow/Stabilize Chroma
Checkmate(20)
DFMDeRainbow()


TDeint() (http://bengal.missouri.edu/~kes25c/)
Deen() (http://avisynth.org/warpenterprises/#deen)
Checkmate() (http://forum.doom9.org/showthread.php?p=1113172#post1113172)
DFMDeRainbow() (http://www.aquilinestudios.org/scripts/)
MSharpen() (http://neuron2.net/msharpen/msharpen.html)
MaskTools2() (http://manao4.free.fr/?M=D)
FluxSmooth() (http://kvcd.net/sansgrip/avisynth/)

iCookie
16th August 2008, 08:43
Alright, thanks mikey:D That script did the trick.

iCookie
16th August 2008, 08:53
By the way I got one more question...(they never stop lol)

Why does VirtualDub default to preload 500ms of sound, and interleave the audio every 1 frame? Won't my audio be out of sync then?

squid_80
16th August 2008, 10:31
Those options don't affect sync, only how the data is stored in the avi file.

iCookie
16th August 2008, 12:25
Okay then :D
Thanks for all your help guys, it's much appreciated.

Now I got some encoding to do :D

iCookie
16th August 2008, 13:02
Here's some AviSynth code that takes care of most of the glaring issues. The first post in this thread (http://forum.doom9.org/showthread.php?t=134078) is quite effective for animation, but it's quite slow!


#Load Source
AVISource("Horizontal_Flicker_Test.avi")

#Deinterlace
TDeint()

#Denoise
deen("a3d",4,8,9)

#DeRainbow/Stabilize Chroma
Checkmate(20)
DFMDeRainbow()


TDeint() (http://bengal.missouri.edu/~kes25c/)
Deen() (http://avisynth.org/warpenterprises/#deen)
Checkmate() (http://forum.doom9.org/showthread.php?p=1113172#post1113172)
DFMDeRainbow() (http://www.aquilinestudios.org/scripts/)
MSharpen() (http://neuron2.net/msharpen/msharpen.html)
MaskTools2() (http://manao4.free.fr/?M=D)
FluxSmooth() (http://kvcd.net/sansgrip/avisynth/)

Hmm, this filter settings crashes VirtualDub when I attempt to open a .mpg file? I have the "MPEG2.vdplugin" installed in the VirtualDub folder (to import mpeg2 files), but still VirtualDub crashes when I run the avisynth script...what am I doing wrong?

mikeytown2
16th August 2008, 22:16
You need to load the mpeg file inside AviSynth. Use this program to make a dv2 file.
http://neuron2.net/dgmpgdec/dgmpgdec.html

So after your done it should look something like this

#Load Source
MPEG2Source("yourfile.d2v")

#Deinterlace
TDeint()

#Denoise
deen("a3d",4,8,9)

#DeRainbow/Stabilize Chroma
Checkmate(20)
DFMDeRainbow()