Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Question regarding VirtualDub  (Read 8938 times)

0 Members and 1 Guest are viewing this topic.

DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Question regarding VirtualDub
« on: October 23, 2013, 01:31:22 PM »
A few times a week a group of us gamers get together for gaming and I record the events using my licensed copy of FRAPS. After the event is over with I have recorded the multiplayer gameplay in a file that is anywheres from 20GB to 50GB in size. I have been compressing these recorded gameplays to AVI files using VirtualDub which does a great job of making a 20GB uncompressed video recording at 30fps size compressed down to around 800MB without loss of noticable quality. I then post them on youtube for the group to view the gameplay and point out what can be done better next time etc.

Generally the conversion process is quite long, like 3 hours to compress the uncompressed 20GB raw video/audio footage down to 800MB and then delete the raw uncompressed video after confirming that the compressed 800MB video is a flawless compression.

The system I have been recording the gameplay on as well as compressing the videos afterwards is the following hardware specs. While this system is dated, a system I bought the guts for and assembled inexensively in April 2009, I am trying to figure out why its not using the full CPU processing power as the CPU monitor indicates? :

Athlon x2 4450B  2.3Ghz CPU (AM2 socket) with 1MB L2 Cache
BIOSTAR MCP6PB M2+ (AM2+) motherboard
3GB DDR2 800Mhz Corsair XMS2 RAM ( *4GB installed 2 matched sticks, but 32-bit Win 7 limitation )
ASUS ATI Radeon HD5450 video card with 512MB RAM
500GB SATA II HDD
Windows 7 Home 32-bit

* The memory available through this compression conversion process remains at 1.2GB free of 3GB, so I know that I am not running into a memory bottleneck of capacity available.

I have the CPU monitoring gadget on my desktop and when I set the speed on VirtualDub to maximum for processing speed with the slider and highest processing priority in the options, I dont see any noticable change in changing it from Normal to Highest Priority, it seems like the slider for the execution speed of the conversion process is the only feature that I see the CPU % decrease or increase with for both cores.

The maximum I can get VirtualDub to use of the CPU is around 65%, so to me there is around 35% wasted processing power maybe.

The hard drive is not flooded with traffic during this conversion process so I am trying to figure out where the bottleneck is to make the CPU only run maximum of 65% when this is the only application running.

This system is strong enough that with 65% used in the compression conversion process, the 35% unused I can launch a game and play without lag pegging the CPU cores to 100%. Maybe VirtualDub was designed specifically to allow for multitasking to exist with it running, but for times when you want to compress a video asap, it would be nice to be able to tell the software to use 100% of the CPU processing power vs cap out at 65%.

*Also to note that I do not have Coon'n Quiet enabled so the CPU remains at 2300Mhz all the time vs speed stepping. In the past I used the Cool'n Quiet feature, but this system doesnt have to run green as for when it is in use, it is in use, and when it is not I shut it down vs leaving it idle.

In the past I have also been able to run more than one conversion instance at the same time, such as if I am compressing the video for 2 raw videos at the same time, and I can peg both cores to 100% for a period of time of 1 to 3 hours depending on the size of the videos to be processed and the system runs perfectly fine and temps stay good with the CPU and other hardware. I also during this time can surf the web if needed so it appears to not hold the system down, but allows for other processes/applications to co-exist without much lag in launching the application such as firefox etc.

While most conversions I start before bed and let it crunch it out while I sleep and wake up the next day to process complete, there are some times during the day when I want to compress them from their raw form and post them on youtube, and I have to wait for it to crunch it out. So it would be nice if there was a way to get it to use more of the available CPU processing power to complete in less time when I dont need the computer for other multitasking purposes except for the single task to to crunch through this compression process.

http://www.virtualdub.org/

Salmon Trout

  • Guest
Re: Question regarding VirtualDub
« Reply #1 on: October 23, 2013, 02:06:12 PM »
A thought - have you enabled multithreading in VirtualDub options?

I have Vdub 1.10.1

Virtualdub - Options - Preferences

Click "Threading" in the list pane on the left.

If Video Compression Threads is set to 0 change it to 1

In the "Video Filter Threading" drop-down, select the number of video filter threads you want to use. For best performance, make this the number of cores in your CPU.

Click "Save," then "OK."

I have a Shuttle SN78SH7 with a Phenom II 3.0 GHz CPU and 4 GB RAM.

Using the fastest speed settings in Vdub (the slider all the way to the right):

With the default settings (Video Compression Threads=0, Video filter threading=disabled), transcoding a randomly selected mpeg-2 file to DivX mpeg-4 with arbitrary video & audio codec compression settings uses around 48%-50% cpu (equally shared between the 4 cores), rendering speed around 78-80 fps.

When I change the settings to Video Compression Threads=1, Video filter threading=4 threads with the same compression settings I get the CPU usage up to 98% (essentially pegging all 4 cores) and the rendering rate up to 100-105 fps.

Watch your CPU temp though.

Bear in mind that heavy audio compression in the output file will slow the whole thing down; i.e. PCM will transcode faster than mp3, no audio is fastest of all.

DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Question regarding VirtualDub
« Reply #2 on: October 23, 2013, 04:02:45 PM »
Thanks for the quick response Salmon. I was not aware of this adjustment and will try it out tonight. In regards to concern about watching the CPU temp, I have pegged this CPU to 100% for 3 hrs straight before when playing games at the same time as processing a video compression and according to speedfan the hottest the CPU gets is 48C with 37C at idle with the graphing enabled to look back at recorded temps over time with game full screen.

From the thread change to 1, and your results, it looks like that should fix it.

Thanks  8)


Salmon Trout

  • Guest
Re: Question regarding VirtualDub
« Reply #3 on: October 24, 2013, 04:19:56 AM »
Another thought... I believe that - like my Phenom - your Athlon x2 has Cool 'n' Quiet technology. I expect you will surely have it enabled in the BIOS and that you are using the High Performance power plan in Control Panel/Power Options. I use VirtualDub much less these days, even though it is a fine piece of software, because I now have a smart TV with network and USB which can play just about anything I put on my NAS or on a pen drive, so that I hardly need to transcode anything, and secondly that if you don't mind the command line, Ffmpeg is a very useful tool.

DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Question regarding VirtualDub
« Reply #4 on: October 24, 2013, 03:25:43 PM »
Yes my BIOS has Cool'n Quiet feature, but I disabled this because it runs more snappy when its not stepping between 575mhz, 1150mhz, 1725mhz, and 2300mhz with a fluctuating clock rate. Since I dont need to run green and CPU temp is no concern as for it stays cool at 2300mhz even at 100% usage for hours on end, I did away with the Cool'n Quiet feature which was enabled by default in the Biostar BIOS.

I made the change to ( 1 ) from ( 0 ) for Threading and it spead it up some which is better. It now runs at 75 to 80% vs just 65% of before. So I am happy with the results after the preference settings change. Couldnt get it to run at 100%, but the small gain was worth it to make better use of the 2 cores.

Never heard of Ffmpeg ... only other tools I have used other than Virtual Dub is Format Factory which allows me to make digital copies of my DVD's so that I cal play them on my Sony Digital Walkman which supports playing WMV's, so I make a digital copy of a DVD that I own and add it to this player for long plane flights to watch a movie and pass the time with earbuds and the small 2.5" display. I tried using a tool named Handbrake, but had major issues with it in regards to the audio and video timing would be mismatched badly to where you felt like you were watching one of those old 70s kung fu movies where the mouth moves and then you hear the voice. Format Factory I havent had that issue with yet.


Salmon Trout

  • Guest
Re: Question regarding VirtualDub
« Reply #5 on: October 24, 2013, 03:51:43 PM »
Never heard of Ffmpeg ... I tried using a tool named Handbrake

ffmpeg is the premier command line video transcoding and processing app. There are many "video converter" GUI programs out there, which are just GUI font ends for ffmpeg, and Handbrake is one of these. I would not blame the audio/video sync problems on ffmpeg or Handbrake though.

http://www.ffmpeg.org/

Windows builds of ffmpeg

http://ffmpeg.zeranoe.com/builds/

Some ffmpeg front ends

Avanti  http://avanti.arrozcru.com/

ffmpeg GUI http://sourceforge.net/projects/ffmpeg-gui/

A lot of people say nice things about WinFF http://winff.org/html_new/

Some paid-for "video converter" apps are just front ends fpr ffmpeg, in violation of the GPL

Also I would take a look at Avisynth http://avisynth.nl/index.php/Main_Page




DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Question regarding VirtualDub
« Reply #6 on: October 24, 2013, 04:13:19 PM »
Quote
I would not blame the audio/video sync problems on ffmpeg or Handbrake though.

When Format Factory, Virtual Dub, and Fraps seem to have no problems with keeping everything in sync between audio and video, but yet Handbrake does have issues when tried on 2 computers one of them a powerful quadcore and the other an ok processing power dual-core, I did away with handbrake and kept with Format Factory. Maybe there is an option in Handbrake to correct for the mismatched timing, but I took it as a poor quality product to lose sync as for I would expect the audio and video streams to have some sort of numeration to match the audio and video sync, and seeing no flaws with Format Factory, I kept with that instead of trying to fix a problem with Handbrake which to me should work at the get go without special configuration to get the timing sync'ed between audio and video.

With Handbrake did you have to make any changes to get the timing correct or were you lucky that due to some sort of hardware difference such as a lack of lag or a lack of one stream being faster than the other when recorded you lucked out with perfect timing?  *The only difference I may have in my systems from yours is that I have both a SSD and HDD in both systems I attempted to use Handbrake with and maybe the mixture of a SSD in the works caused a mismatch in the data write process etc ( writing to drive too quickly etc )... for a short while I was using my SSD for swap space which had its advantages in performance, but I later pointed the swap space back to the HDD because I read that it can wear out the cells in SSD's prematurely.

But anyways not that important to try to fix Handbrake for my systems as for Format Factory is working flawlessly for my occasional need to make one of my owned DVD movies into a WMV for something to watch when stuck on a lengthy plane flight and nothing but the 2 people on either side of you flighting for the shared arm rest and the seat back ahead of you to stare at and no leg room when you are 6ft 2inches tall, with the person ahead of you that wants to put there seat back and you are intentionally pressing with your knees against the seat back so that they fight with it, and it doesnt go back, and they finally give up..... I guess you can tell that I hate flying cheap corporate purchased tickets from that last line. But at least I found a way to try to get some room on the flights by flying southwest so that I might get lucky and get an exit row for some room and a window seat to have 1 arm rest to myself..LOL  ::)  And if your flying and try to put your seat back and it doesn't go back I might be sitting behind you.  :P   ;D

Quote
Some paid-for "video converter" apps are just front ends fpr ffmpeg, in violation of the GPL

Yah similar situation... I fell for a piece of software I found on the web once for $18 called Website Downloader or something like that, and later found out that someone basically took the open source and made a few changes to rename it and remove credit to the original project, so someone got $18 out of me. The software source is HTTrack available FREE on the web, but I didnt find the original free at the time and paid the $18 for a knock off of the same project. I got this when I was looking for a way to make offline copies of price guides that are free info on the web to have on a laptap offline when going to auctions and shows to basically download a copy of a sites latest up to date pricing and then go to the show loaded with info on latest market info and use that as a guide for what is hot and what is not for anything that I may not already know the value of by memory.


Still going to check out ffmpeg though, as for that may be a useful utility  :)

Salmon Trout

  • Guest
Re: Question regarding VirtualDub
« Reply #7 on: October 25, 2013, 12:35:15 AM »
I mainly use Handbrake as a convenient front end to ffmpeg to rip DVDs that I own (natch!) to mkv files so that I can put them on my NAS box and stream them over the home network to the TV using the DLNA server on the NAS. I have never had a problem with audio/video sync doing this. I have done it on a 3 Ghz Pentium 4 desktop and a core 2 Duo laptop as well as my AMD quad core desktop. I sometimes make Handbrake write the output mkv file to a network share. I used to also use ffmpeg from the command line to turn flv and mp4 videos into something my old DVD player could play from its USB port (xvid mainly) and I never had a problem there either. I would remember that any video transcoding application, whether it is a GUI or command line, or a hybrid, is just a man in the middle between the input codec that reads the source video and the compression codec that produces the output video stream. To a certain extent it will make choices of codec settings for you. Also I would recall that Handbrake is freeware produced by a one-man outfit as far as I know. I do know that with Handbrake you can actually drill down and see the command line it creates for ffmpeg (Show Queue>Queue>Generate Batch Script). I do recall that I used to get audio/video mismatches on material I had transcoded with Virtualdub, but oddly they would play fine on a PC but not on my DVD player via USB. I fixed it by not using VBR (variable bit rate) mp3 as the audio compression in Vdub. I either used a fixed rate mp3 setting or else PCM which gives bigger final file size. I expect you can fool around with ffmpeg settings in a similar way. But the bottom line is, like you, if I find a solution that works out of the box and just does what I want without any fuss, I stick with that.

Salmon Trout

  • Guest
Re: Question regarding VirtualDub
« Reply #8 on: October 25, 2013, 12:36:59 AM »
Still going to check out ffmpeg though, as for that may be a useful utility  :)

I see that the ffmpeg project seems to have split or done something like that, because you now have a thing called x264 as well but they both seem to share the same documentation.