You are not logged in.

#1 2019-03-02 11:42:50

AlmostSurelyRob
Member
From: UK
Registered: 2012-03-17
Posts: 73

mplayer video freezes when switching sound output

Hi,

I have recently move to pulseaudio to implement sound over wifi at home. I've got two laptops and a Raspberry Pi all with Arch on it. RPI works as pulseuadio server and laptops are clients. The setup works well on one laptop but not so well on the other.

To configure I followed the avahi zeroconf setup here:

https://wiki.archlinux.org/index.php/Pu … er_network

I've compared the configurations of both laptops and I am running out of ideas so I am going to make a bit of a mind dump here. Sorry. On laptop A everything is fine on B I can play music but mplayer freezes the moment I switch output inside pavucontrol. If I restart pulseaudio the video will play for a second and then freeze. Rewinding will make it work for a split second and then freeze on the next frame. I can hear the voice carry on.

The laptops are both Lenovos with the latest Arch on it. The biggest difference is probably nvidia card on the laptop A and onboard graphics on laptop B.

Please let me know if you have any ideas. Otherwise this configuration is great and I can both listen to music and watch films without and visible sound-video latency.

This is output from mplayer from laptop B:

libavformat version 58.20.100 (external)
Mismatching header version 58.12.100
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (opus), -aid 0, -alang eng
VIDEO:  [H264]  1280x720  0bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
Could not find a UTF-8 locale,
character keys beyond Latin-1 will not be handled.
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 58.35.100 (external)
Mismatching header version 58.18.100
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Clip info:
 COMPATIBLE_BRANDS: iso6avc1mp41
 MAJOR_BRAND: dash
 MINOR_VERSION: 0
 ENCODER: Lavf57.56.100
Load subtitles in videos/critical_thinking/
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 0.0 kbit/0.00% (ratio: 0->384000)
Selected audio codec: [ffopus] afm: ffmpeg (FFmpeg opus)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 1280x720 => 1280x720 Planar YV12 
A:   0.2 V:   0.3 A-V: -0.144 ct: -0.018   0/  0 ??% ??% ??,?% 0 0 

Offline

#2 2019-03-23 17:10:59

AlmostSurelyRob
Member
From: UK
Registered: 2012-03-17
Posts: 73

Re: mplayer video freezes when switching sound output

I have noticed one more difference between laptops. The moment I turn on avahi and the services are connected my upload speed shoots. On the laptop which works fine stopping the avahi will stop the upload, but on the other laptop which doesn't work I need to kill pulse to stop the upload.

I have compared

~/.mplayer/config
~/.asoundrc

And they all look identical. The former is empty, the latter states that pulse needs to take over.

Please let me know if you're aware of any other debugging steps I could try. Thanks.

Offline

#3 2019-08-10 12:18:00

AlmostSurelyRob
Member
From: UK
Registered: 2012-03-17
Posts: 73

Re: mplayer video freezes when switching sound output

Apologies if I am bumping this thread in violation of the rules, but I am still investigating this so I am just writing up my thoughts here.

So after some relatively recent update the situation inverted. Now the other laptop can view films and the first one doesn't. That is something of a relief as I know now it's something to do with the software rather than hardware, but still this is very confusing.

I have also tried VLC for comparison. On a laptop which works, VLC works as well. On the laptop which doesn't, VLC still works but sounds becomes noisy and disrupted.

Looking for ways to debug, would appreciate any feedback. Thanks.

Offline

#4 2019-08-10 12:30:11

AlmostSurelyRob
Member
From: UK
Registered: 2012-03-17
Posts: 73

Re: mplayer video freezes when switching sound output

Right, so sometimes writing up helps you ask the question you should have asked yourself... After going onto man pages of mplayer I discovered that if I run like this

mplayer -msglevel all=9

I can see some messages from decoding. I am playing some David Suchet's Poirot from my collection and what's happening is that the video stream appears completely dead. This is a vimdiff of a relevant passage:

FLIP_PAGE VID:9 -> OUT:5                                               |  FLIP_PAGE VID:9 -> OUT:5
  A:   0.0 V:   0.0 A-V:  0.026 ct:  0.000   0/  0 ??% ??% ??,?% 0 0 ^[[J|  A:   0.0 V:   0.0 A-V:  0.050 ct:  0.000   0/  0 ??% ??% ??,?% 0 0 ^[[J
  demux_lavf_fill_buffer()                                               |  demux_lavf_fill_buffer()
  demux_lavf_fill_buffer()                                               |  demux_lavf_fill_buffer()
  demux_lavf_fill_buffer()                                               |  demux_lavf_fill_buffer()
  demux_lavf_fill_buffer()                                               |  demux_lavf_fill_buffer()
  -----------------------------------------------------------------------|  vd_ffmpeg data: 13000000, 74619e01, bf42, 3000003                      
  -----------------------------------------------------------------------|  [h264 @ 0x7ff1dc0778c0]nal_unit_type: 1(Coded slice of a non-IDR pictur
  -----------------------------------------------------------------------|  VID CREATE: 10                                                         
  -----------------------------------------------------------------------|  DRAW_OSD                                                               
  -----------------------------------------------------------------------|                                                                         
  -----------------------------------------------------------------------|  FLIP_PAGE VID:10 -> OUT:6                                              
  -----------------------------------------------------------------------|  A:   0.1 V:   0.1 A-V:  0.000 ct:  0.000   0/  0 ??% ??% ??,?% 0 0 ^[[J
  -----------------------------------------------------------------------|  vd_ffmpeg data: 13000000, 6a639e01, bf42, 3000003                      
  -----------------------------------------------------------------------|  [h264 @ 0x7ff1dc0778c0]nal_unit_type: 1(Coded slice of a non-IDR pictur
  -----------------------------------------------------------------------|  VID CREATE: 11                                                         
  -----------------------------------------------------------------------|  DRAW_OSD                                                               
  -----------------------------------------------------------------------|          

The bit on the right is when the video is working as expected.

Offline

Board footer

Powered by FluxBB