# vlc too slow



## sk8harddiefast (Jun 5, 2010)

Hi.I install vlc but when i play an hd video is playing really slow!
Any ideas?


----------



## Carpetsmoker (Jun 6, 2010)

Is your hardware fast enough? What is your hardware? What are you playing?

Please do try to give us more than the bare minimum of information.


----------



## sk8harddiefast (Jun 8, 2010)

Yeap. Intel 4 cores Q6600 2,4ghz , 2 giga DDR3 ram , ASUS 8800GTX graphics card and try to play up to 1600x1200 video resolution.
My hardware can play this. When i was using gentoo i could play same videos.


----------



## Carpetsmoker (Jun 8, 2010)

Ok, that fast enough for almost any file.

Are you playing a mkv, avi, ogg? Which codec? Does it work in mplayer? Which version of vlc (& dependencies) are you using? Did you try upgrading them (if not already the latest)? Which version of FreeBSD are you using? What exactly do you mean with "slow" (Does it shock sometimes? Or do you get 1fps? or something else?) Did you try one file or multiple? Do normal (non-HD) videos work? Which Xorg version are you suing? Which Xorg driver are you using?

To quote myself:



			
				Carpetsmoker said:
			
		

> Please do try to give us more than the bare minimum of information.



Linking to "the competition" which has a good post on this subject (Which also applies here):
What makes a perfect newbie?
Part B and C applies here in particular.


----------



## sk8harddiefast (Jun 8, 2010)

On mplayer i have also the same problem but works better. On mplayer play in slow motion (video & sound) and here play like a lot frames of video have been cut. Is a skate video so i am going to jump 10 stairs. For example the first frame i am taking speed and the next frame i am already on air!!! Like he eats frames. I use xorg-server-1.7.5,1 . Freebsd 8.0-RELEASE-p3. I try to play only one file (no a lot files together). My file extension is .MOV. I use vlc-1.0.6_3,3 (the latest on ports).
Avi & mov files with lower quality plays just fine without problems.
And this is Makefile with all my flags etc

