64 bit FFmpeg

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
exousir Offline
Junior Member
Posts: 15
Joined: Feb 2008
Reputation: 0
Post: #1
I've been following the FFmpeg mailing list and it looks like compiling a 64 bit version of FFmpeg with MMX enabled is possible under OS X.

I compiled FFmpeg against head and ran a benchmark of the 32 bit version against the 64 bit version with The Greatest Game AVC trailer as a benchmark.

(ffmpeg --benchmark -i TheGreatestGame_HD_AVC.mp4 -f null -an /dev/null)

I'm happy to report that under this particular case there was a speed increase of approximately ~%5. XBMC for OS X already requires OS X 10.5 and in Intel processor. Are there any barriers to making XBMC a full 64 bit application?

Here's some additional info to compile a 64 bit version of FFmpeg:

Patch 1 for x86_64 MANGLE on OS X

Patch 2 for enabling x86_64 arch (not accepted and will probably be done in a different way but this works for our purpose for now):

FFmpeg configure options:
./configure --extra-cflags=-m64 --extra-ldflags=-m64 --arch=x86_64

CABAC patch against FFMpeg head (there was a couple of minor symbol changes)
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Question   
Post: #2
exousir Wrote:CABAC patch against FFMpeg head (there was a couple of minor symbol changes)
Should this CABAC patch not first be submitted upstream to FFmpeg first?
http://ffmpeg.mplayerhq.hu/mailinglists.html
http://www.mplayerhq.hu/DOCS/tech/patches.txt

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.
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #3
it has already been rejected there so save yourself the sorrow (and flames)
find quote
exousir Offline
Junior Member
Posts: 15
Joined: Feb 2008
Reputation: 0
Post: #4
spiff Wrote:it has already been rejected there so save yourself the sorrow (and flames)

I've mentioned it here since XMBC for OS X is using it for current builds.

I should mention that the patch isn't my work, I just did a minor change to it so it could be used against head, should someone want to.
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #5
yah, i'm aware. just saving you the trouble of submitting it to ffmpeg
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Question  XBMC to come with both 32-bit and 64-bit versions of FFmpeg?
Post: #6
is it possible to build XBMC for 32-bit but have it use 64-bit DVDPlayer (which includes 64-bit FFmpeg)?

...I was thinking as the XBMC GUI will probably not benefit for being 64-bit it would be great if the 32-bit XBMC (GUI) would use use both 32-bit and 64-bit DVDPlayer, and come with both, and auto-detect which processor-type it runs on so it knows which DVDPlayer it should use (the 32-bit DVDPlayer or the 64-bit DVDPlayer). That way the same XBMC for Mac OS X would be compatible with both 32-bit and 64-bit processors, and be able to benefit when it is installed on a Mac with a 64-bit processor.

If possible then the same principle should be possible for XBMC for Linux and for Windows as well, right?

Confused
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #7
you cannot load 64 bits library and embed them into a 32 bit binary. simply not possible
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Question   
Post: #8
not even if all .so (Mac OS X and Linux 'DLL' files) under \XBMC\system\players\ are available in 64-bit?

Confused

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.
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #9
nope. as i said you CANNOT embed 64bit code into a 32 bit binary. as long as the main program is 32 bit all you can load is 32 bit libraries.
find quote
dizziness Offline
Junior Member
Posts: 2
Joined: Apr 2008
Reputation: 0
Post: #10
Thanks for the help with the 64-bit binary building.

How can I include liba52/xvid? If I can't compile them for 64-bit arch, can I still use them?
find quote
Halligalli Offline
Junior Member
Posts: 14
Joined: Apr 2008
Reputation: 0
Location: Sweden
Post: #11
Last time I checked, you can compile a program in Mac OS X for both 32 and 64-bit arch by using universal binaries. The same way it is possible to have one binary that works on PPC, PPC64, x86 and x86_64.
find quote
davilla Offline
Retired-Team-XBMC Developer
Posts: 11,478
Joined: Feb 2008
Reputation: 64
Post: #12
ffmpeg is not the problem with a 64-bit XBMC for Mac,

see http://trac.macports.org/wiki/SnowLeopardProblems

we rely heavily on MacPorts and it's very borked for 10.6.


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote