Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mplayer2 vdpau stuttering video after pause/unpause
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
jcflack
n00b
n00b


Joined: 22 Feb 2014
Posts: 4

PostPosted: Sat Feb 22, 2014 2:02 am    Post subject: mplayer2 vdpau stuttering video after pause/unpause Reply with quote

Hi,

I'm running into an issue that has also been reported on an archlinux forum.

If I pause and then unpause a video in mplayer2, using vdpau, the audio resumes perfectly, mplayer2 does not show any error or any sign of anything wrong, but the video stutters badly. It will show a fraction of a second of motion, freeze for several seconds, another blip of motion, another long freeze, and so on, and eventually it catches up and renders smoothly again. I'm not 100% sure, but where it eventually catches up often seems to coincide with a change of camera angle, as if the decoding gets out of sync and can only try to catch up at a keyframe. (But it doesn't catch up at the very next keyframe, anyway, it seems to take several. In a lot of my tests it seems to be four. Maybe it's always four.)

I don't see a bug filed on mplayer2's tracker, or in gentoo's bugzilla. Between mplayer2, vdpau, mesa, and radeon drivers, there seem to be a lot of places the trouble could be, so I guess I'm looking for ideas on the best/most likely place the issue should be reported.

Anyone else seeing this?

Thanks,
-Chap

Code:

media-video/mplayer2/mplayer2-2.0_p20130126.ebuild,v 1.18 2014/01/29 22:58:13 eva Exp

MPlayer2 2.0-712-gd3c5801 (C) 2000-2012 MPlayer Team
...
Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [libavcodec]
Selected audio codec: AAC (Advanced Audio Coding) [libavcodec]
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.60% (ratio: 23999->176400)
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VIDEO:  1280x720  29.970 fps  1637.2 kbps (204.6 kB/s)
VO: [vdpau] 1280x720 => 1280x720 Planar YV12
[vdpau] Got display refresh rate 60.000 Hz.
[vdpau] If that value looks wrong give the -vo vdpau:fps=X suboption manually.

x11-libs/libvdpau/libvdpau-0.5.ebuild,v 1.4 2012/11/22 10:06:42 ago Exp

media-libs/mesa/mesa-9.1.6.ebuild,v 1.13 2014/01/26 20:28:12 chithanh Exp

obj /usr/lib64/vdpau/libvdpau_softpipe.so.1.0.0 af7b4cde1805cbc25842b1691224f0ae 1392698640
obj /usr/lib64/vdpau/libvdpau_r600.so.1.0.0 1d064380ac37cf135602fd738aeec4b9 1392698640

x11-drivers/radeon-ucode/radeon-ucode-20130826.ebuild,v 1.3 2013/10/08 05:05:12 ago Exp

sys-kernel/gentoo-sources/gentoo-sources-3.10.25.ebuild,v 1.6 2014/01/15 09:24:35 ago Exp