```
# New ports collection makefile for:	vlc
# Date created:		3rd August 2001
# Whom:			Brian Somers <brian@FreeBSD.org>
#
# $FreeBSD: ports/multimedia/vlc/Makefile,v 1.224 2010/06/06 20:43:59 naddy Exp $
#   $MCom: ports-stable/multimedia/vlc/Makefile,v 1.6 2009/01/09 23:41:21 mezz Exp $
#      $Id: Makefile 6 2006-09-27 14:05:34Z buhnux $
# *** PLEASE READ Makefile.inc for more information on knobs ***
#

PORTNAME=	vlc
DISTVERSION=	1.0.6
PORTREVISION=	3
PORTEPOCH=	3
CATEGORIES=	multimedia audio ipv6 net www
MASTER_SITES=	http://download.videolan.org/pub/videolan/${PORTNAME}/${DISTVERSION}/ \
		http://ftp.snt.utwente.nl/pub/software/videolan/${PORTNAME}/${DISTVERSION}/ \
		ftp://ftp.crans.org/pub/videolan/${PORTNAME}/${DISTVERSION}/

MAINTAINER=	jsa@wickedmachine.net
COMMENT=	Multimedia streaming server and player for various audio/video formats

LIB_DEPENDS=	avcodec.1:${PORTSDIR}/multimedia/ffmpeg
RUN_DEPENDS=	${LOCALBASE}/lib/X11/fonts/bitstream-vera/Vera.ttf:${PORTSDIR}/x11-fonts/bitstream-vera

OPTIONS=	A52 "a52 audio support, many DVDs use this" On \
		AALIB "Aalib Console Graphics Support" Off \
		AVAHI "Avahi (Rendezvous/Bonjour (R) ) networking" On \
		CACA "Libcaca Console Graphics Support" Off \
		DBUS "Enable D-Bus control support" On \
		DEBUG "Enable debuging support" Off \
		DIRAC "Enable Dirac support" Off \
		DTS "DTS decoder support, many DVDs use this" On \
		FAAC "Faac audio encoder (mp4/aac) support" Off \
		FAAD "Faad audio decoder (mp4/aac) support" On \
		FLAC "Flac audio codec support" On \
		GNOMEVFS "Gnome VFS support" On \
		HTTPD "Streaming media control via http" On \
		LIVEMEDIA "Support for rstp/rtp/sdp protocols" On \
		LUA "Enable lua scripting" Off \
		MAD "Mad mp3 audio decoder support" On \
		MATROSKA "Matroska Container Format support" On \
		MPEG2 "Mpeg-2 audio/video decoder Support" On \
		NCURSES "Enable ncurses (console) interface" Off \
		OGG "Ogg audio decoder support" On \
		QT4 "QT4 Interface (requires X11)" On \
		REALAUDIO "Real audio(R) support" On \
		SAMBA "SAMBA Access module" On \
		SDL "SDL video output" On \
		SVG "SVG graphics support" Off \
		SVGALIB "SVGALIB video output" Off \
		SHOUT "Shout2 support" Off \
		SKINS "Enable winamp skins interface (requires QT4)" On \
		SPEEX "Speex voice codec support" On \
		THEORA "OGG/Vorbis video codec support" On \
		TWOLAME "Twolame mpeg2 audio encoder support" On \
		V4L "Enable Video for Linux & DVB support" On \
		VORBIS "Vorbis support" On \
		WIN32_CODECS "win32 multimedia DLL's" Off \
		X264 "Enable H.264/AVC codec support" On \
		X11 "Enable X11 (disable for stream only server)" On

USE_BZIP2=	yes
USE_GMAKE=	yes
USE_ICONV=	yes
USE_PERL5_BUILD=yes

FAKEDIR=	${WRKDIR}/fake/${PREFIX}
PLIST=		${WRKDIR}/plist

USE_LDCONFIG=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	CPPFLAGS="-I${FAKEDIR}/include -I${WRKSRC}/include ${CPPFLAGS} -I${LOCALBASE}/include -I${LOCALBASE}/ffmpeg ${PTHREAD_CFLAGS}" \
		LDFLAGS="${LDFLAGS} -L${FAKEDIR}/lib -L${LOCALBASE}/lib ${PTHREAD_LIBS} -lc" \
		LIBS="-lc"

CONFIGURE_ARGS+=	--enable-vlc \
			--enable-release \
			--enable-avcodec \
			--enable-avformat \
			--enable-postproc \
			--without-dv-raw1394 \
			--disable-alsa \
			--disable-dv \
			--disable-galaktos \
			--disable-glx

MAN1=		vlc.1 \
		vlc-config.1 \
		vlc-wrapper.1

.include <bsd.port.options.mk>

.if !defined(WITHOUT_X11)
WANT_GNOME=	yes
USE_GNOME=	gnomehack gnometarget libxml2
.endif
.if !defined(WITHOUT_SDL) && !defined(WITHOUT_X11)
WANT_SDL=	yes
.endif
.if !defined(WITHOUT_QT4) && !defined(WITHOUT_X11)
USE_QT_VER=	4
QT_COMPONENTS=	gui corelib moc_build rcc_build uic_build
.endif

.include <bsd.port.pre.mk>

.if (${OSVERSION} < 700042) && defined(WITH_QT4)
IGNORE=	does not build on FreeBSD 6.x with Qt4.x, set this OPTION to off or define\
	WITHOUT_QT4 to build CLI only version
.endif

.if (${OSVERSION} < 701000)
CFLAGS+=	-DHAVE_SYS_MOUNT_H
.endif

.if (${OSVERSION} < 700000)
EXTRA_PATCHES+=	${FILESDIR}/extra-patch-modules_access_v4l2.c
.endif

WITH_VLC_DEFAULT_FONT?=	${LOCALBASE}/lib/X11/fonts/bitstream-vera/Vera.ttf

.if ${PERL_LEVEL} < 500800
BROKEN=	Does not compile with perl ${PERL_VERSION}
.endif

.if !defined(WITHOUT_QT4) && !defined(WITHOUT_X11)
CONFIGURE_ARGS+=--enable-qt4
.else
CONFIGURE_ARGS+=--disable-qt4
.endif

.if defined(WITHOUT_DBUS)
CONFIGURE_ARGS+=--disable-dbus
.else
LIB_DEPENDS+=	dbus-1.3:${PORTSDIR}/devel/dbus
CONFIGURE_ARGS+=--enable-dbus
.endif

# compatible knobs.
.if defined(WITH_DEBUG)
DEBUG=	yes
.endif

.if defined(WITH_LIBMPEG2)
WITH_MPEG2=yes
.endif

.if defined(WITH_LIBCACA)
WITH_CACA=yes
.endif

.if defined(WITH_LIBA52)
WITH_A52=yes
.endif

.if defined(WITH_SMB)
WITH_SAMBA=yes
.endif

.if defined(WITH_LIBMATROSKA)
WITH_MATROSKA=yes
.endif

.if defined(WITH_LIBTREMOR)
WITH_TREMOR=yes
.endif
# end compatible knobs

.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+=--disable-nls
.else
USE_GETTEXT=	yes
.endif

.if defined(WITH_DVD_DEVICE)
DEFAULT_DVD_DEVICE=${WITH_DVD_DEVICE}
.else
DEFAULT_DVD_DEVICE=/dev/acd0
.endif

.if !defined(WITHOUT_GNOMEVFS) && !defined(WITHOUT_X11)
USE_GNOME+=	gnomevfs2
CONFIGURE_ARGS+=	--enable-gnomevfs
.else
CONFIGURE_ARGS+=	--disable-gnomevfs
.endif

.if defined(WITH_CDROM_DEVICE)
DEFAULT_CDROM_DEVICE=${WITH_CDROM_DEVICE}
.else
DEFAULT_CDROM_DEVICE=/dev/acd0
.endif

.if !defined(WITHOUT_LIBNOTIFY) && !defined(WITHOUT_X11)
LIB_DEPENDS+=	notify.1:${PORTSDIR}/devel/libnotify
CONFIGURE_ARGS+=--enable-notify
.else
CONFIGURE_ARGS+=--disable-notify
.endif

.if defined(WITH_SKINS) && !defined(WITHOUT_SKINS) && !defined(WITHOUT_QT4) && !defined(WITHOUT_X11)
LIB_DEPENDS+=	tar.0:${PORTSDIR}/devel/libtar
CONFIGURE_ARGS+=--enable-skins2 --enable-libtar
.else
CONFIGURE_ARGS+=--disable-skins2 --disable-libtar
.endif

.if ${ARCH}=="i386" && defined(WITH_WIN32_CODECS)
RUN_DEPENDS+=	${LOCALBASE}/lib/win32/wmv8ds32.ax:${PORTSDIR}/multimedia/win32-codecs
CONFIGURE_ARGS+=--enable-loader
.else
CONFIGURE_ARGS+=--disable-loader
.endif

.if defined(WITH_JACK) && !defined(WITHOUT_JACK)
LIB_DEPENDS+=	jack.0:${PORTSDIR}/audio/jack
CONFIGURE_ARGS+=--enable-jack
.else
CONFIGURE_ARGS+=--disable-jack
.endif

.if defined(WITH_REMOTE_OSD)
LIB_DEPENDS+=	gcrypt.16:${PORTSDIR}/security/libgcrypt
CONFIGURE_ARGS+=--enable-remoteosd
.else
CONFIGURE_ARGS+=--disable-remoteosd
.endif

.if defined(WITH_PULSEAUDIO) && !defined(WITHOUT_PULSEAUDIO)
LIB_DEPENDS+=	pulse.0:${PORTSDIR}/audio/pulseaudio
CONFIGURE_ARGS+=--enable-pulse
.else
CONFIGURE_ARGS+=--disable-pulse
.endif

.if defined(WITH_FLUIDSYNTH) && !defined(WITHOUT_FLUIDSYNTH)
LIB_DEPENDS+=	fluidsynth.4:${PORTSDIR}/audio/fluidsynth
CONFIGURE_ARGS+=--enable-fluidsynth
.else
CONFIGURE_ARGS+=--disable-fluidsynth
.endif

.if !defined(WITHOUT_ZVBI)
LIB_DEPENDS+=	zvbi.13:${PORTSDIR}/devel/libzvbi
CONFIGURE_ARGS+=--enable-zvbi
.else
CONFIGURE_ARGS+=--disable-zvbi
.endif

.if !defined(WITHOUT_HAL) && !defined(WITHOUT_X11)
LIB_DEPENDS+=	hal.1:${PORTSDIR}/sysutils/hal
CONFIGURE_ARGS+=--enable-hal
.else
CONFIGURE_ARGS+=--disable-hal
.endif

.if !defined(WITHOUT_AVAHI)
LIB_DEPENDS+=	avahi-common.3:${PORTSDIR}/net/avahi-app
CONFIGURE_ARGS+=	--enable-bonjour
.else
CONFIGUE_ARGS+=		--disable-bonjour
.endif

.if !defined(WITHOUT_CDROM)
LIB_DEPENDS+=	vcdinfo.2:${PORTSDIR}/multimedia/vcdimager \
		cdio.12:${PORTSDIR}/sysutils/libcdio
CONFIGURE_ARGS+=--enable-vcd \
		--enable-libcddb \
		--disable-cddax
.else
CONFIGURE_ARGS+=--disable-vcd \
		--disable-libcddb \
		--disable-libcdio \
		--disable-cddax
.endif

.if !defined(WITHOUT_CDPARANOIA) && !defined(WITHOUT_CDROM)
LIB_DEPENDS+=	cdda_interface.0:${PORTSDIR}/audio/cdparanoia
CONFIGURE_ARGS+=--enable-cdda \
		--enable-cddax
.else
CONFIGURE_ARGS+=--disable-cdda \
		--disable-cddax
.endif

.if !defined(WITHOUT_DVBPSI)
LIB_DEPENDS+=	dvbpsi.5:${PORTSDIR}/multimedia/libdvbpsi
CONFIGURE_ARGS+=--enable-dvbpsi \
		--with-dvbpsi=${LOCALBASE}
.else
CONFIGURE_ARGS+=--disable-dvbpsi
.endif

.if !defined(WITHOUT_DVDNAV)
LIB_DEPENDS+=	dvdnav.4:${PORTSDIR}/multimedia/libdvdnav
CONFIGURE_ARGS+=--enable-dvdnav
.else
CONFIGURE_ARGS+=--disable-dvdnav
.endif

.if defined(WITH_DVDREAD) && !defined(WITHOUT_DVDREAD)
LIB_DEPENDS+=	dvdread.4:${PORTSDIR}/multimedia/libdvdread
CONFIGURE_ARGS+=--enable-dvdread
.else
CONFIGURE_ARGS+=--disable-dvdread
.endif

.if defined(WITH_FAAC) && !defined(WITHOUT_FAAC)
CONFIGURE_ARGS+=--with-ffmpeg-faac
LIB_DEPENDS+=	faac.0:${PORTSDIR}/audio/faac
.endif

.if (defined(WITH_FAAD) || exists(${LOCALBASE}/lib/libfaad.a)) && !defined(WITHOUT_FAAD)
LIB_DEPENDS+=	faad.2:${PORTSDIR}/audio/faad
CONFIGURE_ARGS+=--enable-faad
.else
CONFIGURE_ARGS+=--disable-faad
.endif

.if (defined(WITH_FLAC) || exists(${LOCALBASE}/lib/libFLAC.a)) && !defined(WITHOUT_FLAC)
LIB_DEPENDS+=	FLAC.10:${PORTSDIR}/audio/flac
CONFIGURE_ARGS+=--enable-flac
.else
CONFIGURE_ARGS+=--disable-flac
.endif
```


----------



## sk8harddiefast (Jun 8, 2010)

```
.if (defined(WITH_FRIBIDI) || exists(${LOCALBASE}/bin/fribidi-config)) && !defined(WITHOUT_FRIBIDI)
LIB_DEPENDS+=	fribidi.3:${PORTSDIR}/converters/fribidi
CONFIGURE_ARGS+=--enable-fribidi
.else
CONFIGURE_ARGS+=--disable-fribidi
.endif

.if (defined(WITH_AALIB) || exists(${LOCALBASE}/lib/libaa.so.1)) && !defined(WITHOUT_AALIB)
LIB_DEPENDS+=	aa.1:${PORTSDIR}/graphics/aalib
CONFIGURE_ARGS+=--enable-aa
.else
CONFIGURE_ARGS+=--disable-aa
.endif

.if (defined(WITH_DIRAC) || exists(${LOCALBASE}/lib/libdirac_decoder.a)) && !defined(WITHOUT_DIRAC)
LIB_DEPENDS+=	dirac_decoder.1:${PORTSDIR}/multimedia/dirac
CONFIGURE_ARGS+=--enable-dirac
CPPFLAGS+=	-I${LOCALBASE}/include/dirac
.else
CONFIGURE_ARGS+=--disable-dirac
.endif

.if defined(WITH_SCHROEDINGER) && !defined(WITHOUT_SCHROEDINGER)
LIB_DEPENDS+=	schroedinger-1.0.3:${PORTSDIR}/multimedia/schroedinger
CONFIGURE_ARGS+=--enable-schroedinger
.else
CONFIGURE_ARGS+=--disable-schroedinger
.endif

.if !defined(WITHOUT_X264)
CONFIGURE_ARGS+=--enable-x264
LIB_DEPENDS+=	x264.85:${PORTSDIR}/multimedia/x264
.else
CONFIGURE_ARGS+=--disable-x264
.endif

.if (defined(WITH_LUA) || exists(${LOCALBASE}/lib/lua51/liblua.a)) && !defined(WITHOUT_LUA)
USE_LUA=5.1+
WANT_LUA_VER=5.1
CONFIGURE_ENV=	LUA_CFLAGS="-I${LUA_INCDIR}" LUA_LIBS="-L${LUA_LIBDIR} -llua"
CONFIGURE_ARGS+=--enable-lua
.else
CONFIGURE_ARGS+=--disable-lua
.endif

.if (defined(WITH_CACA) || exists(${LOCALBASE}/lib/libcaca.a)) && !defined(WITHOUT_CACA)
.if !defined(WITHOUT_AALIB)
WITH_AALIB=	yes
LIB_DEPENDS+=	caca.0:${PORTSDIR}/graphics/libcaca
CONFIGURE_ARGS+=--enable-caca
.endif
.else
CONFIGURE_ARGS+=--disable-caca
.endif

.if !defined(WITHOUT_DTS)
LIB_DEPENDS+=	dca.0:${PORTSDIR}/multimedia/libdca
CONFIGURE_ARGS+=--enable-dca
.else
CONFIGURE_ARGS+=--disable-dca
.endif

.if defined(WITHOUT_HTTPD)
CONFIGURE_ARGS+=--disable-httpd
.endif

.if (defined(WITH_GGI) || exists(${LOCALBASE}/lib/libggi.a)) && !defined(WITHOUT_GGI)
LIB_DEPENDS+=	ggi.2:${PORTSDIR}/graphics/libggi
CONFIGURE_ARGS+=--enable-ggi
.else
CONFIGURE_ARGS+=--disable-ggi
.endif

.if !defined(WITHOUT_MATROSKA)
LIB_DEPENDS+=	matroska.0:${PORTSDIR}/multimedia/libmatroska
CONFIGURE_ARGS+=--enable-mkv
.else
CONFIGURE_ARGS+=--disable-mkv
.endif

.if !defined(WITHOUT_A52)
LIB_DEPENDS+=	a52.0:${PORTSDIR}/audio/liba52
CONFIGURE_ARGS+=--enable-a52
.else
CONFIGURE_ARGS+=--disable-a52
.endif

.if defined(WITH_VLC_MOZILLA_PLUGIN) && !defined(WITHOUT_VLC_MOZILLA_PLUGIN)
USE_GECKO=	libxul seamonkey
USE_WEBPLUGINS=	gecko*
WEBPLUGINS_FILES=libvlcplugin.so
.include "${PORTSDIR}/www/firefox/Makefile.webplugins"
CONFIGURE_ENV+=	MOZILLA_CONFIG="${GECKO_CONFIG}" \
		XPIDL="${XPIDL}" \
		XPIDL_INCL="${XPIDL_INCL}"
CONFIGURE_ARGS+=--enable-mozilla
.endif

.if !defined(WITHOUT_MPEG2)
LIB_DEPENDS+=	mpeg2.0:${PORTSDIR}/multimedia/libmpeg2
CONFIGURE_ARGS+=--enable-libmpeg2
.else
CONFIGURE_ARGS+=--disable-libmpeg2
.endif

.if !defined(WITHOUT_REALAUDIO)
CONFIGURE_ARGS+=	--enable-real \
			--enable-realrtsp
.endif

.if (defined(WITH_SHOUT) || exists(${LOCALBASE}/lib/libshout.a)) && !defined(WITHOUT_SHOUT)
LIB_DEPENDS+=	shout.5:${PORTSDIR}/audio/libshout2
CONFIGURE_ARGS+=	--enable-shout
.endif

.if (defined(WITH_THEORA) || exists(${LOCALBASE}/lib/libtheora.a)) && !defined(WITHOUT_THEORA)
LIB_DEPENDS+=	theora.0:${PORTSDIR}/multimedia/libtheora
CONFIGURE_ARGS+=--enable-theora
.else
CONFIGURE_ARGS+=--disable-theora
.endif

.if (defined(WITH_LIVEMEDIA) || exists(${LOCALBASE}/live/liveMedia/libliveMedia.a)) && !defined(WITHOUT_LIVEMEDIA)
BUILD_DEPENDS+=	${LOCALBASE}/live/liveMedia/libliveMedia.a:${PORTSDIR}/net/liveMedia
CONFIGURE_ARGS+=--enable-live555 \
		--with-live555-tree=${LOCALBASE}/live
.else
CONFIGURE_ARGS+=--disable-live555
.endif

.if !defined(WITHOUT_TAGLIB)
LIB_DEPENDS+=	tag.1:${PORTSDIR}/audio/taglib
CONFIGURE_ARGS+=--enable-taglib
.else
CONFIGURE_ARGS+=--disable-taglib
.endif

.if !defined(WITHOUT_MAD)
LIB_DEPENDS+=	id3tag.0:${PORTSDIR}/audio/libid3tag \
		mad.2:${PORTSDIR}/audio/libmad
CONFIGURE_ARGS+=--enable-mad \
		--with-mad=${LOCALBASE}
.else
CONFIGURE_ARGS+=--disable-mad
.endif

.if !defined(WITHOUT_MODDEMUX)
LIB_DEPENDS+=	modplug.1:${PORTSDIR}/audio/libmodplug
CONFIGURE_ARGS+=--enable-mod
.else
CONFIGURE_ARGS+=--disable-mod
.endif

.if !defined(WITHOUT_MPCDEMUX)
LIB_DEPENDS+=	mpcdec.5:${PORTSDIR}/audio/libmpcdec
CONFIGURE_ARGS+=--enable-mpc
.else
CONFIGURE_ARGS+=--disable-mpc
.endif

.if !defined(WITHOUT_OGG)
LIB_DEPENDS+=	ogg.7:${PORTSDIR}/audio/libogg
CONFIGURE_ARGS+=--enable-ogg
.else
CONFIGURE_ARGS+=--disable-ogg
WITHOUT_VORBIS=	yes
.endif

.if defined(WITH_NCURSES) && !defined(WITHOUT_NCURSES)
CONFIGURE_ARGS+=--enable-ncurses
.endif

.if !defined(WITHOUT_SAMBA)
LIB_DEPENDS+=	smbclient.0:${PORTSDIR}/net/samba-libsmbclient
CONFIGURE_ARGS+=--enable-smb
.else
CONFIGURE_ARGS+=--disable-smb
.endif

.if !defined(WITHOUT_SDL) && !defined(WITHOUT_X11)
USE_SDL=	image
CONFIGURE_ARGS+=--enable-sdl
.else
CONFIGURE_ARGS+=--disable-sdl
.endif

.if defined(WITH_TRANSCODE) || exists(${LOCALBASE}/bin/transcode)
RUN_DEPENDS+=	transcode:${PORTSDIR}/multimedia/transcode
.endif

.if !defined(WITHOUT_HTTPD)
LIB_DEPENDS+=	gnutls.40:${PORTSDIR}/security/gnutls
CONFIGURE_ARGS+=--enable-gnutls
.else
CONFIGURE_ARGS+=--disable-gnutls
.endif

.if !defined(WITHOUT_SPEEX)
LIB_DEPENDS+=	speex.1:${PORTSDIR}/audio/speex
CONFIGURE_ARGS+=--enable-speex
CPPFLAGS+=-I${LOCALBASE}/include/speex
.else
CONFIGURE_ARGS+=--disable-speex
.endif

.if defined(WITHOUT_STREAM_PLUGINS)
CONFIGURE_ARGS+=--disable-sout
.endif

.if (defined(WITH_SVG) || defined(HAVE_GNOME) && ${HAVE_GNOME:Mlibrsvg2}!="") && !defined(WITHOUT_SVG) && !defined(WITHOUT_X11)
USE_GNOME+=	librsvg2
CONFIGURE_ARGS+=--enable-svg
.else
CONFIGURE_ARGS+=--disable-svg
.endif

.if (defined(WITH_SVGALIB) || exists(${LOCALBASE}/lib/lib/vga.a)) && !defined(WITHOUT_SVGALIB)
LIB_DEPENDS+=	vga.1:${PORTSDIR}/graphics/svgalib
CONFIGURE_ARGS+=--enable-svgalib
.else
CONFIGURE_ARGS+=--disable-svgalib
.endif

.if (defined(WITH_TREMOR) || exists(${LOCALBASE}/lib/libvorbisidec.a)) && !defined(WITHOUT_TREMOR)
LIB_DEPENDS+=	vorbisidec.1:${PORTSDIR}/audio/libtremor
.else
CONFIGURE_ARGS+=--disable-tremor
.endif

.if (defined(WITH_TWOLAME) || exists(${LOCALBASE}/lib/libtwolame.a)) && !defined(WITHOUT_TWOLAME)
LIB_DEPENDS+=		twolame.0:${PORTSDIR}/audio/twolame
CONFIGURE_ARGS+=	--enable-twolame
.else
CONFIGURE_ARGS+=	--disable-twolame
.endif

.if !defined(WITHOUT_VORBIS)
LIB_DEPENDS+=	vorbis.4:${PORTSDIR}/audio/libvorbis
CONFIGURE_ARGS+=--enable-vorbis
.else
CONFIGURE_ARGS+=--disable-vorbis
.endif

.if (defined(WITH_XOSD) || exists(${LOCALBASE}/lib/libxosd.a)) && !defined(WITHOUT_XOSD)
LIB_DEPENDS+=	xosd.4:${PORTSDIR}/misc/xosd
CONFIGURE_ARGS+=--enable-xosd
.else
CONFIGURE_ARGS+=--disable-xosd
.endif

.if defined(DEBUG)
CONFIGURE_ARGS+=--enable-debug
.else
CONFIGURE_ARGS+=--enable-release
.endif

.if defined(WITH_OCFLAGS)
CFLAGS+=	-O3 -ffast-math -fomit-frame-pointer
CONFIGURE_ARGS+=--enable-optimizations
.endif

# Video for Linux and DVB (Digital Video Broadcast) support
.if defined(WITHOUT_V4L)
CONFIGURE_ARGS+=--disable-v4l --disable-dvb
.else
BUILD_DEPENDS+=	v4l_compat>=1.0.20100321:${PORTSDIR}/multimedia/v4l_compat
CONFIGURE_ARGS+=--enable-v4l --enable-dvb
.endif

.if defined(WITHOUT_X11)
CONFIGURE_ARGS+=--disable-x11
.else
USE_XORG=	xpm
BUILD_DEPENDS+=	${LOCALBASE}/include/X11/xpm.h:${PORTSDIR}/x11/libXpm
CONFIGURE_ARGS+=--enable-x11
.endif

.include "${.CURDIR}/Makefile.inc"
.include <bsd.port.post.mk>
```


