Mailing List Archive

Long delay when starting playback
When I hit Play on a selected recording, there is a long delay, usually 10 to 20 seconds, before it actually starts to play. Once it a while it starts after only a second or two. Any ideas what could be causing that? OS is Trisquel 7 (Ubuntu 14 derivative) with kernel 3.13. MythTV Version is v0.27-193-g8ee257c.

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: Long delay when starting playback [ In reply to ]
First always check mythtv logs. Also check cpu process at start. If you
open same file with vlc does it also delay?

On 13/06/2017 14:12, "Austin Green" <austin.green@orcon.net.nz> wrote:

When I hit Play on a selected recording, there is a long delay, usually 10
to 20 seconds, before it actually starts to play. Once it a while it
starts after only a second or two. Any ideas what could be causing that?
OS is Trisquel 7 (Ubuntu 14 derivative) with kernel 3.13. MythTV Version
is v0.27-193-g8ee257c.

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: Long delay when starting playback [ In reply to ]
Austin Green wrote:
> When I hit Play on a selected recording, there is a long delay, usually 10
> to 20 seconds, before it actually starts to play. Once it a while it
> starts after only a second or two. Any ideas what could be causing that?
> OS is Trisquel 7 (Ubuntu 14 derivative) with kernel 3.13. MythTV Version
> is v0.27-193-g8ee257c.

Tail the log file on both the front and backends while hitting play in
another window.

I'd guess its waiting for something like audio.



--
Criggie

http://criggie.org.nz/




_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: Long delay when starting playback [ In reply to ]
On Tue, 13 Jun 2017 14:12:27 +1200, you wrote:

>When I hit Play on a selected recording, there is a long delay, usually 10 to 20 seconds, before it actually starts to play. Once it a while it starts after only a second or two. Any ideas what could be causing that? OS is Trisquel 7 (Ubuntu 14 derivative) with kernel 3.13. MythTV Version is v0.27-193-g8ee257c.

That happens for me when the file is on a hard drive that needs to
spin up. Do you have any recording drives that spin down to save
power?

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: Long delay when starting playback [ In reply to ]
On Tue, 13 Jun 2017 17:18:25 +1200
"Criggie" <criggie@criggie.org.nz> wrote:
> Austin Green wrote:
> > When I hit Play on a selected recording, there is a long delay, usually 10
> > to 20 seconds, before it actually starts to play. Once it a while it
> > starts after only a second or two. Any ideas what could be causing that?
> > OS is Trisquel 7 (Ubuntu 14 derivative) with kernel 3.13. MythTV Version
> > is v0.27-193-g8ee257c.
>
> I'd guess its waiting for something like audio.
> --
> Criggie

I think you may be on to it there, Criggie. See frontend log extract:

16:55:55 : I CoreContext tv_play.cpp:2201 (HandleStateChange) TV: Attempting to change from None to WatchingPreRecorded
16:55:55 : E CoreContext audio/audiooutputalsa.cpp:172 (GetPCMInfo) ALSA: snd_pcm_info_get_card: Operation not permitted
16:55:55 : N CoreContext audioplayer.cpp:164 (ReinitAudio) AudioPlayer: Enabling Audio
16:55:55 : I CoreContext avformatdecoder.cpp:1898 (ScanStreams) AFD: codec MP2 has 2 channels
16:55:55 : I CoreContext avformatdecoder.cpp:2378 (OpenAVCodec) AFD: Opened codec 0x38723a0, id(MP2) type(Audio)
16:55:55 : I CoreContext avformatdecoder.cpp:2378 (OpenAVCodec) AFD: Opened codec 0xc935900, id(MPEG2VIDEO) type(Video)
16:55:55 : I CoreContext audio/audiooutputbase.cpp:792 (Reconfigure) AOBase: Opening audio device 'default' ch 2(2) sr 48000 sf 32 bit floating point reenc 0
16:56:20 : I CoreContext signalhandling.cpp:194 (SetHandlerPrivate) Setup Interrupt handler

There is a 25-second gap in the log after the attempt to open the audio device; the process just seems to be hanging there.

Any ideas on cause, or suggestions to fix?

Cheers,
Austin.

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: Long delay when starting playback [ In reply to ]
On Tue, Jun 20, 2017 at 5:07 PM, Austin Green <austin.green@orcon.net.nz>
wrote:

> On Tue, 13 Jun 2017 17:18:25 +1200
> "Criggie" <criggie@criggie.org.nz> wrote:
> > Austin Green wrote:
> > > When I hit Play on a selected recording, there is a long delay,
> usually 10
> > > to 20 seconds, before it actually starts to play. Once it a while it
> > > starts after only a second or two. Any ideas what could be causing
> that?
> > > OS is Trisquel 7 (Ubuntu 14 derivative) with kernel 3.13. MythTV
> Version
> > > is v0.27-193-g8ee257c.
> >
> > I'd guess its waiting for something like audio.
> > --
> > Criggie
>
> I think you may be on to it there, Criggie. See frontend log extract:
>
> 16:55:55 : I CoreContext tv_play.cpp:2201 (HandleStateChange) TV:
> Attempting to change from None to WatchingPreRecorded
> 16:55:55 : E CoreContext audio/audiooutputalsa.cpp:172 (GetPCMInfo) ALSA:
> snd_pcm_info_get_card: Operation not permitted
> 16:55:55 : N CoreContext audioplayer.cpp:164 (ReinitAudio) AudioPlayer:
> Enabling Audio
> 16:55:55 : I CoreContext avformatdecoder.cpp:1898 (ScanStreams) AFD: codec
> MP2 has 2 channels
> 16:55:55 : I CoreContext avformatdecoder.cpp:2378 (OpenAVCodec) AFD:
> Opened codec 0x38723a0, id(MP2) type(Audio)
> 16:55:55 : I CoreContext avformatdecoder.cpp:2378 (OpenAVCodec) AFD:
> Opened codec 0xc935900, id(MPEG2VIDEO) type(Video)
> 16:55:55 : I CoreContext audio/audiooutputbase.cpp:792 (Reconfigure)
> AOBase: Opening audio device 'default' ch 2(2) sr 48000 sf 32 bit floating
> point reenc 0
> 16:56:20 : I CoreContext signalhandling.cpp:194 (SetHandlerPrivate) Setup
> Interrupt handler
>
> There is a 25-second gap in the log after the attempt to open the audio
> device; the process just seems to be hanging there.
>
> Any ideas on cause, or suggestions to fix?
>
> Cheers,
> Austin.
>

Do you have pulseaudio installed?
Re: Long delay when starting playback [ In reply to ]
On Tue, 20 Jun 2017 17:47:16 +1200
Nick Rout <nick.rout@gmail.com> wrote:

> On Tue, Jun 20, 2017 at 5:07 PM, Austin Green <austin.green@orcon.net.nz>
> wrote:
>
> > On Tue, 13 Jun 2017 17:18:25 +1200
> > "Criggie" <criggie@criggie.org.nz> wrote:
> > > Austin Green wrote:
> > > > When I hit Play on a selected recording, there is a long delay,
> > > > usually 10 to 20 seconds, before it actually starts to play.
> > >
> > > I'd guess its waiting for something like audio.
> > > --
> > > Criggie
> >
> > I think you may be on to it there, Criggie. See frontend log extract:
> >
> > 16:55:55 : I CoreContext tv_play.cpp:2201 (HandleStateChange) TV:
> > Attempting to change from None to WatchingPreRecorded
> > 16:55:55 : E CoreContext audio/audiooutputalsa.cpp:172 (GetPCMInfo) ALSA:
> > snd_pcm_info_get_card: Operation not permitted
> > 16:55:55 : N CoreContext audioplayer.cpp:164 (ReinitAudio) AudioPlayer:
> > Enabling Audio
> > 16:55:55 : I CoreContext avformatdecoder.cpp:1898 (ScanStreams) AFD: codec
> > MP2 has 2 channels
> > 16:55:55 : I CoreContext avformatdecoder.cpp:2378 (OpenAVCodec) AFD:
> > Opened codec 0x38723a0, id(MP2) type(Audio)
> > 16:55:55 : I CoreContext avformatdecoder.cpp:2378 (OpenAVCodec) AFD:
> > Opened codec 0xc935900, id(MPEG2VIDEO) type(Video)
> > 16:55:55 : I CoreContext audio/audiooutputbase.cpp:792 (Reconfigure)
> > AOBase: Opening audio device 'default' ch 2(2) sr 48000 sf 32 bit floating
> > point reenc 0
> > 16:56:20 : I CoreContext signalhandling.cpp:194 (SetHandlerPrivate) Setup
> > Interrupt handler
> >
> > There is a 25-second gap in the log after the attempt to open the audio
> > device; the process just seems to be hanging there.
> >
> > Any ideas on cause, or suggestions to fix?
> >
> > Cheers,
> > Austin.
> >
>
> Do you have pulseaudio installed?

