Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
movies display not smooth in both xine and mplayer
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
vinthund
n00b
n00b


Joined: 24 Feb 2005
Posts: 26

PostPosted: Fri Mar 04, 2005 10:03 pm    Post subject: movies display not smooth in both xine and mplayer Reply with quote

hello,

when I play videos - be it in xine or in mplayer - the movie freezes every 20-40 frames for a short while and then goes on. the result is that practically it can not be watches, it is so irritating. Movie sound is ok. Under Fedora core everything was OK. What can I change to make the movies go smooth?
When playing there is lots of free memory and CPU is 20 to 50 % busy.

Here are some info you might find useful:

Code:
marek@hostxxxtymi co pojechalem 250
 marek $ mplayer /mnt/cdrom/Godfather\ 1%2f2.avi
MPlayer 1.0pre5try2-3.3.5 (C) 2000-2004 MPlayer Team

CPU: Advanced Micro Devices Duron Spitfire 802.4 MHz (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx

Reading config file /usr/share/mplayer/mplayer.conf
Reading config file /home/marek/.mplayer/config
Reading /home/marek/.mplayer/codecs.conf: Can't open '/home/marek/.mplayer/codec s.conf': Nie ma takiego pliku ani katalogu
Reading /usr/share/mplayer/codecs.conf: 73 audio & 180 video codecs
font: can't open file: /home/marek/.mplayer/font/font.desc
Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)
Using usleep() timing
Can't open input config file /home/marek/.mplayer/input.conf: Nie ma takiego pli ku ani katalogu
Input config file /usr/share/mplayer/input.conf parsed: 53 binds

Playing /mnt/cdrom/Godfather 1%2f2.avi.
Cache fill:  0,00% (0 bytes)    AVI file format detected.
VIDEO:  [DIV3]  640x352  24bpp  23,976 fps  893,2 kbps (109,0 kbyte/s)
Clip info:
 [...]
SUB: Detected subtitle file format: vplayer
SUB: Read 715 subtitles.
SUB: Adjusted 715 subtitle(s).
SUB: added subtitle file (1): /mnt/cdrom/Godfather 1%2f2.srt
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
MP3lib: init layer2&3 finished, tables done
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 12000->192000 (96,0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
vo: X11 running at 1024x768 with depth 24 and 32 bpp (":0.0" => local display)
vo_xvmc: X-Video extension 2.2
vo_xvmc: No X-Video MotionCompensation Extension on :0.0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffdivx] vfm:ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
==========================================================================
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 48000 hz, little endian signed int
AF_pre: 48000Hz 2ch Signed 16-bit (Little-Endian)
AO: [oss] 48000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
Starting playback...
VDec: vo config request - 640 x 352 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x352 => 640x352 Planar YV12
A:   3,5 V:   3,5 A-V:  0,023 ct:  0,032   84/ 84  67% 19%  2,9% 9 0 95%%


flags from /etc/make.conf

Code:
USE="16bit 3dnow 3dnowex a52 aac codecs css dga divx4linux dmalloc dpms \
     dvd dvdread dxr3 exif fame fb fbcon fbdev ffmpeg gg gsnd gtkhtml java \
     mailbox maildir mbox mmx mmx2 monkey mp3 mpeg4 mplayer mythtv \
     no-biodata no-emboss noamazon nvidia offensive ogg openal pdf php pvm \
     rhythmbox usb v4l vcd vidix virus-scan vlm vorbis wxwindows xanim \
     xine xvid xvmc -emboss -kde -libg -qt"


from /boot/config
Code:

#
# Automatically generated by make menuconfig: don't edit
#
CONFIG_X86=y
# CONFIG_SBUS is not set
CONFIG_UID16=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y

#
# Processor type and features
#
CONFIG_MK731=y

CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_HAS_TSC=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_USE_3DNOW=y
CONFIG_X86_PGE=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_MCE=y
CONFIG_NOHIGHMEM=y
CONFIG_1GB=y
CONFIG_MATH_EMULATION=y
CONFIG_MTRR=y
CONFIG_PREEMPT=y
CONFIG_X86_UP_APIC=y
CONFIG_X86_UP_IOAPIC=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_TSC=y
CONFIG_HAVE_DEC_LOCK=y

#
# General setup
#
CONFIG_NET=y
CONFIG_PCI=y
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y

