XBMC and ffmpeg-mt ?
#1
I can play 720p movie fine, but not 1080p.
After a few tests, I've seen that xbmc is only using one core.
I can't use VDPAU because my gfx card doesnt allow it.

Has anyone managed to make xbmc work with ffmpeg-mt ? When playing 1080p movie, one cpu is at 80%, the other at 10%...
Reply
#2
Hi,

This question was discussed long time ago. XBMC stays with mainline ffmpeg, therefore not having multithreaded h264 decoding until it is stable and living in the ffmpeg main trunk. The problem with ffmpeg-mt so far is that it is making a lot of overhead in decoding with a much worse efficiency. You could try it if you make a compile of the ffmpeg-mt branch and than compile xbmc with the --enable-external-ffmpeg option. This way xbmc will use the external (ffmpeg-mt) libs.

Multithreaded decoding will be less and less important as current modern processors are going to a level where they can handle decoding of bluray material with ONE core. Like the new Intel Sandy Bridge Core i5 2500K.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
Thanks for the answer.

I have done what you've said:
- build & install ffmpeg-mt -
git clone git://git.gitorious.org/ffmpeg/ffmpeg-mt
cd ffmpeg-mt
git clone git://git.mplayerhq.hu/libswscale
./configure --enable-shared
make
sudo make install

- build & install xbmc -
svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/ xbmc
cd xbmc
./bootstrap
./configure
./configure --enable-external-ffmpeg
make
sudo make install

Then I checked, and it's still using one cpu.
How can I check if I have the right ffmpeg (ffmpeg-mt) installed ?
How can I check if xbmc is using ffmpeg-mt ?

Thank you.
Reply
#4
Most of the things you did right.

There are a few things which could prevent this working:
- Uninstall ALL previous APT installed xbmc versions and ffmpeg
- Also uninstall the ones you compiled (if you can)
- Set prefix=/usr for ALL things. The default is /usr/local, therefore you can have two versions installed.
- I suggest compiling xbmc from GIT. As that is more up to date.
- I suggest compiling with libbluray support. Like the following:

Code:
cd ~
git clone git://git.videolan.org/libbluray.git
cd libbluray/
./bootstrap
./configure --prefix=/usr
make
sudo make install

cd ~
git clone git://github.com/xbmc/xbmc.git
cd xbmc
./bootstrap
./configure --prefix=/usr --enable-external-ffmpeg --enable-libbluray
make
sudo make install

You can also run xbmc from its own compile directory with the ./xbmc.bin command. This makes sure you run the freshly compiled version.

To check if you are using the external libs, i think is the best way to check the xbmc log, under ~/.xbmc/temp/.xbmc.log.

Let me know your results :-)
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
Thank you for your answer, all I see about library in the debug is:
18:35:02 T:3079395200 M:803557376 DEBUG: DllAvUtilBase: Using libavutil system library
18:35:02 T:3079395200 M:803557376 DEBUG: DllAvCodec: Using libavcodec system library
18:35:02 T:3079395200 M:803557376 DEBUG: DllAvFormat: Using libavformat system library



I'll try fully uninstalling xbmc & ffmpeg, and I'll do everything again with the git version, today if I have some time!
Reply
#6
Ok, I've re-compiled xbmc & ffmpeg-mt after fully uninstalling them.

Now, I have an error when trying to launch xbmc:
/usr/lib/xbmc/xbmc.bin: relocation error: /usr/local/lib/libavcore.so.0: symbol av_get_random_seed, version LIBAVUTIL_50 not defined in file libavutil.so.50 with link time reference


Still looking for a solution on google. If you have any idea!

Ty
Reply
#7
Okay, this is odd. XBMC did indeed use ffmpeg-mt at one time. Before VDPAU was available and coded too this was exactly how many of us, including myself, got 1080P video working and able to play the Killa bird scene without dropping frames. We used to have all sorts of debates about balancing among cores and whatnot, the patch to do multi-core debugging wasn't mainline when it was adopted by XBMC either. I'm surprised that without VDPAU multi-thread isn't being used - it was certainly used in the past Sad
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#8
BLKMGK Wrote:Okay, this is odd. XBMC did indeed use ffmpeg-mt at one time. Before VDPAU was available and coded too this was exactly how many of us, including myself, got 1080P video working and able to play the Killa bird scene without dropping frames. We used to have all sorts of debates about balancing among cores and whatnot, the patch to do multi-core debugging wasn't mainline when it was adopted by XBMC either. I'm surprised that without VDPAU multi-thread isn't being used - it was certainly used in the past Sad

it got removed since the patchset for mt was getting out of sync with ffmpeg mainline and it was more important (especially when vdpau and such got big) to remain in sync with mainline.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#9
The patch has now been merged in to ffmpeg trunk:

http://ffmpeg.org/pipermail/ffmpeg-devel...09906.html

Will XBMC make use of it?
Reply
#10
Well, when the time comes for merging in a newer ffmpeg release we won't undo those commits on purpose Wink
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC and ffmpeg-mt ?0