public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Slow not in sync movie playing with mplayer2, ffmpeg, x264 with intel core i5
@ 2012-02-12  8:51 Kfir Lavi
  2012-02-12 10:42 ` pk
  2012-02-12 18:59 ` James Broadhead
  0 siblings, 2 replies; 7+ messages in thread
From: Kfir Lavi @ 2012-02-12  8:51 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2924 bytes --]

Hi,
I'm trying to play a mkv movie that is encoded with x264 720p.
The movie get out of sync very quickly.
I tried some suggestions in the gentoo forum, but they didn't help.
It seems unreasonable to me that my cpu Intel(R) Core(TM) i5 CPU
M 560  @ 2.67GHz
can't play this files.
When playing the movie, I can see clearly that both cores are in ~90% cpu.

I tried to compile with -O2, -O3, with use flags 'mmx sse sse2 ssse3
dri dri2 3dnow 3dnowext mmxext' and without.
Playing stay the same.
I'm using the command:
mplayer2 -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all file.mkv

After each change I'm running: emerge ffmpeg mplayer2
What are your suggestions?

media-video/ffmpeg-0.10
media-video/mplayer2-2.0_p20111126

lspci:
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation Core Processor
Integrated Graphics Controller (rev 02)
00:16.0 Communication controller: Intel Corporation 5 Series/3400
Series Chipset HECI Controller (rev 06)
00:16.3 Serial controller: Intel Corporation 5 Series/3400 Series
Chipset KT Controller (rev 06)
00:19.0 Ethernet controller: Intel Corporation 82577LM Gigabit Network
Connection (rev 06)
00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset
USB2 Enhanced Host Controller (rev 06)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset
High Definition Audio (rev 06)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI
Express Root Port 1 (rev 06)
00:1c.4 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI
Express Root Port 5 (rev 06)
00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset
USB2 Enhanced Host Controller (rev 06)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC
Interface Controller (rev 06)
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series
Chipset 6 port SATA AHCI Controller (rev 06)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus
Controller (rev 06)
00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400
Series Chipset Thermal Subsystem (rev 06)
02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35)
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath
Architecture Generic Non-core Registers (rev 02)
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath
Architecture System Address Decoder (rev 02)
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)

Attached is the emerge info.

Regards,
Kfir