[   18.140121] [drm] radeon kernel modesetting enabled.
[   18.140189] radeon 0000:03:00.0: enabling device (0000 -> 0003)
[   18.140428] [drm] initializing kernel modesetting (JUNIPER 0x1002:0x68BE 0x1787:0x2287).
[   18.140468] [drm] register mmio base: 0xC1A00000
[   18.140469] [drm] register mmio size: 131072
[   18.258299] ATOM BIOS: JUNIPER
[   18.258353] [drm] GPU not posted. posting now...
[   18.310299] radeon 0000:03:00.0: VRAM: 1024M 0x0000000000000000 - 0x000000003FFFFFFF (1024M used)
[   18.310302] radeon 0000:03:00.0: GTT: 512M 0x0000000040000000 - 0x000000005FFFFFFF
[   18.321525] [drm] Detected VRAM RAM=1024M, BAR=256M
[   18.321533] [drm] RAM width 128bits DDR
[   18.321556] [drm] radeon: 1024M of VRAM memory ready
[   18.321558] [drm] radeon: 512M of GTT memory ready.
[   18.399510] [drm] GART: num cpu pages 131072, num gpu pages 131072
[   18.400080] [drm] enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0
[   18.401842] [drm] Loading JUNIPER Microcode
[   18.405043] [drm] PCIE GART of 512M enabled (table at 0x000000000025D000).
[   18.405198] radeon 0000:03:00.0: WB enabled
[   18.405203] radeon 0000:03:00.0: fence driver on ring 0 use gpu addr 0x0000000040000c00 and cpu addr 0xffff880633ef3c00
[   18.405206] radeon 0000:03:00.0: fence driver on ring 3 use gpu addr 0x0000000040000c0c and cpu addr 0xffff880633ef3c0c
[   18.405867] radeon 0000:03:00.0: fence driver on ring 5 use gpu addr 0x000000000005c418 and cpu addr 0xffffc9002eb9c418
[   18.405870] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[   18.405871] [drm] Driver supports precise vblank timestamp query.
[   18.405896] radeon 0000:03:00.0: irq 91 for MSI/MSI-X
[   18.405907] radeon 0000:03:00.0: radeon: using MSI.
[   18.405937] [drm] radeon: irq initialized.
[   18.422877] [drm] ring test on 0 succeeded in 1 usecs
[   18.422939] [drm] ring test on 3 succeeded in 1 usecs
[   18.610114] [drm] ring test on 5 succeeded in 1 usecs
[   18.610119] [drm] UVD initialized successfully.
[   18.610386] [drm] Enabling audio support
[   18.610417] [drm] ib test on ring 0 succeeded in 0 usecs
[   18.610445] [drm] ib test on ring 3 succeeded in 0 usecs
[   18.761869] [drm] ib test on ring 5 succeeded
[   18.762257] [drm] Radeon Display Connectors
[   18.762259] [drm] Connector 0:
[   18.762260] [drm]   DP-1
[   18.762261] [drm]   HPD4
[   18.762262] [drm]   DDC: 0x6440 0x6440 0x6444 0x6444 0x6448 0x6448 0x644c 0x644c
[   18.762263] [drm]   Encoders:
[   18.762264] [drm]     DFP1: INTERNAL_UNIPHY2
[   18.762265] [drm] Connector 1:
[   18.762266] [drm]   HDMI-A-1
[   18.762267] [drm]   HPD5
[   18.762268] [drm]   DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c 0x643c
[   18.762269] [drm]   Encoders:
[   18.762270] [drm]     DFP2: INTERNAL_UNIPHY2
[   18.762271] [drm] Connector 2:
[   18.762272] [drm]   DVI-I-1
[   18.762272] [drm]   HPD1
[   18.762274] [drm]   DDC: 0x6460 0x6460 0x6464 0x6464 0x6468 0x6468 0x646c 0x646c
[   18.762274] [drm]   Encoders:
[   18.762275] [drm]     DFP3: INTERNAL_UNIPHY1
[   18.762276] [drm]     CRT2: INTERNAL_KLDSCP_DAC2
[   18.762277] [drm] Connector 3:
[   18.762278] [drm]   DVI-I-2
[   18.762279] [drm]   HPD6
[   18.762280] [drm]   DDC: 0x6450 0x6450 0x6454 0x6454 0x6458 0x6458 0x645c 0x645c
[   18.762281] [drm]   Encoders:
[   18.762282] [drm]     DFP4: INTERNAL_UNIPHY
[   18.762283] [drm]     CRT1: INTERNAL_KLDSCP_DAC1
[   18.764596] [drm] Internal thermal controller with fan control
[   18.764622] [drm] radeon: power management initialized
[   18.811029] [drm] fb mappable at 0xB035F000
[   18.811032] [drm] vram apper at 0xB0000000
[   18.811034] [drm] size 8294400
[   18.811036] [drm] fb depth is 24
[   18.811037] [drm]    pitch is 7680
[   18.811194] radeon 0000:03:00.0: fb1: radeondrmfb frame buffer device
[   18.811208] [drm] Initialized radeon 2.33.0 20080528 for 0000:03:00.0 on minor 1
Back to top
View user's profile Send private message
Logicien
l33t
l33t


Joined: 16 Sep 2005
Posts: 862
Location: Montréal

PostPosted: Sat Feb 22, 2014 4:40 pm    Post subject: Reply with quote

Hi,
just after reading your post, I emerge Mplayer2. Than I played an Avi file in a graphical virtual terminal with
Code:
mplayer2 -vo vdpau /mnt/garde/Avi/The-Code-Linux.avi

MPlayer2 2.0-712-gd3c5801 (C) 2000-2012 MPlayer Team
[ass] FcFreeTypeQueryFace failed

Playing /mnt/garde/Avi/The-Code-Linux.avi.
Detected file format: AVI (Audio Video Interleaved) (libavformat)
[lavf] stream 0: video (msmpeg4), -vid 0
[lavf] stream 1: audio (mp3), -aid 0
Clip info:
 encoder: Nandub v1.0rc2