----------



## pprocacci (Jun 9, 2010)

For what it's worth, I have several .m2ts HD 1080p videos that stutter with vlc on windows/freebsd/linux/etc.  (Haven't tried mplayer)  What audio/video bitrates are your files encoded at?

Note: Streaming to a Cell Processor (PS3) works fine.
Edit: I too have a Q6600.


----------



## sk8harddiefast (Jun 9, 2010)

> What audio/video bitrates are your files encoded at


Where i find that to post it?


----------



## rusty (Jun 9, 2010)

Try /usr/ports/multimedia/mediainfo It prints detailed info.
You could also try 
[CMD=""]% ffmpeg -i <file>[/CMD]


----------



## pprocacci (Jun 16, 2010)

Op:

Just to provide a quick example, a movie I have encoded at 25861kb/s (BluRay quality) on a default Q6600 clock'd at 2.4Ghz (the default) stutters so bad, it's not watchable.

Having just overclocked my Q6600 to 3Ghz a moment ago, it still stutters, but not nearly as bad and is watchable.  My core temps are also +7 degrees celcius, but within operating range.

I've read the Q6600 can be clocked upwards to 3.2, but I'm not going to chance it just for the sake of testing.

During this brief test, 1 of the 4 cores was pinned at 99% usage.  Would certainly be nice if vlc threw the h264 decoding onto the gpu assuming you had the hardware, or used more than a single thread (don't know how possible that is).  ;P

Anyways, hope this helps.

Cheers!


----------



## jalla (Jun 16, 2010)

For Nvidia graphic cards, utilizing VDPAU is essential. Unfortunately none of the usual mediplayers in ports supports vdpau AFAIK (vlc, mplayer, ffmpeg, etc). It may be possible to check out a development version of your favourite app and compile it with vdpau.

I have mythtv compiled with vdpau and watch a lot of HD stuff, both live and recorded. Viewing 1080i material is flawless with a cpu usage of ~3% (yes, thats three!). Without vdpau HD is not watchable, and my mythtv-frontend use 100%+ cpu (Core2 Quad@2,33GHz)


----------



## sk8harddiefast (Jun 16, 2010)

What is vdpau? On mplayer i had the same problem with vdpau and the alternative they suggest me was vlc witch is not use vdpau. Something like that.
Vlc-devel merged with vlc and on mplayer now i have vdpau. I enable it but i have the same problem


----------



## expl (Jun 16, 2010)

http://en.wikipedia.org/wiki/VDPAU


----------



## FrogLS (Jun 16, 2010)

> sk8harddiefast...Intel 4 cores Q6600 2,4ghz , 2 giga DDR3 ram ,  ASUS *8800GTX graphics card* ...



According to this post the *8800GTX* is not supported by the vdpau.

(Post #10 , #11) : http://www.nvnews.net/vbulletin/showthread.php?t=123095


The choppy video could be a matter of the ffmpeg codec.
Try changing the ffmpeg preference of the vlc. Howto this way:

http://www.chipmunkninja.com/1080p-MKV-playback-on-Mac-1r@@

if that doesn't help post the output of


```
vlc -vvv <file.mov>
```


----------



## sk8harddiefast (Jun 17, 2010)

I make ffmpeg change on settings but didn't work.
vlc -vvv file: https://docs.google.com/Doc?docid=0AYeRGsPDtW4aZGhuMm1ia2tfNWQ5aDk2OGQ0&hl=en


----------



## nekoexmachina (Jun 17, 2010)

Just install mplayer-mt branch and be happy.


----------



## sk8harddiefast (Jun 17, 2010)

mplayer-mt branch?


----------



## nekoexmachina (Jun 17, 2010)

Ouch.
Sorry for no links.
mplayer-mt is mplayer with multicore support.
http://www.linux.com/news/software/developer/30373-multicore-video-decoding-with-mplayer-part-1
how-to goes for freebsd pretty same, with some simple changes: you need binutils from ports, and so you need to change your Makefile AS from what it has inside to /usr/local/bin/as; you need to use patches from /usr/ports/multimedia/mplayer/files.
there were some threads about it on the forum.


----------



## FrogLS (Jun 17, 2010)

sk8harddiefast said:
			
		

> ...
> vlc -vvv file: https://docs.google.com/Doc?docid=0AYeRGsPDtW4aZGhuMm1ia2tfNWQ5aDk2OGQ0&hl=en



Your link is not good. i am presented with a google docs login page.

As for the current vlc problem, things you can try

The easy way:

*( i assume you have installed the proprietary nvivia driver, haven't you? - 
/usr/ports/x11/nvidia-driver*, because you don't mention it in this thread)

- changing the video output device ( x11,  xv, vidix, gl, gl2,....)
- increasing the video buffer
- increasing image quality and/or OpenGL settings with /usr/ports/x11/nvidia-settings
- waiting a little bit. ffmpeg 0.6 has been released on June 15 2010 with faster H.264 decoder.
http://ffmpeg.org/
Actual vlc port builds with ffmpeg-0.5.2_2,1 Give the port maintainer time to update the vlc port
(but no guaranty your mov files will play smoothly than)


* WARNÄ°NG!! MAY DAMAGE YOUR VÄ°DEO CARD*

- overclocking the GPU with /usr/ports/sysutils/nvclock

http://www.linuxhardware.org/nvclock/

For mplayer :


> ...On mplayer play in slow motion (video & sound)...



- increasing the buffer
- changing the video output device ( x11,  xv...)

The hard way : 
- mplayer-mt, as mentioned by nekoexmachina
- a new video card, supported by vdpau (i am sure this is not what you want to hear,
but if this could be a option for you why not consider)

Note:
i read in the vlc forums, vlc multi processor support is not a goal in future releases.
The development team puts their efforts on GPU acceleration instead of CPU.


----------



## nekoexmachina (Jun 17, 2010)

> WARNÄ°NG!! MAY DAMAGE YOUR VÄ°DEO CARD
> 
> - overclocking the GPU with /usr/ports/sysutils/nvclock


What for? videocard does not take action in decoding video without vdpau, and even my low-end 8400gs was capable to play any highres file with x264-vdpau. And overclocking wont add needed features to use vdpau to the vcard chip.


----------



## sk8harddiefast (Jun 17, 2010)

I have installed the latest nvidia driver. Opengl support too.

```
sudo nvclock_gtk
Password:

(nvclock_gtk:84867): Gdk-WARNING **: shmget failed: error 12 (Cannot allocate memory)
Segmentation fault: 11 (core dumped)
```
Also i thin that is the dangerous solution.


----------



## FrogLS (Jun 17, 2010)

nekoexmachina said:
			
		

> What for? videocard does not take action in decoding video without vdpau, and even my low-end 8400gs was capable to play any highres file with x264-vdpau. And overclocking wont add needed features to use vdpau to the vcard chip.




You are absolutely right. indeed i was thinking improving the vdpau capability of the
GPU by overclocking and did not consider my earlier post, that the 8800 GTX is
not supported by this future and i was mislead by the impression overclocking would
improve the vdpau capability of the vcard chip.

My sincere apologies for the misinformation.

To the subject, i did some searching on this matter because i am also interested to a solution.
Having problems playing .mp4 files (choppy video) created with early versions of avidemux.
Early versions of vlc, i think < 1.05, work flawless whith that files.

The problem of sk8harddiefast (and mine) aren't the incabability of vlc (mplayer) to play HD files
(with the possible solutions using vdpau or mplayer-mt to play them smoothly ), since he mentioned with
his Gentoo box it was no problem to play the same files (as i was with vlc before), nor it is a
matter of hardware.

There are some theories to this problem out there. A possible cause could be the use of a
specific (earlier) version of libx264 the file was created with. Another is releated to the file container.
Ode, the very same files play with vlc and mplayer normal on a linux box. Why not on FreeBSD.

sk8harddiefast since my earlier suggestions didn't work, right now i see only :
compiling vlc with "debuging support enabled"

`cd /ports/multimedia/vlc && make config`
enable debuging and install it, run it, post the output.

other suggestions welcome.

(right now i am not able to do this myself being on vacation, having no access to my FBSD box)


----------



## sk8harddiefast (Jun 17, 2010)

I reinstall it with debug support but problem still exists
vlc IMAG0076.MOV 

```
VLC media player 1.0.6 Goldeneye
[0x81e128378] main interface error: option global-key-quit does not exist
[0x81e128378] main interface error: option global-key-play-pause does not exist
[0x81e128378] main interface error: option global-key-play does not exist
[0x81e128378] main interface error: option global-key-pause does not exist
[0x81e128378] main interface error: option global-key-stop does not exist
[0x81e128378] main interface error: option global-key-position does not exist
[0x81e128378] main interface error: option global-key-jump-extrashort does not exist
[0x81e128378] main interface error: option global-key-jump+extrashort does not exist
[0x81e128378] main interface error: option global-key-jump-short does not exist
[0x81e128378] main interface error: option global-key-jump+short does not exist
[0x81e128378] main interface error: option global-key-jump-medium does not exist
[0x81e128378] main interface error: option global-key-jump+medium does not exist
[0x81e128378] main interface error: option global-key-jump-long does not exist
[0x81e128378] main interface error: option global-key-jump+long does not exist
[0x81e128378] main interface error: option global-key-frame-next does not exist
[0x81e128378] main interface error: option global-key-prev does not exist
[0x81e128378] main interface error: option global-key-next does not exist
[0x81e128378] main interface error: option global-key-faster does not exist
[0x81e128378] main interface error: option global-key-slower does not exist
[0x81e128378] main interface error: option global-key-rate-normal does not exist
[0x81e128378] main interface error: option global-key-rate-faster-fine does not exist
[0x81e128378] main interface error: option global-key-rate-slower-fine does not exist
[0x81e128378] main interface error: option global-key-toggle-fullscreen does not exist
[0x81e128378] main interface error: option global-key-leave-fullscreen does not exist
[0x81e128378] main interface error: option global-key-vol-up does not exist
[0x81e128378] main interface error: option global-key-vol-down does not exist
[0x81e128378] main interface error: option global-key-vol-mute does not exist
[0x81e128378] main interface error: option global-key-subdelay-down does not exist
[0x81e128378] main interface error: option global-key-subdelay-up does not exist
[0x81e128378] main interface error: option global-key-audiodelay-down does not exist
[0x81e128378] main interface error: option global-key-audiodelay-up does not exist
[0x81e128378] main interface error: option global-key-audio-track does not exist
[0x81e128378] main interface error: option global-key-subtitle-track does not exist
[0x81e128378] main interface error: option global-key-aspect-ratio does not exist
[0x81e128378] main interface error: option global-key-crop does not exist
[0x81e128378] main interface error: option global-key-deinterlace does not exist
[0x81e128378] main interface error: option global-key-intf-show does not exist
[0x81e128378] main interface error: option global-key-intf-hide does not exist
[0x81e128378] main interface error: option global-key-snapshot does not exist
[0x81e128378] main interface error: option global-key-zoom does not exist
[0x81e128378] main interface error: option global-key-unzoom does not exist
[0x81e128378] main interface error: option global-key-crop-top does not exist
[0x81e128378] main interface error: option global-key-uncrop-top does not exist
[0x81e128378] main interface error: option global-key-crop-left does not exist
[0x81e128378] main interface error: option global-key-uncrop-left does not exist
[0x81e128378] main interface error: option global-key-crop-bottom does not exist
[0x81e128378] main interface error: option global-key-uncrop-bottom does not exist
[0x81e128378] main interface error: option global-key-crop-right does not exist
[0x81e128378] main interface error: option global-key-uncrop-right does not exist
[0x81e128378] main interface error: option global-key-nav-activate does not exist
[0x81e128378] main interface error: option global-key-nav-up does not exist
[0x81e128378] main interface error: option global-key-nav-down does not exist
[0x81e128378] main interface error: option global-key-nav-left does not exist
[0x81e128378] main interface error: option global-key-nav-right does not exist
[0x81e128378] main interface error: option global-key-disc-menu does not exist
[0x81e128378] main interface error: option global-key-title-prev does not exist
[0x81e128378] main interface error: option global-key-title-next does not exist
[0x81e128378] main interface error: option global-key-chapter-prev does not exist
[0x81e128378] main interface error: option global-key-chapter-next does not exist
[0x81e128378] main interface error: option global-key-zoom-quarter does not exist
[0x81e128378] main interface error: option global-key-zoom-half does not exist
[0x81e128378] main interface error: option global-key-zoom-original does not exist
[0x81e128378] main interface error: option global-key-zoom-double does not exist
[0x81e128378] main interface error: option global-key-set-bookmark1 does not exist
[0x81e128378] main interface error: option global-key-set-bookmark2 does not exist
[0x81e128378] main interface error: option global-key-set-bookmark3 does not exist
[0x81e128378] main interface error: option global-key-set-bookmark4 does not exist
[0x81e128378] main interface error: option global-key-set-bookmark5 does not exist
[0x81e128378] main interface error: option global-key-set-bookmark6 does not exist
[0x81e128378] main interface error: option global-key-set-bookmark7 does not exist
[0x81e128378] main interface error: option global-key-set-bookmark8 does not exist
[0x81e128378] main interface error: option global-key-set-bookmark9 does not exist
[0x81e128378] main interface error: option global-key-set-bookmark10 does not exist
[0x81e128378] main interface error: option global-key-play-bookmark1 does not exist
[0x81e128378] main interface error: option global-key-play-bookmark2 does not exist
[0x81e128378] main interface error: option global-key-play-bookmark3 does not exist
[0x81e128378] main interface error: option global-key-play-bookmark4 does not exist
[0x81e128378] main interface error: option global-key-play-bookmark5 does not exist
[0x81e128378] main interface error: option global-key-play-bookmark6 does not exist
[0x81e128378] main interface error: option global-key-play-bookmark7 does not exist
[0x81e128378] main interface error: option global-key-play-bookmark8 does not exist
[0x81e128378] main interface error: option global-key-play-bookmark9 does not exist
[0x81e128378] main interface error: option global-key-play-bookmark10 does not exist
[0x81e128378] main interface error: option global-key-history-back does not exist
[0x81e128378] main interface error: option global-key-history-forward does not exist
[0x81e128378] main interface error: option global-key-record does not exist
[0x81e128378] main interface error: option global-key-dump does not exist
[0x81e128378] main interface error: option global-key-random does not exist
[0x81e128378] main interface error: option global-key-loop does not exist
[0x81e128378] main interface error: option global-key-wallpaper does not exist
[0x81e128378] main interface error: option global-key-menu-on does not exist
[0x81e128378] main interface error: option global-key-menu-off does not exist
[0x81e128378] main interface error: option global-key-menu-right does not exist
[0x81e128378] main interface error: option global-key-menu-left does not exist
[0x81e128378] main interface error: option global-key-menu-up does not exist
[0x81e128378] main interface error: option global-key-menu-down does not exist
[0x81e128378] main interface error: option global-key-menu-select does not exist
[0x81e128378] main interface error: option global-key-audiodevice-cycle does not exist
[0x81e128378] main interface error: option global-key-toggle-autoscale does not exist
[0x81e128378] main interface error: option global-key-incr-scalefactor does not exist
[0x81e128378] main interface error: option global-key-decr-scalefactor does not exist
B picture before any references, skipping
decode_slice_header error
no frame!
B picture before any references, skipping
decode_slice_header error
no frame!
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
[0x8217d3078] xvideo video output error: cannot allocate shared image data (Cannot allocate memory)
QPainter::begin: Paint device returned engine == 0, type: 1
[0x80151b378] main libvlc error: could not create /home/deadreamer/.cache/vlc: Permission denied
```


----------



## FrogLS (Jun 17, 2010)

sk8harddiefast said:
			
		

> I reinstall it with debug support but problem still exists
> vlc IMAG0076.MOV



Enabling with debug support wasn't meant to solve the problem, but to have an output at the shell
with hopefully some error messages to work with.

This could be a hint:



> [0x8217d3078] xvideo video output error: cannot allocate shared image data (Cannot allocate memory)



When the same error happens to xine, multimedia/xine/pkg-message suggests increasing shared memory.

Do :


```
vi /etc/sysctl.conf
```

(or use your preferred editor instead of vi) and put inside:


```
kern.ipc.shmmax=67108864
kern.ipc.shmall=32768
```

Save the file and reboot your computer.

if this dos not help, would you kindly do an other play with the respective file?
This time with the verbose option:

`vlc -vvv IMAG0076.MOV`

i forgot to mention this in my previous post. My mistake. Sorry for that.


----------



## sk8harddiefast (Jun 18, 2010)

output of vlc -vvv file.mov
http://docs.google.com/Doc?docid=0AYeRGsPDtW4aZGhuMm1ia2tfNmZoY3Nrc2N2&hl=en


----------



## nekoexmachina (Jun 18, 2010)

*sk8harddiefast*
please use some paste-service like http://pastie.org 
cause for your link i've got 	



> We're sorry, but username does not have access to this document.
> 
> You are signed in as username, but that email account hasn't been granted permission to this document.
> 
> ...


----------



## sk8harddiefast (Jun 18, 2010)

I was not knowing that. Very helpful 
Thanks!
http://pastie.org/1009727


----------



## FrogLS (Jun 18, 2010)

Dude, your link is not helping. It redirects me to an login page
of that site. It seems you haven't made that file publicly viewable.

And does the fact, sending the output of vlc -vvv, mean, it didn't work
increasing shared memory? Please be more verbose.


----------



## FrogLS (Jun 18, 2010)

FrogLS said:
			
		

> Dude, your link is not helping. It redirects me to an login page
> of that site. It seems you haven't made that file publicly viewable.
> 
> And does the fact, sending the output of vlc -vvv, mean, it didn't work
> increasing shared memory? Please be more verbose.



This is what you get when using a lousy wifi connection: loosing the thread.

Since nekoexmachina pointed at the foulty link allready, ignore my last posting.


----------



## FrogLS (Jun 19, 2010)

Examining the debug output of vlc did not reveal any useful hints about the
cause of the malfunction. vlc is using the "avcodec" decoder library
(video and audio - part of ffmpeg) to decode your .mov file.


```
...
[0x821975078] avcodec decoder debug: libavcodec initialized (interface 0x341401)
[0x821975078] avcodec decoder debug: ffmpeg codec (H264 - MPEG-4 AVC (part 10))
started
...
```

vlc uses multimedia/ffmpeg to obtain libavcodec and mplayer has ffmpeg mpeg4 codec
natively build in. ( http://www.mplayerhq.hu/DOCS/codecs-status.html )
Both have problems playing your mov file and certain mp4 videos of mine. That suggests
some process interferes or is missing by the decoding in FreeBSD 8.0 Release. As i
experienced in earlier versions of vlc (remembering that where on the 7.x Releases branch)
the play with my mp4 files in question was normal as it is on linux platforms now.

The next step i can think of is repeating the debug procedure with mplayer.
We should get some additional debug infos there.

If you are willing please do:


```
cd /usr/ports/multimedia/mplayer
make config
DEBUG=on
```

I am not sure how the option for maximum verbosity is to be set (-v -vv ?).
Take a look at "mplayer -help" and choose the one for maximum output,
if present.

And could you please send your dmesg to? I would like to take a look of the cpu
capabilities ( MMX, MMXEXT, ...) seen by the kernel. If the GENERIC kernel has not turned on
certain multimedia capabilities of the CPU, that could also be a place to search.


----------



## nekoexmachina (Jun 19, 2010)

> Both have problems playing your mov file and certain mp4 videos of mine


if i understand the problem right, i have had pretty same problem with .mp4-movies about a half-a-year ago. That was like if the movie is in mp4 container, it plays like crap with any resolution and bitrate.
The thing that helped me was just packing mp4-file into mkv-container with some tool from mkvtoolnix package.


----------



## sk8harddiefast (Jun 19, 2010)

My dmesg: http://pastie.org/1011747
My mplayer fails to be build with debug on :q


----------



## FrogLS (Jun 20, 2010)

nekoexmachina said:
			
		

> ...i have had pretty same problem with .mp4-movies about a half-a-year ago. That was like if the movie is in mp4 container, it plays like crap with any resolution and bitrate.The thing that helped me was just packing mp4-file into mkv-container with some tool from mkvtoolnix package.



In case we can't reach to a solution to this problem, i was planing to recommend
'gpac-mp4box' to repack the .MOV file as an workaround. Earlier in this thread i 
mentioned about reports that the problem might be due to the container.

But the problem remains why the .MOV file of *sk8harddiefast* and some of my .mp4's
are not playing on 8.0 Release but on linux platforms and in my case on the
7.x Release branch.

*sk8harddiefast* if you want to go the workaround way you can try the programs mentioned
or any other container creating program you know of.

/usr/ports/multimedia/mkvtoolnix http://www.bunkus.org/videotools/mkvtoolnix/


/usr/ports/multimedia/gpac-mp4box
http://gpac.sourceforge.net/packager.php http://gpac.sourceforge.net/doc_mp4box.php


The first program can put files in .mkv container only. mp4box supports many other
formats. That does not mean one program is better than the other. Just use the one
you see fit for your needs.


You can also go beside the 'workaround way' the 'seeking a solution to the problem' way too.

If you do so, then:



			
				sk8harddiefast said:
			
		

> My mplayer fails to be build with debug on



In this case play the mov file with the installed package.
`$ mplayer -v IMAG0076.MOV`

and post the output.

*Note*
I should have read this earlier to comply to the readability of the posts.
http://forums.freebsd.org/showthread.php?t=8816
Sorry DutchDaemon for not doing so.


----------

