You are not logged in.

#1 2010-11-07 18:35:22

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

[SOLVED]Mplayer sync issue

Hi!

I've been having this issue lately with mplayer. Everytime I play a video file the video gets out of sync. Sometimes it slows down, sometimes it freezes, but audio always keeps going. If I pause and resume really fast, it will speed up, and if I do that a couple of times it will stay in sync for the rest of the playback. I would like it to always sync smile

Config:

[default]
ao=pulse
vo=gl
va=vaapi
double=yes
prefer-ipv4=yes
nojoystick=yes

sub-bg-alpha="0" #background color ala closed captions
sub-bg-color="0" #black to white
subfont-text-scale="1"  #truetype font scaling
ffactor="10" #black outline
sid="0" #subtitle set
subfont-encoding=unicode
#unicode=yes
#utf8=yes
# Set font size. (2: proportional to movie width)
subfont-autoscale=2
subfont-osd-scale=2
# Set autoscale coefficient. (default: 5)
subfont-text-scale=2

# Align subs. (-1: as they want to align themselves)
spualign=-1

# Anti-alias subs. (4: best and slowest)
spuaa=4
fs=yes
#font="Anonymous Pro"
monitoraspect=16:9
#mixer=/dev/mixer
cache=47683
slang=en
alang=en
lavdopts=threads=2

It's the mplayer-mt-git (I use that becouse then I can play HD movies with better results) from aur, compiled with pulseaudio support. I have [testing] enabled. Graphic card is Intel x4500mhd, cpu is Intel CULV 1,3ghz. If there's anything else, just ask. Thanks!

Last edited by KlavKalashj (2010-11-11 14:25:57)

Offline

#2 2010-11-08 14:55:25

DrMikeDuke
Member
From: Australia
Registered: 2008-05-12
Posts: 79
Website

Re: [SOLVED]Mplayer sync issue

This is the exact same issue I have (or so it seems, same symptoms)

Version info:

MPlayer SVN-r32492-4.5.1 
Linux 2.6.35-ARCH #1 SMP PREEMPT
[mike@Taiga ~]$ pacman -Q |grep -i nvidia
nvidia 260.19.12-1
nvidia-utils 260.19.12-1

[mike@Taiga ~]$ glxinfo |grep -i rendering
direct rendering: Yes

console output below:

libavformat file format detected.
[matroska,webm @ 0x2ad23c0] max_analyze_duration reached
[matroska,webm @ 0x2ad23c0] Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0, Angel Beats! - 02
[lavf] stream 1: audio (aac), -aid 0, -alang jpn, AAC 2.0
[lavf] stream 2: subtitle (unknown), -sid 0, -slang eng
VIDEO:  [H264]  1280x720  0bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
Clip info:
 title: [Mazui] Angel Beats! - 02: Guild
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 1280x720 => 1280x720 Planar YV12 
A:   6.8 V:   6.8 A-V: -0.000 ct:  0.020   0/  0 18%  2%  0.6% 5 0 65% 
A:  12.1 V:   8.6 A-V:  3.470 ct:  0.020   0/  0 17%  2%  0.7% 50 0 58% 


           ************************************************
           **** Your system is too SLOW to play this!  ****
           ************************************************

Possible reasons, problems, workarounds:
- Most common: broken/buggy _audio_ driver
  - Try -ao sdl or use the OSS emulation of ALSA.
  - Experiment with different values for -autosync, 30 is a good start.
- Slow video output
  - Try a different -vo driver (-vo help for a list) or try -framedrop!
- Slow CPU
  - Don't try to play a big DVD/DivX on a slow CPU! Try some of the lavdopts,
    e.g. -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all.
- Broken file
  - Try various combinations of -nobps -ni -forceidx -mc 0.
- Slow media (NFS/SMB mounts, DVD, VCD etc)
  - Try -cache 8192.
- Are you using -cache to play a non-interleaved AVI file?
  - Try -nocache.
Read DOCS/HTML/en/video.html for tuning/speedup tips.
If none of this helps you, read DOCS/HTML/en/bugreports.html.

A:  12.8 V:  11.9 A-V:  0.939 ct:  0.019   0/  0 18%  2%  0.5% 125 0 54% 
  =====  PAUSE  =====

Don't believe this is a caching/buffering issue, tried both CIFS and local media (10,000RPM Drive AHCI)

Further testing showed xine-ui to not exhibit this issue.

Note, my machine is no slouch so I don't think this ones hardware related big_smile (Specs in sig)

Last edited by DrMikeDuke (2010-11-08 15:04:58)


Workstation: Core i7 2600k | Asus PBZ68-V/GEN3 | 8GB DDR3-2000 | Gainward GLH GTX570 | Velociraptor 300 | AntecSS 850W | Essence ST | Corsair 800D | Win7x64 Pro/Arch LinuxX64
Server: 2x Six-Core AMD Opteron Processor 8439 SE, 64GB DDR2 ECC, Tyan S2932-SI, Areca ARC-1230 Raid, PCP&C 1Kw PSU, LSi FusionMPT Ultra320 SCSI/Tandberg LTO4 Autoloader
Laptop: Alienware M14xR3

Offline

#3 2010-11-08 22:06:44

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: [SOLVED]Mplayer sync issue

Yeah I get that error too. I don't think my computer is too slow tongue Have you tried any of the tips? It's really hard to do, since there are these rare moments when it actually plays perfect the entire video.

Offline

#4 2010-11-09 06:43:26

DrMikeDuke
Member
From: Australia
Registered: 2008-05-12
Posts: 79
Website

Re: [SOLVED]Mplayer sync issue

KlavKalashj wrote:

Yeah I get that error too. I don't think my computer is too slow tongue Have you tried any of the tips? It's really hard to do, since there are these rare moments when it actually plays perfect the entire video.

Yeah I was trying to show someone last night and of course it didnt do it, then later on, it did. /rage

These are all the things I've tried / commented again / added to / then removed again:

[mike@Taiga ~]$ cat .mplayer/config 
# Write your default config options here!

videoout="vdpau"

quiet="1"
monitoraspect="16:9"
stop-xscreensaver="yes"

ass="1"
embeddedfonts="1"
correct-pts="1"
double="yes"

sid="0"
aid="0"

cache="20480"
cache-min="99"
hardframedrop="1"

OP: Sorry for thread-jacking, I just figured more peoples details on this issue the better.

Last edited by DrMikeDuke (2010-11-09 06:43:57)


Workstation: Core i7 2600k | Asus PBZ68-V/GEN3 | 8GB DDR3-2000 | Gainward GLH GTX570 | Velociraptor 300 | AntecSS 850W | Essence ST | Corsair 800D | Win7x64 Pro/Arch LinuxX64
Server: 2x Six-Core AMD Opteron Processor 8439 SE, 64GB DDR2 ECC, Tyan S2932-SI, Areca ARC-1230 Raid, PCP&C 1Kw PSU, LSi FusionMPT Ultra320 SCSI/Tandberg LTO4 Autoloader
Laptop: Alienware M14xR3

Offline

#5 2010-11-09 10:05:06

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: [SOLVED]Mplayer sync issue

Search around, VDPAU issues with the nvidia 260.* drivers is known thing. Will be fixed with the next driver release.

The OP is using intel graphics though, not nvidia. And the only thing that comes to mind is... why gl output and not xv? Thoguh even gl should work anyway, try with xv.

Offline

#6 2010-11-09 11:26:31

DrMikeDuke
Member
From: Australia
Registered: 2008-05-12
Posts: 79
Website

Re: [SOLVED]Mplayer sync issue

Gusar wrote:

Search around, VDPAU issues with the nvidia 260.* drivers is known thing. Will be fixed with the next driver release.

The OP is using intel graphics though, not nvidia. And the only thing that comes to mind is... why gl output and not xv? Thoguh even gl should work anyway, try with xv.

Thanks for the helpful info...good luck OP, as Gusar mentioned, I had some success changing the output as well..


Workstation: Core i7 2600k | Asus PBZ68-V/GEN3 | 8GB DDR3-2000 | Gainward GLH GTX570 | Velociraptor 300 | AntecSS 850W | Essence ST | Corsair 800D | Win7x64 Pro/Arch LinuxX64
Server: 2x Six-Core AMD Opteron Processor 8439 SE, 64GB DDR2 ECC, Tyan S2932-SI, Areca ARC-1230 Raid, PCP&C 1Kw PSU, LSi FusionMPT Ultra320 SCSI/Tandberg LTO4 Autoloader
Laptop: Alienware M14xR3

Offline

#7 2010-11-09 15:40:14

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: [SOLVED]Mplayer sync issue

Thanks! I'll try with vo=xv and post back later after some testing smile

Edit: I used gl becouse I thought I would get better results if everything was done on the gpu. Maybe I misunderstood. The va=vaapi is probably not working, becouse I could not build mplayer with --enable-vaapi, it would fail.

Last edited by KlavKalashj (2010-11-09 15:41:44)

Offline

#8 2010-11-09 18:10:48

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: [SOLVED]Mplayer sync issue

Ok, so I only needed 3 min to test - vo=xv made it even worse. Also tested with gl2. It was better but still same problem, and with gl2 some hotkeys didn't work, strangely. I'm getting a bit annoyed by this, I mean, I'm not even playing HD content atm, just a normal .avi file, and it's still crappy. Any more ideas/tips?

Offline

#9 2010-11-09 18:47:37

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED]Mplayer sync issue

KlavKalashj wrote:

Ok, so I only needed 3 min to test - vo=xv made it even worse. Also tested with gl2. It was better but still same problem, and with gl2 some hotkeys didn't work, strangely. I'm getting a bit annoyed by this, I mean, I'm not even playing HD content atm, just a normal .avi file, and it's still crappy. Any more ideas/tips?

When did this start, was it fine before? If yes, did you try the regular mplayer in [extra]? Do you have older mplayer packages in your cache that you can downgrade to? If no you can still check out an older version with git but it will be more work on your side.

This is assuming that mplayer is the cause, otherwise it's your video driver.

Moving this to [testing] Repo Forum.


ᶘ ᵒᴥᵒᶅ

Offline

#10 2010-11-09 20:02:05

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: [SOLVED]Mplayer sync issue

litemotiv wrote:
KlavKalashj wrote:

Ok, so I only needed 3 min to test - vo=xv made it even worse. Also tested with gl2. It was better but still same problem, and with gl2 some hotkeys didn't work, strangely. I'm getting a bit annoyed by this, I mean, I'm not even playing HD content atm, just a normal .avi file, and it's still crappy. Any more ideas/tips?

When did this start, was it fine before? If yes, did you try the regular mplayer in [extra]? Do you have older mplayer packages in your cache that you can downgrade to? If no you can still check out an older version with git but it will be more work on your side.

This is assuming that mplayer is the cause, otherwise it's your video driver.

Moving this to [testing] Repo Forum.

What do you mean? The problem I mentioned in the first post has been around for... maybe two-three months, something like that. The hotkey issue was there only with vo=gl2, I never tried that before.

I have tried regular mplayer, but that one does not support pulseaudio, so I would not use it anyway... I have tried downgrading to other versions I experimented with, but I get a strange error:

mplayer: error while loading shared libraries: libx264.so.104: cannot open shared object file: No such file or directory

I guess it's becouse it's compiled against an older version of x264, or something like that. About drivers... I don't know. Anyone else with Intel hardware experiencing this?


Edit: I tried with an entirerly empty config file now, no change.

Last edited by KlavKalashj (2010-11-09 20:15:17)

Offline

#11 2010-11-09 22:58:24

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: [SOLVED]Mplayer sync issue

Have you tried mplayer-pulse from AUR?

Offline

#12 2010-11-10 08:21:37

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: [SOLVED]Mplayer sync issue

anonymous_user wrote:

Have you tried mplayer-pulse from AUR?

Yeah, same issue.

Offline

#13 2010-11-10 09:02:02

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED]Mplayer sync issue

KlavKalashj wrote:

I have tried regular mplayer, but that one does not support pulseaudio, so I would not use it anyway...

Even then, did the same problem occur without pulseaudio? This is just to systematically determine where the problem lies exactly, without resorting to trying out dozens of configuration options at random.

Did you look through the mplayer bugtracker / mailinglist for regression reports?

I have tried downgrading to other versions I experimented with, but I get a strange error:

mplayer: error while loading shared libraries: libx264.so.104: cannot open shared object file: No such file or directory

I guess it's becouse it's compiled against an older version of x264, or something like that.

Then downgrade libx264. Either from your local cache, or from one of the archives.


ᶘ ᵒᴥᵒᶅ

Offline

#14 2010-11-10 10:04:43

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: [SOLVED]Mplayer sync issue

Actually, I think it's solved! I found an older thread with similar issues, and pulseaudio was the problem in his case. I tried the same thing he did: I changed output from "Simultaneous output to Internal Audio Digital Stereo (HDMI)" to "Internal Audio Digital Stereo (HDMI)". I really have no clue what the difference is, I don't notice any. But since I did that, videoes have been playing nicely. I'm gonna keep it this way a little bit longer before I mark the thread as solved, but I think this is it. Thank you all for your help!

Edit: ok, now I am marking this as solved, it works perfectly now. I still really wonder what the fix did ;P I also find it strange that the sound was the problem when the sound was the only thing working perfectly. Oh well, at least she plays fine smile

Last edited by KlavKalashj (2010-11-11 14:25:18)

Offline

Board footer

Powered by FluxBB