CONFIG_PCI_DIRECT=y
CONFIG_ISA=y
CONFIG_PCI_NAMES=y
CONFIG_HOTPLUG=y

#
# ACPI Support
#
# CONFIG_ACPI is not set

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set

#
# Console drivers
#
CONFIG_VGA_CONSOLE=y
CONFIG_VIDEO_SELECT=y
# CONFIG_MDA_CONSOLE is not set

#
# Frame-buffer support
#
# CONFIG_FB is not set
# CONFIG_SPEAKUP is not set

#
# Sound
#
CONFIG_SOUND=y

CONFIG_SOUND_EMU10K1=y
CONFIG_MIDI_EMU10K1=y
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54421
Location: 56N 3W

PostPosted: Fri Mar 04, 2005 11:54 pm    Post subject: Reply with quote

vinthund,

Your mplayer startup says
Code:
Using usleep() timing
which is CPU busy wait loops.
Add
Code:
 echo 1024 > /proc/sys/dev/rtc/max-user-freq
to /etc/conf.d/local.start to use hardware timing.
This depends on you having RTC support in the kernel too.

Check that your drives are using DMA with
Code:
hdparam /dev/hdX
Where X is each drive in turn.
You seem to be missing the xv USE= flag too, which provides the X Video API extensions
Check with
Code:
emerge --info
which will show yo all your USE flag settings. If its missing your will need to recompile xorg, mplayer and xine.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
vinthund
n00b
n00b


Joined: 24 Feb 2005
Posts: 26

PostPosted: Tue Mar 08, 2005 4:46 am    Post subject: Reply with quote

thanks for reply. I was unable to write something until now, sorry.

As regards your advice:

I added to my local.start (I just pasted it into it; it was empty anyway) but this RTC thing bother me as far as in my /boot/conf I read:

Code:
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_SCx200 is not set
# CONFIG_SCx200_GPIO is not set
# CONFIG_AMD_RNG is not set
# CONFIG_INTEL_RNG is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_AMD_PM768 is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set


that probably means I did not set it to be compiled. I just do not knaw what a watchdog card is. So I need to recompil the kernel? But why? And what does RTC stand for?

As regards hdparam: my system says "no such command". I presume I need to emerge somre tool to use hdparam?

Finally USE flags:
Code:
# emerge --info
Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20040808-r1, 2.4.28-gentoo-r7 i686)
=================================================================
System uname: 2.4.28-gentoo-r7 i686 AMD Duron(tm) Processor
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 26 2005, 16:11:32)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.9.4, 1.6.3, 1.7.9-r1, 1.4_p6, 1.8.5-r3
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.21-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-tbird -Os -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-tbird -Os -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.zie.pg.gda.pl http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="pl_PL.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 16bit 3dnow 3dnowex X a52 aac alsa apm arts avi berkdb bitmap-fonts cdr codecs crypt css cups curl dga divx4linux dmalloc dpms dvd dvdread dxr3 encode esd exif f77 fam fame fb fbcon fbdev ffmpeg flac font-server foomaticdb fortran gdbm gg gif gnome gpm gsnd gstreamer gtk gtk2 gtkhtml imlib ipv6 java jpeg libg++ libwww mad mailbox maildir mbox mikmod mmx mmx2 monkey motif mozilla mp3 mpeg mpeg4 mplayer mythtv ncurses nls no-biodata no-emboss noamazon nvidia offensive ogg oggvorbis openal opengl oss pam pdf pdflib perl php png pvm python quicktime readline rhythmbox sdl spell ssl svga tcpd tiff truetype truetype-fonts type1-fonts usb userlocales utf8 v4l vcd vidix virus-scan vlm vorbis wxwindows xanim xine xml2 xmms xv xvid xvmc zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS, PORTDIR_OVERLAY


so it seems xv is there.

what now?

thanks in advance,

marek
Back to top
View user's profile Send private message
micmac
l33t
l33t


Joined: 28 Nov 2003
Posts: 996

PostPosted: Tue Mar 08, 2005 10:40 am    Post subject: Reply with quote

Hi!

See

emerge -pv hdparm

if you got it.

The kernel part you were looking into for rtc is the wrong one. This is for watchdog cards. Check in "Character devices".

Maybe play a bit with mplayer cache settings. Try mplayer -nocache for instance.

Luck mic
Back to top
View user's profile Send private message
sevec
n00b
n00b


Joined: 02 Jan 2004
Posts: 47

PostPosted: Tue Mar 08, 2005 10:56 am    Post subject: Reply with quote

it seems from the mplayer output that it doesn't run with xv.
if it is enable you can run mplayer with "-vo xv" or add
"vo=xv" in /etc/mplayer.conf
Back to top
View user's profile Send private message
vinthund
n00b
n00b


Joined: 24 Feb 2005
Posts: 26

PostPosted: Tue Mar 08, 2005 1:48 pm    Post subject: Reply with quote

sevec wrote:
it seems from the mplayer output that it doesn't run with xv.
if it is enable you can run mplayer with "-vo xv" or add
"vo=xv" in /etc/mplayer.conf


I did the following but that alone did not help:

Code:
mplayer -vo xv /mnt/cdrom/Godfather\ 1%2f2.avi MPlayer 1.0pre5try2-3.3.5 (C) 2000-2004 MPlayer Team

CPU: Advanced Micro Devices Duron Spitfire 803.6 MHz (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx

Reading config file /usr/share/mplayer/mplayer.conf
Reading config file /home/marek/.mplayer/config
Reading /home/marek/.mplayer/codecs.conf: Can't open '/home/marek/.mplayer/codecs.conf': Nie ma takiego pliku ani katalogu
Reading /usr/share/mplayer/codecs.conf: 73 audio & 180 video codecs
font: can't open file: /home/marek/.mplayer/font/font.desc
Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)
Using usleep() timing
Can't open input config file /home/marek/.mplayer/input.conf: Nie ma takiego pliku ani katalogu
Input config file /usr/share/mplayer/input.conf parsed: 53 binds

Playing /mnt/cdrom/Godfather 1%2f2.avi.
Cache fill:  0,00% (0 bytes)    AVI file format detected.
VIDEO:  [DIV3]  640x352  24bpp  23,976 fps  893,2 kbps (109,0 kbyte/s)
Clip info:
 [...]
SUB: Detected subtitle file format: vplayer
SUB: Read 715 subtitles.
SUB: Adjusted 715 subtitle(s).
SUB: added subtitle file (1): /mnt/cdrom/Godfather 1%2f2.srt
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
MP3lib: init layer2&3 finished, tables done
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 12000->192000 (96,0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
vo: X11 running at 1024x768 with depth 24 and 32 bpp (":0.0" => local display)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffdivx] vfm:ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
==========================================================================
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 48000 hz, little endian signed int
AF_pre: 48000Hz 2ch Signed 16-bit (Little-Endian)
AO: [oss] 48000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
Starting playback...
VDec: vo config request - 640 x 352 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x352 => 640x352 Planar YV12
Przerwany potok,6 A-V: -0,007 ct:  0,147  11021/11021  17% 15%  1,6% 18 0 49%


marek
Back to top
View user's profile Send private message
vinthund
n00b
n00b


Joined: 24 Feb 2005
Posts: 26

PostPosted: Tue Mar 08, 2005 1:53 pm    Post subject: Reply with quote

micmac wrote:
Hi!

See

emerge -pv hdparm

if you got it.

The kernel part you were looking into for rtc is the wrong one. This is for watchdog cards. Check in "Character devices".

Maybe play a bit with mplayer cache settings. Try mplayer -nocache for instance.

Luck mic


Whai i found:

# hdparm /dev/hda

Code:
/dev/hda:
 multcount    = 16 (on)
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
 geometry     = 4865/255/63, sectors = 40020664320, start = 0



so it seems DMA is not enabled? how do I enable it?

from /boot/config:

Code:
#
# Character devices
#
CONFIG_VT=y
# CONFIG_ECC is not set
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
# CONFIG_SERIAL_CONSOLE is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
# CONFIG_PRINTER is not set
# CONFIG_PPDEV is not set
# CONFIG_TIPAR is not set


that is all

mplayer -nocache did not help much if at all

marek
Back to top
View user's profile Send private message
AngelFire
n00b
n00b


Joined: 07 Mar 2005
Posts: 1
Location: Varna, Bulgaria

PostPosted: Tue Mar 08, 2005 4:41 pm    Post subject: Reply with quote