Load subtitles in /mnt/garde/Avi/
Opening video filter: [pp=lowpass5]
Selected video codec: MPEG-4 part 2 Microsoft variant version 3 [libavcodec]
Selected audio codec: MPEG 1.0/2.0/2.5 layers I, II, III [mpg123]
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
VIDEO:  640x480  25.000 fps    0.0 kbps ( 0.0 kB/s)
[PP] Using external postprocessing filter, max q = 6.
VO: [vdpau] 640x480 => 640x480 Planar YV12
[vdpau] Compositing window manager detected. Assuming timing info is inaccurate.
[ass] Glyph 0xE001 not found, selecting one more font for (OSD, 80, 0)
A:   1.6 V:   1.7 A-V: -0.000 ct: -0.026   0/  0  6% 11%  0.9% 0 0

I put it on pause pressing the space bar. Mplayer2 pause as expected. Than I press the space bar again. Mplayer2 unpause as expected without any video stutter.

I have
Code:
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Trinity [Radeon HD 7520G]

I use the Radeon Linux kernel and Xorg modules. I use Gallium for Mesa and xorg-x11 for Opengl as eselect show. Did you set correctly the mesa and opengl modules with eselect?

This are my USE flags for Mplayer2. Compare with your own ones. The solution can be there.
Code:
equery u mplayer2
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for media-video/mplayer2-2.0_p20130126:
 U I
 + + 3dnow        : Use the 3DNow! instruction set
 - - 3dnowext     : Enable 3dnowext cpu instructions
 + + X            : Add support for X11
 + + a52          : Enable support for decoding ATSC A/52 streams used in DVD
 + + alsa         : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
 - - bluray       : Enable playback of Blu-ray filesystems
 - - bs2b         : Enable Bauer stereophonic-to-binaural headphone filter
 + + cddb         : Access cddb servers to retrieve and submit information about compact disks
 + + cdio         : Use libcdio for CD support (instead of cdparanoia)
 - - cpudetection : Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)
 - - debug        : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml
 + + directfb     : Add support for DirectFB layer (library for FB devices)
 - - doc          : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
 + + dts          : Enable DTS Coherent Acoustics decoder support
 + + dv           : Enable support for a codec used by many camcorders
 - - dvb          : Add support for DVB (Digital Video Broadcasting)
 + + dvd          : Add support for DVDs
 + + dvdnav       : Use forked libdvdnav, navigate menus in GUIs
 + + enca         : Enables support for charset discovery and conversion
 + + faad         : Use external faad library for AAC decoding
 + + fbcon        : Add framebuffer support for the console, via the kernel
 - - ftp          : Add FTP (File Transfer Protocol) support
 + + gif          : Add GIF image support
 + + iconv        : Enable support for the iconv character set conversion library
 + + ipv6         : Add support for IP version 6
 - - jack         : Add support for the JACK Audio Connection Kit
 - - joystick     : Add support for joysticks in all packages
 + + jpeg         : Add JPEG image support
 - - ladspa       : Enable the ability to support ladspa plugins
 + + lcms         : Add lcms support (color management engine)
 + + libass       : SRT/SSA/ASS (SubRip / SubStation Alpha) subtitle support
 + + libcaca      : Add support for colored ASCII-art graphics
 - - lirc         : Add support for lirc (Linux's Infra-Red Remote Control)
 + + mad          : Add support for mad (high-quality mp3 decoder library and cli frontend)
 - - md5sum       : Enables md5sum video output
 + + mmx          : Use the MMX instruction set
 + + mmxext       : Enables mmx2 support
 + + mng          : MNG input support
 + + mp3          : Enable support for mp3 decoding over media-sound/mpg123 instead of relying on ffmpeg support.
 + + network      : Enables network streaming support
 - - nut          : Enables support for the NUT container format
 + + opengl       : Add support for OpenGL (3D graphics)
 + + oss          : Add support for OSS (Open Sound System)
 + + png          : Add support for libpng (PNG images)
 - - pnm          : Add PNM video output option, to create PPM/PGM/PGMYUV images
 - - portaudio    : Add support for the crossplatform portaudio audio API
 + + postproc     : Enable image post-processing via libpostproc
 + + pulseaudio   : Add support for PulseAudio sound server
 - - pvr          : Enable Video4Linux2 MPEG PVR
 - - quvi         : Enable support for streaming sites using media-libs/libquvi
 - - radio        : Enable V4L2 radio interface and support
 + + rar          : Enable Unique RAR File Library
 + + rtc          : Enables usage of the linux real time clock. The alternative is software emulation of rtc
 + + samba        : Add support for SAMBA (Windows File and Printer sharing)
 + + sdl          : Add support for Simple Direct Layer (media library)
 + + shm          : Enable support for shm
 + + speex        : Add support for the speex audio codec (used for speech)
 + + sse          : Use the SSE instruction set
 + + sse2         : Use the SSE2 instruction set
 + + ssse3        : Faster floating point optimization for SSSE3 capable chips (Intel Core 2 and later chips)
 - - symlink      : Copy all binaries and configuration into locations occupied by media-video/mplayer and thus act like drop-in replacement.
 - - tga          : Enables Targa video output
 + + theora       : Add support for the Theora Video Compression Codec
 + + unicode      : Add support for Unicode
 + + v4l          : Enable support for video4linux (using linux-headers or userspace libv4l libraries)
 + + vcd          : Video CD support
 + + vdpau        : Enable the Video Decode and Presentation API for Unix acceleration interface
 + + vorbis       : Add support for the OggVorbis audio codec
 - - xanim        : Enables support for xanim based codecs
 + + xinerama     : Add support for the xinerama X11 extension, which is mandatory if you work in multiple monitors setup
 + + xscreensaver : Add support for XScreenSaver extension
 + + xv           : Add in optional support for the Xvideo extension (an X API for video playback)
 + + xvid         : Add support for xvid.org's open-source mpeg-4 codec
 - - yuv4mpeg     : Enables yuv4mpeg video output

_________________
Paul
Back to top
View user's profile Send private message
jcflack
n00b
n00b


Joined: 22 Feb 2014
Posts: 4

PostPosted: Sat Feb 22, 2014 8:23 pm    Post subject: Reply with quote

Hi,

Thanks for the tips. I do have gallium eselected for mesa and xorg-x11 for opengl, as you have. I haven't yet compared every last mplayer2 USE flag to yours ... it would be nice to have more idea which ones might plausibly be related to the issue, which I don't have yet.

I do notice that the video I was playing was encoded in H.264, and yours in msmpeg4, and you also had a postprocessing filter of some sort and a compositing window manager that vdpau remarked on. I'm not sure how those differences would affect how the player interacts with the hardware.

However, just now I have looked around and found a Quicktime (SVQ3) and an mpeg2 video to try, and for me they also stutter when unpaused.

I think you've got a rather newer radeon than mine - what firmware does it load? (Juniper, for mine.)

Thanks,
-Chap
Back to top
View user's profile Send private message
jcflack
n00b
n00b


Joined: 22 Feb 2014
Posts: 4

PostPosted: Sat Feb 22, 2014 8:57 pm    Post subject: Reply with quote

Hmm, also same stuttering on another box with a newer radeon chipset.

First box I described:
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Juniper PRO [Radeon HD 5750]

Second box:
01:00.0 VFA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Seymour [Radeon HD 6400M/7400M Series]

It loads CAICOS firmware.

-Chap
Back to top
View user's profile Send private message
Logicien
l33t
l33t


Joined: 16 Sep 2005
Posts: 862
Location: Montréal

PostPosted: Sat Feb 22, 2014 10:29 pm    Post subject: Reply with quote

My firmware is ARUBA. Is KMS (Kernel Mode Setting) in use? This is what this command return to me
Code:
dmesg | grep -i setting
[    1.896690] [drm] radeon kernel modesetting enabled.
[    1.896938] [drm] initializing kernel modesetting (ARUBA 0x1002:0x9990 0x103C:0x1849).

This one is
Code:
grep -i kms /var/log/Xorg.0.log
[454960.242] (II) [KMS] Kernel modesetting enabled.
[454960.252] (II) RADEON(0): KMS Color Tiling: enabled
[454960.252] (II) RADEON(0): KMS Color Tiling 2D: enabled
[454960.252] (II) RADEON(0): KMS Pageflipping: enabled


Does the command
Code:
glxinfo | less

say
Code:
direct rendering: Yes

What about
Code:
cat /proc/cmdline

_________________
Paul
Back to top
View user's profile Send private message
jcflack
n00b
n00b


Joined: 22 Feb 2014
Posts: 4

PostPosted: Sat Feb 22, 2014 11:25 pm    Post subject: Reply with quote

dmesg | grep -i setting
[ 43.321539] [drm] radeon kernel modesetting enabled.
[ 43.321764] [drm] initializing kernel modesetting (JUNIPER 0x1002:0x68BE 0x1787:0x2287).

grep -i kms /var/log/Xorg.0.log
[ 69.176] (II) [KMS] Kernel modesetting enabled.
[ 69.185] (II) RADEON(0): KMS Color Tiling: enabled
[ 69.186] (II) RADEON(0): KMS Color Tiling 2D: enabled
[ 69.186] (II) RADEON(0): KMS Pageflipping: enabled

glxinfo | less
hmm, I guess I'll have to emerge mesa-progs for that.

cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt2)/boot@/bzImage-3.10.25-gentoo root=zfs:xxx/root radeon.audio=1

-Chap
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