Oneiric has the new libavcodec version with the multi-threaded H264 decoder so it would be nice to have an easy benchmark that people can run on their systems.
Although when possible Novacut will edit via proxy files, we still want to be able to immediately edit MOV files as they're imported (without first waiting for a proxy to be transcoded). And utilizing the ffdec_h264 "max-threads" property could be a key way to improve this user experience.
First, there are a few packages you might need to install:
sudo apt-get install python3 gstreamer0.10-tools gstreamer0.10-ffmpeg
You can see all the properties available for ffdec_h264 like this:
gst-inspect-0.10 ffdec_h264
The "loweres" property looks intriguing for real-time playback, but it doesn't seem to work. But you'll definitely want to benchmark across different values of the "max-threads" property.
Please add a script in misc/ like misc/benchmark-h264-dec.py. You'll time how long the decoding takes for each value of "max-threads", and then print a nicely formatted summary at the end. Would be great to include some system information, especially whether it's 64-bit or 32-bit, and what the CPU is. As far as timing things, use time.time() to get the start time, and time.time() again to get the finish time (end - start is the elapsed).
Here's a stub of what you need to do:
#!/usr/bin/python3
import sys
from multiprocessing import cpu_count
from subprocess import check_call
mov = sys.argv[1]
for threads in range(1, cpu_count() + 1):
cmd=[
'/usr/bin/gst-launch-0.10',
'filesrc', 'location={}'.format(mov),
'!', 'qtdemux',
'!', 'queue',
'!', 'ffdec_h264', 'max-threads={}'.format(threads),
'!', 'fakesink',
]
check_call(cmd)
As far as some test videos from Canon HDSLR cameras, see the HACKING.txt file, or just download this:
wget http://uds-o.novacut.com/NPY3IW5SQJUNSP2KV47GVB24G7SWX6XF.mov
To get more ideas, checkout the hashbench3.py script in dmedia:
http://bazaar.launchpad.net/~dmedia/dmedia/trunk/view/head:/misc/hashbench3.py
Ping jderose in #novacut (freenode) if you have any questions!
Also note that to work on this bug, you really need a computer with at least 2 cpu cores, otherwise you'll only be benchmarking for max-threads=1.