Re: [Alsa-user] a52 plugin: mplayer get A/V-async

2008-02-01 Thread Sergei Steshenko
On Fri, 01 Feb 2008 14:23:41 +0100
Johannes Bauer <[EMAIL PROTECTED]> wrote:

> Alexander E. Patrakov schrieb:
> 
> > I think it is a problem with mplayer or alsa-lib, not with a52 plugin,
> > because I am able to reproduce a similar effect by just running dmix at
> > 192 kHz 32 bit. To do so, create ~/.asoundrc that contains just two lines:
> > 
> > defaults.pcm.dmix.rate 192000
> > defaults.pcm.dmix.format S32_LE
> > 
> > To troubleshoot, try also running mplayer with "-ao sdl".
> 
> Indeed, when I put those two lines to my ~/.asoundrc (my other
> coniguration resides in /etc/asound.conf) I see the exact same effect on
> videos which usually work. So it seems to be a format conversion problem?
> 


I'd say you stress the whole audio system by forcing it work with higher
throughput.

Regards,
  Sergei.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] a52 plugin: mplayer get A/V-async

2008-02-01 Thread Johannes Bauer
Adam Nielsen schrieb:
>> >> When a movie doesn't play, it shows weird behaviour: the video is
>> >> playing *extremely* slowly, the audio plays just fine for about the
>> >> first 100 seconds. Then mplayer gets so out of sync that it commits
>> >> suicide in a way. Here is some output:
> >
> > IIRC mplayer uses the audio as a timing source, so if there are any
> > issues with the audio it throws out the timing of the whole movie.
> >
> > I would suggest trying the A/V sync options to see if you can improve
> > the behaviour at all (-framedrop, -hardframedrop, -mc)

Okay, I first expermiented with those: behaviour didn't change. Then I
tried "-autosync 30" which improved things a bit - movie was still
playing extremely slowly, but it at least *displayed* that A/V were in
sync. Well, no huge improvement...

Then I tried to insert a filter which always converts the sample rate to
48000 Hz (as this seems to work with one movie perfectly) - voila! Did
the trick!

I inserted (right after the default filter):

pcm.Filter_RateConvert {
type rate
slave {
pcm "Filter_Duplex"
rate 48000
}
}

> > Personally I've found ALSA's plugins very difficult to get working
> > reliably across a number of different programs, so the behaviour you
> > describe doesn't surprise me at all.  I still can't play mono audio
> > through some programs.

This sounds a bit annoying - ALSA is supposed to be robust software (it
seems like it's been there forever) - is this part still work in progress?

Thanks all for your help and pointers!

Greetings,
Johannes



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] a52 plugin: mplayer get A/V-async

2008-02-01 Thread Johannes Bauer
Alexander E. Patrakov schrieb:

> I think it is a problem with mplayer or alsa-lib, not with a52 plugin,
> because I am able to reproduce a similar effect by just running dmix at
> 192 kHz 32 bit. To do so, create ~/.asoundrc that contains just two lines:
> 
> defaults.pcm.dmix.rate 192000
> defaults.pcm.dmix.format S32_LE
> 
> To troubleshoot, try also running mplayer with "-ao sdl".

Indeed, when I put those two lines to my ~/.asoundrc (my other
coniguration resides in /etc/asound.conf) I see the exact same effect on
videos which usually work. So it seems to be a format conversion problem?

The video which usually worked shows
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)

The video which didn't
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)

So - what can I do about it?

Greetings,
Johannes

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] a52 plugin: mplayer get A/V-async

2008-02-01 Thread Adam Nielsen
> When a movie doesn't play, it shows weird behaviour: the video is
> playing *extremely* slowly, the audio plays just fine for about the
> first 100 seconds. Then mplayer gets so out of sync that it commits
> suicide in a way. Here is some output:

IIRC mplayer uses the audio as a timing source, so if there are any
issues with the audio it throws out the timing of the whole movie.

I would suggest trying the A/V sync options to see if you can improve
the behaviour at all (-framedrop, -hardframedrop, -mc)

Personally I've found ALSA's plugins very difficult to get working
reliably across a number of different programs, so the behaviour you
describe doesn't surprise me at all.  I still can't play mono audio
through some programs.

Cheers,
Adam.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] a52 plugin: mplayer get A/V-async

2008-02-01 Thread Alexander E. Patrakov
Johannes Bauer wrote:
> Hello list,
> 
> there's another problem I encountered with the a52 plugin *sigh*... I
> have it setup so it does routing and then A52 encoding. Everything works
> beautifully using xmms. Some movies play just fine with mplayer. Others
> don't. I have no idea why.
> 
> When a movie doesn't play, it shows weird behaviour: the video is
> playing *extremely* slowly, the audio plays just fine for about the
> first 100 seconds. Then mplayer gets so out of sync that it commits
> suicide in a way.

I think it is a problem with mplayer or alsa-lib, not with a52 plugin, because 
I am able to reproduce a similar effect by just running dmix at 192 kHz 32 bit. 
To do so, create ~/.asoundrc that contains just two lines:

defaults.pcm.dmix.rate 192000
defaults.pcm.dmix.format S32_LE

To troubleshoot, try also running mplayer with "-ao sdl".

-- 
Alexander E. Patrakov


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] a52 plugin: mplayer get A/V-async

2008-01-31 Thread Johannes Bauer
Hello list,

there's another problem I encountered with the a52 plugin *sigh*... I
have it setup so it does routing and then A52 encoding. Everything works
beautifully using xmms. Some movies play just fine with mplayer. Others
don't. I have no idea why.

When a movie doesn't play, it shows weird behaviour: the video is
playing *extremely* slowly, the audio plays just fine for about the
first 100 seconds. Then mplayer gets so out of sync that it commits
suicide in a way. Here is some output:

At first:
A:   2.0 V:   0.6 A-V:  1.420 ct:  0.022  12/ 10 ??% ??% ??,?% 5 0

Later on:
A:  10.6 V:   1.7 A-V:  8.939 ct:  0.065  40/ 37  5%  1%  5.9% 32 0

You can see that while the audio stream is at 10.6 seconds, the video
stream is still stuck at 1.7 seconds - 8.94 seconds delay.

After a while, it does the following:

Broken frame at 0x295AF0
A: 113.1 V:  15.9 A-V: 97.228 ct:  0.165 380/377  1%  1%  5.9% 350 0
Zu viele Videopakete im Puffer: (3742 in 8388936 Bytes).
Vielleicht spielst du eine(n) nicht-interleaved Stream/Datei, oder der
Codec funktioniert nicht. Versuche bei AVI-Dateien, den nicht-interleaved
Modus mit der Option -ni zu erzwingen.
[AO_ALSA] Schreibfehler: Broken pipe
[AO_ALSA] Versuche Reset der Soundkarte.
A: 113.1 V:  15.9 A-V: 97.230 ct:  0.169 381/378  1%  1%  5.9% 350 0

Or translated (by me, mplayer doesn't seem to do i18n)

Broken frame at 0x295AF0
A: 113.1 V:  15.9 A-V: 97.228 ct:  0.165 380/377  1%  1%  5.9% 350 0
Too many pakets in videobuffer: (3742 in 8388936 Bytes).
Maybe you're playing a non-interleaved stream/file, or the codec isn't
working. Try to force non-interleaved mode with AVI-files with the -ni
command line option.
[AO_ALSA] Write error: Broken pipe
[AO_ALSA] Trying to reset sound card.
A: 113.1 V:  15.9 A-V: 97.230 ct:  0.169 381/378  1%  1%  5.9% 350 0

When I pass the -ao alsa:noblock option to mplayer, the error looks
differnt: A/V doesn't get out of sync, but I get *tons* of this error
message:

[AO_ALSA] Write error: Resource temporarily unavailable 1.0% 51 0
[AO_ALSA] Trying to reset sound card.
[AO_ALSA] Error preparing pcm: Device or resource busy

And the audio breaks up permanently (sounding horrible).

When I play directly (not using the A52 plugin, it works - but then I
only get audio through my front speakers, which is not what I want).

Is this an ALSA or mplayer problem? I hope someone knows...

Thanks in advance,
Johannes

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user