Yes; how would that cause a problem?

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: Long delay when starting playback [ In reply to ]
On Tue, Jun 20, 2017 at 10:12 PM, Austin Green <austin.green@orcon.net.nz>
wrote:

> On Tue, 20 Jun 2017 17:47:16 +1200
> Nick Rout <nick.rout@gmail.com> wrote:
>
> > On Tue, Jun 20, 2017 at 5:07 PM, Austin Green <austin.green@orcon.net.nz
> >
> > wrote:
> >
> > > On Tue, 13 Jun 2017 17:18:25 +1200
> > > "Criggie" <criggie@criggie.org.nz> wrote:
> > > > Austin Green wrote:
> > > > > When I hit Play on a selected recording, there is a long delay,
> > > > > usually 10 to 20 seconds, before it actually starts to play.
> > > >
> > > > I'd guess its waiting for something like audio.
> > > > --
> > > > Criggie
> > >
> > > I think you may be on to it there, Criggie. See frontend log extract:
> > >
> > > 16:55:55 : I CoreContext tv_play.cpp:2201 (HandleStateChange) TV:
> > > Attempting to change from None to WatchingPreRecorded
> > > 16:55:55 : E CoreContext audio/audiooutputalsa.cpp:172 (GetPCMInfo)
> ALSA:
> > > snd_pcm_info_get_card: Operation not permitted
> > > 16:55:55 : N CoreContext audioplayer.cpp:164 (ReinitAudio) AudioPlayer:
> > > Enabling Audio
> > > 16:55:55 : I CoreContext avformatdecoder.cpp:1898 (ScanStreams) AFD:
> codec
> > > MP2 has 2 channels
> > > 16:55:55 : I CoreContext avformatdecoder.cpp:2378 (OpenAVCodec) AFD:
> > > Opened codec 0x38723a0, id(MP2) type(Audio)
> > > 16:55:55 : I CoreContext avformatdecoder.cpp:2378 (OpenAVCodec) AFD:
> > > Opened codec 0xc935900, id(MPEG2VIDEO) type(Video)
> > > 16:55:55 : I CoreContext audio/audiooutputbase.cpp:792 (Reconfigure)
> > > AOBase: Opening audio device 'default' ch 2(2) sr 48000 sf 32 bit
> floating
> > > point reenc 0
> > > 16:56:20 : I CoreContext signalhandling.cpp:194 (SetHandlerPrivate)
> Setup
> > > Interrupt handler
> > >
> > > There is a 25-second gap in the log after the attempt to open the audio
> > > device; the process just seems to be hanging there.
> > >
> > > Any ideas on cause, or suggestions to fix?
> > >
> > > Cheers,
> > > Austin.
> > >
> >
> > Do you have pulseaudio installed?
>
> Yes; how would that cause a problem?
>

It may interfere with alsa, which is where you seem to be trying to ouput
your audio.

It is a long time since I used mythfrontend, is there an option to output
audio to pulseaudio?
Re: Long delay when starting playback [ In reply to ]
On Wed, 21 Jun 2017 10:09:42 +1200
Nick Rout <nick.rout@gmail.com> wrote:

