[mythtv-users] Video frame buffering failed too many times [0.26-fixes]

Andréas Kühne andreas at kuhne.se
Sat Jan 5 23:36:27 UTC 2013


Hi Josu,

I think you are experiencing the same problem as I had. As far as I can
understand it, the command doesn't work when the card is being used, thats
why I moved the command to /etc/rc.local. That way the command will be run
on startup BEFORE the mythfrontend is started. It worked for me at least.

I just added :  echo 32768 > /proc/asound/card1/pcm7p/sub0/prealloc to my
rc.local ABOVE the exit 0 statement.

Regards,

Andréas


2013/1/6 Josu Lazkano <josu.lazkano at gmail.com>

> 2013/1/6 Andréas Kühne <andreas at kuhne.se>:
> > Thanks Igor,
> >
> > I move the setting to /etc/rc.local (which is always run after startup)
> and
> > now it is set to the max value, just as yours is.
> >
> > // Andréas
> >
> >
> > 2013/1/5 Igor Cicimov <icicimov at gmail.com>
> >>
> >>
> >> On Sun, Jan 6, 2013 at 9:44 AM, Andréas Kühne <andreas at kuhne.se> wrote:
> >>>
> >>> I checked now again.
> >>>
> >>> I tried to set the max value (as you indicated below), but after
> setting
> >>> the value and then trying to read the value again, it doesn't work. The
> >>> default value is reset.
> >>>
> >>> I am also using Mythbuntu (version 12.04, myth 0.26)
> >>>
> >>> // Andréas
> >>>
> >>
> >> This is what mine is set to atm:
> >>
> >> igorc at mythtv:~$ cat /proc/asound/card1/pcm3p/sub0/prealloc
> >> 32768
> >>
> >> This is mine startup script, sorry I was wrong it is not set in the user
> >> login but as system init script:
> >>
> >> igorc at mythtv:~$ cat /etc/init.d/sound_card_buffer_prealloc
> >> #!/bin/bash
> >>
> >> [ -f /proc/asound/card1/pcm3p/sub0/prealloc ] && echo 32768 >
> >> /proc/asound/card1/pcm3p/sub0/prealloc
> >> [ -f /proc/asound/card0/pcm3p/sub0/prealloc ] && echo 32768 >
> >> /proc/asound/card0/pcm3p/sub0/prealloc
> >> [ -f /proc/asound/card2/pcm3p/sub0/prealloc ] && echo 32768 >
> >> /proc/asound/card2/pcm3p/sub0/prealloc
> >>
> >> I have to check for 3 devices since ALSA constantly changes my device
> >> order (still no idea why).
> >>
> >> This is the structure and permissions on my sound directory:
> >>
> >> igorc at mythtv:~$ ls -l /proc/asound/
> >> total 0
> >> dr-xr-xr-x 7 root root 0 Jan  6 09:51 card0
> >> dr-xr-xr-x 3 root root 0 Jan  6 09:51 card1
> >> dr-xr-xr-x 3 root root 0 Jan  6 09:51 card2
> >> -r--r--r-- 1 root root 0 Jan  6 09:51 cards
> >> lrwxrwxrwx 1 root root 5 Jan  6 09:51 CX8811 -> card2
> >> -r--r--r-- 1 root root 0 Jan  6 09:51 devices
> >> lrwxrwxrwx 1 root root 5 Jan  6 09:51 Generic -> card1
> >> -r--r--r-- 1 root root 0 Jan  6 09:51 hwdep
> >> -r--r--r-- 1 root root 0 Jan  6 09:51 modules
> >> dr-xr-xr-x 2 root root 0 Jan  6 09:51 oss
> >> -r--r--r-- 1 root root 0 Jan  6 09:51 pcm
> >> lrwxrwxrwx 1 root root 5 Jan  6 09:51 SB -> card0
> >> dr-xr-xr-x 2 root root 0 Jan  6 09:51 seq
> >> -r--r--r-- 1 root root 0 Jan  6 09:51 timers
> >> -r--r--r-- 1 root root 0 Jan  6 09:51 version
> >> igorc at mythtv:~$ ls -l /proc/asound/card1
> >> total 0
> >> -r--r--r-- 1 root root 0 Jan  6 09:51 codec#0
> >> -rw-r--r-- 1 root root 0 Jan  6 09:51 eld#0.0
> >> -r--r--r-- 1 root root 0 Jan  6 09:51 id
> >> dr-xr-xr-x 3 root root 0 Jan  6 09:51 pcm3p
> >> igorc at mythtv:~$ ls -l /proc/asound/card1/pcm3p/
> >> total 0
> >> -r--r--r-- 1 root root 0 Jan  6 09:52 info
> >> dr-xr-xr-x 2 root root 0 Jan  6 09:52 sub0
> >> igorc at mythtv:~$ ls -l /proc/asound/card1/pcm3p/sub0/
> >> total 0
> >> -r--r--r-- 1 root root 0 Jan  6 09:52 hw_params
> >> -r--r--r-- 1 root root 0 Jan  6 09:52 info
> >> -rw-r--r-- 1 root root 0 Jan  6 09:52 prealloc
> >> -r--r--r-- 1 root root 0 Jan  6 09:52 prealloc_max
> >> -r--r--r-- 1 root root 0 Jan  6 09:52 status
> >> -r--r--r-- 1 root root 0 Jan  6 09:52 sw_params
> >>
> >>  I'm using the HDMI output to Sony 32" HD TV, card1 device3.
> >>
> >>
> >>>
> >>> 2013/1/5 Igor Cicimov <icicimov at gmail.com>
> >>>>
> >>>> On Sun, Jan 6, 2013 at 9:20 AM, Andréas Kühne <andreas at kuhne.se>
> wrote:
> >>>>>
> >>>>> I have tried setting the following as well, however the setting never
> >>>>> changes. Also, how would I set it so that the change is permanent
> after each
> >>>>> restart?
> >>>>>
> >>>>> Regards,
> >>>>>
> >>>>> Andréas
> >>>>>
> >>>>
> >>>> Hmmm works for me in Mythbuntu. I have it in startup script after ALSA
> >>>> gets initiated and the mythtv user gets auto logged in. I set it to
> 32768
> >>>> though which is the max value for my device (found in
> >>>> /proc/asound/card0/pcm0p/sub0/max_prealloc file)
> >>>>
> >>>>>
> >>>>> 2013/1/5 Igor Cicimov <icicimov at gmail.com>
> >>>>>>
> >>>>>> On Sun, Jan 6, 2013 at 8:47 AM, Igor Cicimov <icicimov at gmail.com>
> >>>>>> wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>> On 06/01/2013 7:51 AM, "Stephen Robertson"
> >>>>>>> <stephengrobertson at gmail.com> wrote:
> >>>>>>> >
> >>>>>>> > Hi all,
> >>>>>>> >
> >>>>>>> > I'm getting this error when watching live TV.  I don't think I
> ever
> >>>>>>> > see this watching recorded or in progress recordings.
> >>>>>>> >
> >>>>>>> > I've searched the archives and found references to this but they
> >>>>>>> > seem
> >>>>>>> > to be from some time ago so I'm not sure whether this is a known
> >>>>>>> > problem or whether it was thought to be fixed.
> >>>>>>> >
> >>>>>>> > As far as I can tell it seems to happen a few minutes after the
> >>>>>>> > program has changed (Not the channel, this happens with no user
> >>>>>>> > action).
> >>>>>>> >
> >>>>>>> > This is on a standalone FE connected via gigabit ethernet
> >>>>>>> >
> >>>>>>> > Any thoughts/suggestions welcome.
> >>>>>>> >
> >>>>>>> > Stephen
> >>>>>>> >
> >>>>>>>
> >>>>>>> Is the problem showing on all channels or only SD or only HD? All
> >>>>>>> stations or one specific? Looks like sound decoding error causing
> the video
> >>>>>>> playback to back off waiting for the sound.
> >>>>>>>
> >>>>>>> > Logs at:
> >>>>>>> > http://pastebin.com/nCzZAdcy
> >>>>>>> > http://pastebin.com/0WbCRLBi
> >>>>>>> >
> >>>>>>> > MythTV Version : v0.26.0-55-g09ac5b2
> >>>>>>> > MythTV Branch : fixes/0.26
> >>>>>>> > Network Protocol : 75
> >>>>>>> > Library API : 0.26.20120822-1
> >>>>>>> > QT Version : 4.8.1
> >>>>>>> > Options compiled in:
> >>>>>>> >  linux profile use_hidesyms using_alsa using_oss using_pulse
> >>>>>>> > using_pulseoutput using_backend using_bindings_perl
> >>>>>>> > using_bindings_python using_bindings_php using_crystalhd
> using_dvb
> >>>>>>> > using_firewire using_frontend using_hdhomerun using_ceton
> >>>>>>> > using_hdpvr
> >>>>>>> > using_iptv using_ivtv using_joystick_menu using_libcec
> >>>>>>> > using_libcrypto
> >>>>>>> > using_libdns_sd using_libxml2 using_lirc using_mheg
> >>>>>>> > using_opengl_video
> >>>>>>> > using_qtwebkit using_qtscript using_qtdbus using_v4l2 using_x11
> >>>>>>> > using_xrandr using_xv using_bindings_perl using_bindings_python
> >>>>>>> > using_bindings_php using_mythtranscode using_opengl using_vaapi
> >>>>>>> > using_vdpau using_ffmpeg_threads using_live using_mheg
> using_libass
> >>>>>>> > using_libxml2
> >>>>>>> > _______________________________________________
> >>>>>>> > mythtv-users mailing list
> >>>>>>> > mythtv-users at mythtv.org
> >>>>>>> > http://www.mythtv.org/mailman/listinfo/mythtv-users
> >>>>>>
> >>>>>> CoreContext audio/audiooutputalsa.cpp:242 (IncPreallocBufferSize)
> >>>>>> ALSA: Try to manually increase audio buffer with: echo 128 | sudo
> tee
> >>>>>> /proc/asound/card0/pcm0p/sub0/prealloc
> >>>>>> Jan  5 10:38:58 revo01 mythlogserver: mythfrontend[1714]: I
> >>>>>> CoreContext mythpainter_ogl.cpp:62 (ClearCache) Clearing OpenGL
> painter
> >>>>>> cache.
> >>>>>>
> >>>>>> Yeah have seen this before the sound buffer is set too low. Do as
> the
> >>>>>> error message say:
> >>>>>>
> >>>>>> $ echo 4096 | sudo tee /proc/asound/card0/pcm0p/sub0/prealloc
> >>>>>>
> >>>>>> with 4096 instead 128 to be on the safe side and see if the error
> goes
> >>>>>> away.
> >>>>>>
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> mythtv-users mailing list
> >>>>>> mythtv-users at mythtv.org
> >>>>>> http://www.mythtv.org/mailman/listinfo/mythtv-users
> >>>>>>
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> mythtv-users mailing list
> >>>>> mythtv-users at mythtv.org
> >>>>> http://www.mythtv.org/mailman/listinfo/mythtv-users
> >>>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> mythtv-users mailing list
> >>>> mythtv-users at mythtv.org
> >>>> http://www.mythtv.org/mailman/listinfo/mythtv-users
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> vänliga hälsningar,
> >>>
> >>> Andréas
> >>>
> >>> Upplandsgatan 93 . 113 44 . Stockholm
> >>> Mobil 076 543 8825
> >>> andreas at kuhne.se
> >>>
> >>> _______________________________________________
> >>> mythtv-users mailing list
> >>> mythtv-users at mythtv.org
> >>> http://www.mythtv.org/mailman/listinfo/mythtv-users
> >>>
> >>
> >>
> >> _______________________________________________
> >> mythtv-users mailing list
> >> mythtv-users at mythtv.org
> >> http://www.mythtv.org/mailman/listinfo/mythtv-users
> >>
> >
> >
> >
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://www.mythtv.org/mailman/listinfo/mythtv-users
> >
>
> Hello, I have same problem with buffers. I have this message on the
> mythfrontend log:
>
> Jan  6 00:19:58 telemedia  mythfrontend[3192]: E CoreContext
> audio/audiooutputalsa.cpp:242 (IncPreallocBufferSize) ALSA: Try to
> manually increase audio buffer with: echo 128 | sudo tee
> /proc/asound/card1/pcm7p/sub0/prealloc
>
>
> I add to mythtv user on sudoers file:
>
> mythuser ALL=(ALL) NOPASSWD:/usr/bin/tee
> /proc/asound/card1/pcm7p/sub0/prealloc
>
> The problem is that when I execute the command there is no change on
> the prealloc file:
>
> $ cat /proc/asound/card1/pcm7p/sub0/prealloc
> 64
> $ echo 128 | sudo tee /proc/asound/card1/pcm7p/sub0/prealloc
> 128
> $ cat /proc/asound/card1/pcm7p/sub0/prealloc
> 64
>
> I try with this, but nothing:
>
> # echo 128 > /proc/asound/card1/pcm7p/sub0/prealloc
>
> Do this command really change the prealloc file?
>
> Thanks and best regards.
>
> --
> Josu Lazkano
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130106/db729fc4/attachment-0001.html>


More information about the mythtv-users mailing list