[-- Attachment #2: emerge-info --]
[-- Type: application/octet-stream, Size: 5039 bytes --]

Portage 2.1.10.45 (hardened/linux/x86, gcc-4.5.3-hardenednopie, glibc-2.14.1-r2, 3.2.0-gentoo-r1 i686)
=================================================================
System uname: Linux-3.2.0-gentoo-r1-i686-Intel-R-_Core-TM-_i5_CPU_M_560_@_2.67GHz-with-gentoo-2.1
Timestamp of tree: Sat, 11 Feb 2012 19:45:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.7-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo gentoo-haskell sunrise
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=core2 -mcx16 -msahf -maes -mpclmul -mpopcnt -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2 -fno-strict-overflow -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O3 -march=core2 -mcx16 -msahf -maes -mpclmul -mpopcnt -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=core2 -fno-strict-overflow -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.isoc.org.il/pub/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US he"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/haskell /var/lib/layman/sunrise"
SYNC="rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage/"
USE="X aac acl acpi alsa bash-completion berkdb bidi branding bzip2 cairo cli cracklib crypt cscope cups curl cxx djvu dri extras fbsplash flac fts3 gdbm gif gnutls gpm gudev hal hardened hdaps iconv id3tag jpeg laptop lcms libnotify mikmod mng modules mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pax_kernel pcre pic png pppd raw readline ruby samba scanner sdl session smapi sqlite sqlite3 ssl svg sysfs tcpd theora thinkpad threads tiff truetype unicode urandom vaapi vim-syntax vorbis win32codecs x264 x86 xml xorg xosd xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US he" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="hp hpsj5s hp5590" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Slow not in sync movie playing with mplayer2, ffmpeg, x264 with intel core i5
  2012-02-12  8:51 [gentoo-user] Slow not in sync movie playing with mplayer2, ffmpeg, x264 with intel core i5 Kfir Lavi
@ 2012-02-12 10:42 ` pk
  2012-02-12 16:57   ` Kfir Lavi
  2012-02-12 18:59 ` James Broadhead
  1 sibling, 1 reply; 7+ messages in thread
From: pk @ 2012-02-12 10:42 UTC (permalink / raw
  To: gentoo-user

On 2012-02-12 09:51, Kfir Lavi wrote:

> I'm trying to play a mkv movie that is encoded with x264 720p.
> The movie get out of sync very quickly.

Is it just this particular video that gets out of sync or does other
videos have the same symptoms? If it's only this video, then I would say
it's the video file itself that is out of sync...

Best regards

Peter K



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Slow not in sync movie playing with mplayer2, ffmpeg, x264 with intel core i5
  2012-02-12 10:42 ` pk
@ 2012-02-12 16:57   ` Kfir Lavi
  2012-02-13  5:34     ` Walter Dnes
  0 siblings, 1 reply; 7+ messages in thread
From: Kfir Lavi @ 2012-02-12 16:57 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

On Sun, Feb 12, 2012 at 12:42 PM, pk <peterk2@coolmail.se> wrote:

> On 2012-02-12 09:51, Kfir Lavi wrote:
>
> > I'm trying to play a mkv movie that is encoded with x264 720p.
> > The movie get out of sync very quickly.
>
> Is it just this particular video that gets out of sync or does other
> videos have the same symptoms? If it's only this video, then I would say
> it's the video file itself that is out of sync...
>
> No, it is all the videos that are 720p x264.


> Best regards
>
> Peter K
>
>

[-- Attachment #2: Type: text/html, Size: 992 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Slow not in sync movie playing with mplayer2, ffmpeg, x264 with intel core i5
  2012-02-12  8:51 [gentoo-user] Slow not in sync movie playing with mplayer2, ffmpeg, x264 with intel core i5 Kfir Lavi
  2012-02-12 10:42 ` pk
@ 2012-02-12 18:59 ` James Broadhead
  1 sibling, 0 replies; 7+ messages in thread
From: James Broadhead @ 2012-02-12 18:59 UTC (permalink / raw
  To: gentoo-user

On 12 February 2012 08:51, Kfir Lavi <lavi.kfir@gmail.com> wrote:
> Hi,
> I'm trying to play a mkv movie that is encoded with x264 720p.
> The movie get out of sync very quickly.
> I tried some suggestions in the gentoo forum, but they didn't help.
> It seems unreasonable to me that my cpu Intel(R) Core(TM) i5 CPU
> M 560  @ 2.67GHz
> can't play this files.
> When playing the movie, I can see clearly that both cores are in ~90% cpu.
>
> I tried to compile with -O2, -O3, with use flags 'mmx sse sse2 ssse3
> dri dri2 3dnow 3dnowext mmxext' and without.
> Playing stay the same.
> I'm using the command:
> mplayer2 -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all file.mkv
>

threads=2 is a nice option to try in most circumstances. :)

You should also make sure that XVideo is set up correctly (if that's
what you're using).
`xvinfo` will inform you of that.
Try some other -vo options.

You should also try media-video/mplayer (which is a separate project)

The console output from mplayer2 itself would also help.

Finally, your lspci output would be more useful if you ran
`update-pciids` beforehand.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Slow not in sync movie playing with mplayer2, ffmpeg, x264 with intel core i5
  2012-02-12 16:57   ` Kfir Lavi
@ 2012-02-13  5:34     ` Walter Dnes
  2012-02-19  8:59       ` Kfir Lavi
  0 siblings, 1 reply; 7+ messages in thread
From: Walter Dnes @ 2012-02-13  5:34 UTC (permalink / raw
  To: gentoo-user

On Sun, Feb 12, 2012 at 06:57:08PM +0200, Kfir Lavi wrote

> No, it is all the videos that are 720p x264.

  Is this a recently installed Gentoo?  I had a similar problem trying
to play 1080i TV and also with NHL Gamecenter Live.  A fresh install
will have almost all binaries using generic lowest-common-denominator
32 or 64 bit code, so that it will work on every machine with the target
CPU.  Once I did "emerge system" + "emerge world" + rebuilt kernel and
rebooted, it ran fine (for a 4+ year old Dell).  Now it can handle at
least the minimum speed for NHL Gamecenter Live, and play 1080i from the TV
tuner.  For CPU flags I use...
CFLAGS="-O2 -march=native -mfpmath=sse -fomit-frame-pointer -pipe"
CXXFLAGS="${CFLAGS}"

  If that isn't your problem, can we see output from the 2 commands...

cat /proc/cpuinfo (1 core is enough, thanks)

head /proc/meminfo (does Memtotal: match what your BIOS shows on bootup?)

-- 
Walter Dnes <waltdnes@waltdnes.org>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Slow not in sync movie playing with mplayer2, ffmpeg, x264 with intel core i5
  2012-02-13  5:34     ` Walter Dnes
@ 2012-02-19  8:59       ` Kfir Lavi
  2012-02-21  3:09         ` Walter Dnes
  0 siblings, 1 reply; 7+ messages in thread
From: Kfir Lavi @ 2012-02-19  8:59 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]

On Mon, Feb 13, 2012 at 7:34 AM, Walter Dnes <waltdnes@waltdnes.org> wrote:

> On Sun, Feb 12, 2012 at 06:57:08PM +0200, Kfir Lavi wrote
>
> > No, it is all the videos that are 720p x264.
>
>   Is this a recently installed Gentoo?  I had a similar problem trying
> to play 1080i TV and also with NHL Gamecenter Live.  A fresh install
> will have almost all binaries using generic lowest-common-denominator
> 32 or 64 bit code, so that it will work on every machine with the target
> CPU.  Once I did "emerge system" + "emerge world" + rebuilt kernel and
> rebooted, it ran fine (for a 4+ year old Dell).  Now it can handle at
> least the minimum speed for NHL Gamecenter Live, and play 1080i from the TV
> tuner.  For CPU flags I use...
> CFLAGS="-O2 -march=native -mfpmath=sse -fomit-frame-pointer -pipe"
> CXXFLAGS="${CFLAGS}"
>
>  If that isn't your problem, can we see output from the 2 commands...
>
> cat /proc/cpuinfo (1 core is enough, thanks)
>
> head /proc/meminfo (does Memtotal: match what your BIOS shows on bootup?)
>
> --
> Walter Dnes <waltdnes@waltdnes.org>
>
> I did a compilation from the start. 3 times @system and 1 time @world.
I have used -march=native -mfpmath=sse and now movies do play well.
I'm still not sure why I had this problem.
I did use mmx and sse use flags, but did removed them.
Is it possible that my gcc didn't created good efficient binary before I
used recompiled world?
I really don't think so.
I didn't use -march=native, but did find what my gcc find as native
documented here:
http://gentoo-what-did-you-say.blogspot.com/2011/07/finding-cpu-flags-using-gcc.html

Regards,
Kfir

[-- Attachment #2: Type: text/html, Size: 2294 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Slow not in sync movie playing with mplayer2, ffmpeg, x264 with intel core i5
  2012-02-19  8:59       ` Kfir Lavi
@ 2012-02-21  3:09         ` Walter Dnes
  0 siblings, 0 replies; 7+ messages in thread
From: Walter Dnes @ 2012-02-21  3:09 UTC (permalink / raw
  To: gentoo-user

On Sun, Feb 19, 2012 at 10:59:27AM +0200, Kfir Lavi wrote

> I did a compilation from the start. 3 times @system and 1 time @world.
> I have used -march=native -mfpmath=sse and now movies do play well.
> I'm still not sure why I had this problem.
> I did use mmx and sse use flags, but did removed them.
> Is it possible that my gcc didn't created good efficient binary before I
> used recompiled world?
> I really don't think so.

  It's not just the mediaplayer (mplayer/VLC/Xine/whatever).  Your entire
system needs to be optimized.  If you're playing a file from your hard
drive, faster disk drive access helps.  If you're streaming from the
web, faster networking code helps.  Most movies have sound.  Faster alsa
code helps.  Video uses the X Window libraries.  Speeding them up helps.
There are a lot calls to the kernel.  Speeding up the kernel helps.

  To summarize... your system uses dozens of libraries to render a movie.
Optimizing one library may seem very minor, but it all adds up when you
optimize every library on your system.

-- 
Walter Dnes <waltdnes@waltdnes.org>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-02-21  3:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-12  8:51 [gentoo-user] Slow not in sync movie playing with mplayer2, ffmpeg, x264 with intel core i5 Kfir Lavi
2012-02-12 10:42 ` pk
2012-02-12 16:57   ` Kfir Lavi
2012-02-13  5:34     ` Walter Dnes
2012-02-19  8:59       ` Kfir Lavi
2012-02-21  3:09         ` Walter Dnes
2012-02-12 18:59 ` James Broadhead

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox