View Full Version : how to decode and fully use multi core?
draggoon01
16th December 2006, 21:08
i have core duo and when decoding wmv9 or avc material my cpu only maxes out 1 of the cores and never really utilizes the other core. is there a particular codec or player i should be using?
it seems odd decoding on pc isn't multi-threaded since i remember reading that ps3 uses 3 spe units for decoding and xbox360 hd-dvd uses all 3 cores.
EDIT:
i'm interested in utilizing two cores for decoding, not maxing them out. some content stutters and drops frames but seems to only use 1 core and stays ~%55
Inventive Software
16th December 2006, 22:10
For AVC decoding, ffdshow supports queueing of samples, which speeds up decoding for Dual-Core CPUs. Not sure on WMV9, try ffdshow for the same thing. I'd expect MS to give WMV9 multi-threaded decoding. Lord knows it's in need of a good kick up the backside to make it competitive to AVC. ;)
draggoon01
17th December 2006, 03:14
i've tried ffdshow but cpu usage stays around 55% even with queuing enabled. is there a decoder that would get closer to 100%?
or is decoding inherently single threaded?
foxyshadis
17th December 2006, 07:01
No, if you were to buy CoreAVC, Nero, or Elecard's decoder, you'd get multithreaded decoding; CoreAVC is the fastest, lightest, and cheapest of them (although Nero gives you lots of other filters, not all of which work all the time). ffdshow's multithreading is still on the to-do list.
KoD
18th December 2006, 16:27
"i've tried ffdshow but cpu usage stays around 55% even with queuing enabled. is there a decoder that would get closer to 100%?"
Why do you want it to be at 100% ? If it's not at 100% it means it is able to perform its decoding tasks completely without using all the CPU time.
mod
18th December 2006, 17:01
This is the first time I find someone who wants a decoder as cpu hungry as possible.. Why do you want to use all cpu power just to decode?
foxyshadis
18th December 2006, 17:10
I was assuming he's having trouble with 1080p (perhaps 1080p60, which is always good for killing a system), and asking for it the wrong way.
mod
18th December 2006, 18:46
Maybe this can help you, just replace $NUM with the number of threads you want to use:
mplayer -lavdopts threads=$NUM VideoFile.ext
akupenguin
19th December 2006, 00:09
-lavdopts threads is only implemented for mpeg2.
Rumbah
19th December 2006, 00:15
You could try VLC (www.videolan.org). I think it uses multithreading when decoding AVC but I'm not sure for WMV.
vortex_hl
19th December 2006, 01:46
Released version (non beta) WMP11 includes multi threaded VC-1 decoder. But it's work only with WMV9 Advanced Profile videos (FourCC WVC1). Not work with Simple and Main Profile videos (FourCC WMV3).
You can test it with this video
http://download.remedygames.com/movies/alanwake_720p60_51_15mbps.wmv
zambelli
19th December 2006, 03:07
Released version (non beta) WMP11 includes multi threaded VC-1 decoder. But it's work only with WMV9 Advanced Profile videos (FourCC WVC1). Not work with Simple and Main Profile videos (FourCC WMV3).
What? The same decoder DMO is used for WMV3 and WVC1.
vortex_hl
19th December 2006, 14:18
What? The same decoder DMO is used for WMV3 and WVC1.
yes. you're right. That interesting but on my tests, when decoding WVC1 samples both cores are used equal level (ex: %60-%60), but decoding WMV3 samples that usage %60-%10.
Hence I thought multi threading only for Advanced Profile.
Can anyone confirm that? Please test with this sample.
Manao
19th December 2006, 14:53
You could try VLC (www.videolan.org). I think it uses multithreading when decoding AVC but I'm not sure for WMV.It doesn't. It uses the same decoder as mplayer. However, VLC is threaded, so the audio / demux will be done in other threads. The video itself will be decoded in a single thread.
Rumbah
19th December 2006, 15:45
By the look at the taskmanager I thought it was multithreaded, because it looks different for WMV files. But I only have a 720p AVC file and that does not use that much cpu power. Is there a good 1080p AVC file that you can download for free?
foxyshadis
19th December 2006, 16:26
http://www.apple.com/trailers/
I don't think any of the free ffmpeg-based players have video decode threading, unless they use ICL's autothreading.
Rumbah
19th December 2006, 16:46
Ok, I took the Harry Potter trailer from there. But It's not that easy to get the files as there are no direct download links to the actual video files, but Quicktime files that link to the real movie.
I just looked at it and it seems that CoreAVC does not decode the video more "multithreaded" than VLC (but it is faster in general). The decoding is not distributed evenly between the (virtual) processors. I'll post a picture of the task manager later this evening.
draggoon01
19th December 2006, 17:38
yes. you're right. That interesting but on my tests, when decoding WVC1 samples both cores are used equal level (ex: %60-%60), but decoding WMV3 samples that usage %60-%10.
Hence I thought multi threading only for Advanced Profile.
Can anyone confirm that? Please test with this sample.
a single threaded app that's maxing out 1 core will appear with a ~%55 distribution on both cores in task manager.
"the Windows task scheduler is free to run a process on whatever CPU it has affinity settings for...meaning context switches back into the threads might occur on different cores each time, even though it uses only one at any given moment. This happens many times per second, thus giving the illusion that both cores are under use at the same time by the same program... "
Sirber
19th December 2006, 17:45
http://www.apple.com/trailers/
I don't think any of the free ffmpeg-based players have video decode threading, unless they use ICL's autothreading.
Need to pay for QuickTime Pro to save. yaay
vortex_hl
19th December 2006, 19:12
a single threaded app that's maxing out 1 core will appear with a ~%55 distribution on both cores in task manager.
"the Windows task scheduler is free to run a process on whatever CPU it has affinity settings for...meaning context switches back into the threads might occur on different cores each time, even though it uses only one at any given moment. This happens many times per second, thus giving the illusion that both cores are under use at the same time by the same program... "
no you don't understand. I'm not talking about task manager's cpu usage percentage. i look per core usage graphic. On AP video, i see %60-70 usage on both cores. but on Main and Simple profile video only one core up to %70 usage, other core only %10-15.
foxyshadis
20th December 2006, 05:49
The thread scheduler will usually set soft affinities on threads, running on their preferred cpu as much as possible to keep them closer to their cached data. In this case, it probably means one thread's doing most of the heavy lifting, and with MP/SP there might not be much for the auxillary thread to do, whereas AP asks a lot more from it. (Likely very simplified from the actual process.)
Rumbah
20th December 2006, 14:46
Herer are the pictures of decoding the Harry Potter 5 Trailer:
MPC with CoreAVC and CoreAAC:
http://img85.imageshack.us/img85/7800/coreavcqv1.png (http://imageshack.us)
VLC:
http://img85.imageshack.us/img85/4743/vlcfv1.png (http://imageshack.us)
@Sirber: You don't need Quicktime Pro to get the files.
I installed the Firefox add on MediaPlayerConnectivity. Then I chose to open mov files with VLC. Then I clicked on the button for the 1080 video and it opened in VLC. After that you can see the URL to the video file in VLC and download it with a download manager.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.