my problem was the same ...
i solved it by commenting out the "framedrop" line in /etc/mplayer.conf

i hope this helps
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54421
Location: 56N 3W

PostPosted: Tue Mar 08, 2005 7:45 pm    Post subject: Reply with quote

vinthund,

Some of your old questions.
A watchdog card 'watches' to see that the PC is operating normally and restarts it when its not. They all operate in a similar fashion. by watching for some regular activity, and generating a restart if this activity is missing. Since you need to recompile you kernel for DMA, you may as well fix the RTC too.

Under ATA/ATAPI/MFM/RLL support, choose:-
Code:
ATA/ATAPI/MFM/RLL support (IDE)
Include IDE/ATA-2 DISK support (BLK_DEV_IDEDISK)
Use multi-mode by default (IDEDISK_MULTI_MODE)
Include IDE/ATAPI CDROM support (BLK_DEV_IDECD)
generic/default IDE chipset support (IDE_GENERIC)
PCI IDE chipset support (BLK_DEV_IDEPCI)
Generic PCI bus-master DMA support (BLK_DEV_IDEDMA_PCI)
Use PCI DMA by default when available (IDEDMA_PCI_AUTO)
all as built into the kerenl, not as modules. You may need other options too.
You also need to choose your IDE chip set from the list of chipses that follows, since this adds the code that allows DMA to be set. If the chip set specific code is missed out, DMA modes cannot be set, since the kerenl will 'know' how to set up your hip set correctly. It must be built in too.

Real Time Clock (RTC) Support is Under Character devices. Choose:-
Code:
Enhanced Real Time Clock Support (RTC)
Generic /dev/rtc emulation (GEN_RTC)
Extended RTC operation (GEN_RTC_X)

Either modules or built in will work but you will need ro arrange module loading if you use modules.

Make sure you have those options set and rebuild your kernel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
vinthund
n00b
n00b


Joined: 24 Feb 2005
Posts: 26

PostPosted: Wed Mar 09, 2005 9:54 pm    Post subject: Reply with quote

Quote:
vinthund,


Under ATA/ATAPI/MFM/RLL support, choose:-
[
[...]
You also need to choose your IDE chip set from the list of chipses that follows, since this adds the code that allows DMA to be set. If the chip set specific code is missed out, DMA modes cannot be set, since the kerenl will 'know' how to set up your hip set correctly. It must be built in too.


and that is what I did not do when configuring kernrl for the first time

Quote:
]Real Time Clock (RTC) Support is Under Character devices. Choose:-
[...]
Generic /dev/rtc emulation (GEN_RTC)
Extended RTC operation (GEN_RTC_X)[/code]


I could not find these two, really! :) I still have this when I run mplayer:
Code:
Using usleep() timing



Anyway I rebuilt kernel and it works much better, that I can see in any application. still movies playback could be better (still "chokes") each now and then, but too often. not very nice. but it is different: before sound was going OK, just video choked every second or two; now both sound and video chok every 20 second or so. Still, it is much better. maybe I can tune it in gmplayer config. (it does not seem to chok in mplayer, only gmplayer).

And one more question: when I run an app it creates processes, sure, but here... when I run one movie in xine, it creates 18 processes! Rhythmbox creates currently 6! Nautilus - 8. Each has its unique number, but each also uses the same amount of memory. Is it OK? Maybe I did not pay attention but I never saw anything like that. Is it OK?

regards,

marek
Back to top
View user's profile Send private message
Morimando
Guru
Guru


Joined: 14 Feb 2005
Posts: 339
Location: Germany

PostPosted: Wed Mar 09, 2005 10:24 pm    Post subject: Reply with quote

mightbe also starting mplayer using
Code:
mplayer -nokeepaspect -vo gl2 <filename>

could be of use for you. Have you done opengl-update?
_________________
That young girl is one of the least benightedly unintelligent organic life forms it has been my profound lack of pleasure not to be able to avoid meeting.
-- Marvin
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54421
Location: 56N 3W

PostPosted: Thu Mar 10, 2005 6:55 pm    Post subject: Reply with quote

vinthund,

Do not confuse processes and threads. Both appear in top and it can be very dificult to tell them apart.
Check with hdparm to make sure that DMA is being used now.
Force the use of the xv video output driver bu starting
Code:
mplayer -vo xv ....

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum