Help me make change in VDPAU.cpp for mpeg4
#1
Hello developers

Let me first say a big thanks to all of you for giving us such a great piece of software.

I need your help in changing VDPAU.cpp file but I don't have enough knowledge of XBMC & programming to do that. What I want to do is to stop XBMC using dcff-mpeg4_vdpau for XVID files as I get a green screen with my nVidia G210. Instead I want to force XBMC to use plain dcff-mpeg4 (leaving the render option on auto detect or vdpau). This of course will be for my own usage. I am on Arch Linux using latest SVNs. Of course I might be wrong and the change I need to make is not in VDPAU.cpp file. I tried a couple of tricks but compilation always fails. Any help will be really appreciated.
Reply
#2
solution is simply to configure ffmpeg with --disable-decoder=mpeg4_vdpau (or thereabout, can't recall what the decoder is named exactly).
Reply
#3
I had a look in the configure file of ffmpeg and found the following

mpeg4_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h vdpau_mpeg4_support"
mpeg4_vdpau_decoder_select="vdpau mpeg4_decoder"

so I guess i have to just add --disable-decoder=mpeg4_vdpau into the ./configure line of the build_xbmc.sh file inside the below directory, correct ?

/home/builds/xbmc-svn/src/XBMC/xbmc/cores/dvdplayer/Codecs/ffmpeg
Reply
#4
See /configure.in ~line 1193

TheUni
Reply
#5
line 1193 has external libraries! how is this related ? you lost me now!Smile

# external libraries
Reply
#6
I'm looking at trunk, don't know where you are. Anyway, grep for:
XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/ffmpeg

At HEAD it's line 1142.

TheUni
Reply
#7
Ok i managed to find it after many hours! Need to edit the configure.in file, then go to ffmpeg configuration section and add the line below as spiff suggested.

--disable-decoder=mpeg4_vdpau

Now all the XVIDs are decoded without VDPAU and I do not get a green screen!

Many thanks spiff for providing fix for this. And as you are a developer do you know whether it will be fixed ? Why did development team add this ? Is there any point in having VDPAU for XVIDs after all ?

I also opened a ticket for this some time ago (still open).
http://trac.xbmc.org/ticket/8337

@theuni

i am using SVN and thanks for looking into this.
Reply
#8
where exactly is that configure.in file? I just checked out the svn source, but can't find it..
1: Nvidia Shield TV (2017) 16GB - 2: Beelink MinixMXIII II - 3: Beelink MinixMXIII II - 4: Beelink MinixMXIII II
NAS: unRAID 6.3 Pro • Case (NZXT H440) • MB (MBD-X7SBE with SIM1U+) • CPU (Xeon X3360) • RAM (4x2GB DDR2) • SATA (6 On MB, 8 AOC-SAT2-MV8) • PSU (EVGA SUPERNOVA 650 G2) • HDD (2 x Toshiba 3TB parity, 6 x WD Red 3TB xfs, 1 x 512GB SSD cache)  • UPS (APC BR1000G)
Reply
#9
ok, found the configure.in file, modified it and compiled xbmc.
But I still get green garbage on screen when enabling vdpau

I'm using a GT220 card.

Here is the configure generated config.mak for ffmpeg: http://pastebin.org/87205
1: Nvidia Shield TV (2017) 16GB - 2: Beelink MinixMXIII II - 3: Beelink MinixMXIII II - 4: Beelink MinixMXIII II
NAS: unRAID 6.3 Pro • Case (NZXT H440) • MB (MBD-X7SBE with SIM1U+) • CPU (Xeon X3360) • RAM (4x2GB DDR2) • SATA (6 On MB, 8 AOC-SAT2-MV8) • PSU (EVGA SUPERNOVA 650 G2) • HDD (2 x Toshiba 3TB parity, 6 x WD Red 3TB xfs, 1 x 512GB SSD cache)  • UPS (APC BR1000G)
Reply
#10
Never mind, got it to work..
1: Nvidia Shield TV (2017) 16GB - 2: Beelink MinixMXIII II - 3: Beelink MinixMXIII II - 4: Beelink MinixMXIII II
NAS: unRAID 6.3 Pro • Case (NZXT H440) • MB (MBD-X7SBE with SIM1U+) • CPU (Xeon X3360) • RAM (4x2GB DDR2) • SATA (6 On MB, 8 AOC-SAT2-MV8) • PSU (EVGA SUPERNOVA 650 G2) • HDD (2 x Toshiba 3TB parity, 6 x WD Red 3TB xfs, 1 x 512GB SSD cache)  • UPS (APC BR1000G)
Reply
#11
what was wrong? i inserted line 1180 in /configure.in, yet xbmc still compiled ffmpeg with the decoder.

edit: i'm editing this in my gentoo distfiles: /usr/portage/distfiles/svn-src/xbmc/trunk. perhaps i need to make clean or something before next emerge?
Code:
1164 XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/ffmpeg], [
1165   if test "$host_vendor" = "apple" ; then
1166     ./configure \
1167       --extra-cflags="-w -D_DARWIN_C_SOURCE -Dattribute_deprecated= -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
1168       --disable-amd3dnow \
1169       --disable-static \
1170       `if test "$use_debug" = "no"; then echo --disable-debug; fi` \
1171       --disable-muxers \
1172       --disable-encoders \
1173       --disable-devices \
1174       --disable-ffplay \
1175       --disable-ffserver \
1176       --disable-ffmpeg \
1177       --enable-shared \
1178       --disable-ipv6 \
1179       --disable-decoder=mpeg_xvmc \
1180       --disable-decoder=mpeg4_vdpau \
1181       --enable-postproc \
1182       --enable-gpl \
1183       --enable-protocol=http \
1184       --enable-pthreads \
1185       --enable-runtime-cpudetect \
1186       --cc="$CC" &&
1187     sed -i "" -e "s#define HAVE_POSIX_MEMALIGN 1#define HAVE_POSIX_MEMALIGN 0#" config.h &&
1188     sed -i "" -e "s#YASM=yasm#YASM=/opt/local/bin/yasm#" config.mak &&
1189     sed -i "" -e "s# -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 # #" config.mak &&
1190     sed -i "" -e "s#libswscale_VERSION_MAJOR=0#libswscale_VERSION_MAJOR=0.7.1#" config.mak &&
1191     sed -i "" -e "s#libavfilter_VERSION_MAJOR=0#libavfilter_VERSION_MAJOR=0.4.0#" config.mak
xbmc-pvr-ppa-odk68, Gentoo x86 3.0.7-pf, xorg-server-1.11.2, mesa-7.11, nvidia-drivers-290.10
Reply
#12
The configure.in is an input file for autoconf which is used by XBMC during compilation to configure all its elements/modules (This is my guess as I am not developer!). I found this after trying to add spiff's suggestion about disabling mpeg4_vdpau.There might be other way of achieving this but it is the only one I found.

So i put the disable decoder like below

XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/ffmpeg], [
(lines omitted)
`if test "$use_vdpau" = "yes"; then echo --enable-vdpau; else echo --disable-vdpau; fi` \
--disable-decoder=mpeg4_vdpau \

make sure you put it under the else section and not in apple section (if test "$host_vendor" = "apple" ; then)
Reply
#13
what a dumbass oversight from my part, sorry for wasting your time making you point out the obvious.
xbmc-pvr-ppa-odk68, Gentoo x86 3.0.7-pf, xorg-server-1.11.2, mesa-7.11, nvidia-drivers-290.10
Reply
#14
Would this be the cause of the green hue I've seen in recent builds?
I kept a backup of my old build per usual so I was able to roll back, but even after applying this fix it's still and issue. :/
Reply
#15
Hi I am interested as well, seems like some of my mpeg4 stuff just comes out as garbage, have to keep flipping back aforth between vdpau and software Smile

I am using the debian build from debina-multimedia
Reply

Logout Mark Read Team Forum Stats Members Help
Help me make change in VDPAU.cpp for mpeg40