> On Tue, Jun 20, 2017 at 10:12 PM, Austin Green <austin.green@orcon.net.nz>
> wrote:
>
> > On Tue, 20 Jun 2017 17:47:16 +1200
> > Nick Rout <nick.rout@gmail.com> wrote:
> >
> > > On Tue, Jun 20, 2017 at 5:07 PM, Austin Green <austin.green@orcon.net.nz
> > >
> > > wrote:
> > >
> > > > On Tue, 13 Jun 2017 17:18:25 +1200
> > > > "Criggie" <criggie@criggie.org.nz> wrote:
> > > > > Austin Green wrote:
> > > > > > When I hit Play on a selected recording, there is a long delay,
> > > > > > usually 10 to 20 seconds, before it actually starts to play.
> > > > >
> > > > > I'd guess its waiting for something like audio.
> > > > > --
> > > > > Criggie
> > > >
> > > > I think you may be on to it there, Criggie. See frontend log extract:
> > > >
> > > > 16:55:55 : I CoreContext tv_play.cpp:2201 (HandleStateChange) TV:
> > > > Attempting to change from None to WatchingPreRecorded
> > > > 16:55:55 : E CoreContext audio/audiooutputalsa.cpp:172 (GetPCMInfo)
> > ALSA:
> > > > snd_pcm_info_get_card: Operation not permitted
> > > > 16:55:55 : N CoreContext audioplayer.cpp:164 (ReinitAudio) AudioPlayer:
> > > > Enabling Audio
> > > > 16:55:55 : I CoreContext avformatdecoder.cpp:1898 (ScanStreams) AFD:
> > codec
> > > > MP2 has 2 channels
> > > > 16:55:55 : I CoreContext avformatdecoder.cpp:2378 (OpenAVCodec) AFD:
> > > > Opened codec 0x38723a0, id(MP2) type(Audio)
> > > > 16:55:55 : I CoreContext avformatdecoder.cpp:2378 (OpenAVCodec) AFD:
> > > > Opened codec 0xc935900, id(MPEG2VIDEO) type(Video)
> > > > 16:55:55 : I CoreContext audio/audiooutputbase.cpp:792 (Reconfigure)
> > > > AOBase: Opening audio device 'default' ch 2(2) sr 48000 sf 32 bit
> > floating
> > > > point reenc 0
> > > > 16:56:20 : I CoreContext signalhandling.cpp:194 (SetHandlerPrivate)
> > Setup
> > > > Interrupt handler
> > > >
> > > > There is a 25-second gap in the log after the attempt to open the audio
> > > > device; the process just seems to be hanging there.
> > > >
> > > > Any ideas on cause, or suggestions to fix?
> > > >
> > > > Cheers,
> > > > Austin.
> > > >
> > >
> > > Do you have pulseaudio installed?
> >
> > Yes; how would that cause a problem?
> >
>
> It may interfere with alsa, which is where you seem to be trying to ouput
> your audio.
>
> It is a long time since I used mythfrontend, is there an option to output
> audio to pulseaudio?

Yes, the output device was set to 'PulseAudio:default'.
I changed it to 'alsa:pulse' and set up the alsa default device to be 'pulse',
and now the delay seems to have gone away.

Many thanks to all who suggested where to look.

Cheers,
Austin.

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: Long delay when starting playback [ In reply to ]
On Wed, Jun 21, 2017 at 2:15 PM, Austin Green <austin.green@orcon.net.nz>
wrote:

> On Wed, 21 Jun 2017 10:09:42 +1200
> Nick Rout <nick.rout@gmail.com> wrote:
>
> > On Tue, Jun 20, 2017 at 10:12 PM, Austin Green <
> austin.green@orcon.net.nz>
> > wrote:
> >
> > > On Tue, 20 Jun 2017 17:47:16 +1200
> > > Nick Rout <nick.rout@gmail.com> wrote:
> > >
> > > > On Tue, Jun 20, 2017 at 5:07 PM, Austin Green <
> austin.green@orcon.net.nz
> > > >
> > > > wrote:
> > > >
> > > > > On Tue, 13 Jun 2017 17:18:25 +1200
> > > > > "Criggie" <criggie@criggie.org.nz> wrote:
> > > > > > Austin Green wrote:
> > > > > > > When I hit Play on a selected recording, there is a long delay,
> > > > > > > usually 10 to 20 seconds, before it actually starts to play.
> > > > > >
> > > > > > I'd guess its waiting for something like audio.
> > > > > > --
> > > > > > Criggie
> > > > >
> > > > > I think you may be on to it there, Criggie. See frontend log
> extract:
> > > > >
> > > > > 16:55:55 : I CoreContext tv_play.cpp:2201 (HandleStateChange) TV:
> > > > > Attempting to change from None to WatchingPreRecorded
> > > > > 16:55:55 : E CoreContext audio/audiooutputalsa.cpp:172 (GetPCMInfo)
> > > ALSA:
> > > > > snd_pcm_info_get_card: Operation not permitted
> > > > > 16:55:55 : N CoreContext audioplayer.cpp:164 (ReinitAudio)
> AudioPlayer:
> > > > > Enabling Audio
> > > > > 16:55:55 : I CoreContext avformatdecoder.cpp:1898 (ScanStreams)
> AFD:
> > > codec
> > > > > MP2 has 2 channels
> > > > > 16:55:55 : I CoreContext avformatdecoder.cpp:2378 (OpenAVCodec)
> AFD:
> > > > > Opened codec 0x38723a0, id(MP2) type(Audio)
> > > > > 16:55:55 : I CoreContext avformatdecoder.cpp:2378 (OpenAVCodec)
> AFD:
> > > > > Opened codec 0xc935900, id(MPEG2VIDEO) type(Video)
> > > > > 16:55:55 : I CoreContext audio/audiooutputbase.cpp:792
> (Reconfigure)
> > > > > AOBase: Opening audio device 'default' ch 2(2) sr 48000 sf 32 bit
> > > floating
> > > > > point reenc 0
> > > > > 16:56:20 : I CoreContext signalhandling.cpp:194 (SetHandlerPrivate)
> > > Setup
> > > > > Interrupt handler
> > > > >
> > > > > There is a 25-second gap in the log after the attempt to open the
> audio
> > > > > device; the process just seems to be hanging there.
> > > > >
> > > > > Any ideas on cause, or suggestions to fix?
> > > > >
> > > > > Cheers,
> > > > > Austin.
> > > > >
> > > >
> > > > Do you have pulseaudio installed?
> > >
> > > Yes; how would that cause a problem?
> > >
> >
> > It may interfere with alsa, which is where you seem to be trying to ouput
> > your audio.
> >
> > It is a long time since I used mythfrontend, is there an option to output
> > audio to pulseaudio?
>
> Yes, the output device was set to 'PulseAudio:default'.
> I changed it to 'alsa:pulse' and set up the alsa default device to be
> 'pulse',
> and now the delay seems to have gone away.
>
> Many thanks to all who suggested where to look.
>

Cheers :)


>
> Cheers,
> Austin.
>
> _______________________________________________
> mythtvnz mailing list
> mythtvnz@lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/mythtvnz
> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
>
Re: Long delay when starting playback [ In reply to ]
Ooops!

On Tue, Jun 20, 2017 at 5:07 PM, Austin Green <austin.green@orcon.net.nz> wrote:
> Yes, the output device was set to 'PulseAudio:default'.
> I changed it to 'alsa:pulse' and set up the alsa default device to be
> 'pulse', and now the delay seems to have gone away.

Spoke too soon! The delay is still there, sometimes up to 30 seconds.
Same message in the log about opening device 'default'; no errors reported.

I've had endless trouble setting up GNU/Linux audio to behave,
and it seems to be still not quite there.

Sounds as though PulseAudio may be the culprit, so I'd interested to hear from anyone
who has audio working nicely, with or without PulseAudio.

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/