Mailing List Archive

Time stretch audio skipping
Hi,

I'm down to my last couple of minor issues. Thanks for the help so far!

I have audio set to alsa:default. Above about 1.1x time stretch there is
some noticeable skipping/clicking in recorded playback audio. I have not
had this issue with mplayer which also uses alsa. Admittedly this is a
pretty minor.

Ubuntu audio has been fairly well behaved for the last few years, but
earlier experience tells me this can be a real can of worms.

Log attached.

Am I missing something obvious?

Aaron.
Re: Time stretch audio skipping [ In reply to ]
On Mon, May 26, 2014 at 2:40 PM, Aaron Pelly <apelly@monkeymasters.co.nz>wrote:

> Hi,
>
> I'm down to my last couple of minor issues. Thanks for the help so far!
>
> I have audio set to alsa:default. Above about 1.1x time stretch there is
> some noticeable skipping/clicking in recorded playback audio. I have not
> had this issue with mplayer which also uses alsa. Admittedly this is a
> pretty minor.
>
> Ubuntu audio has been fairly well behaved for the last few years, but
> earlier experience tells me this can be a real can of worms.
>
> Log attached.
>
> Am I missing something obvious?
>

What's you CPU usage like when timestretch is 1.2? You're getting buffer
underruns so Myth is not supplying data to ALSA fast enough.

Cheers,
Steve
Re: Time stretch audio skipping [ In reply to ]
On 26 May 2014 15:30, Steve Hodge <stevehodge@gmail.com> wrote:

> On Mon, May 26, 2014 at 2:40 PM, Aaron Pelly <apelly@monkeymasters.co.nz>wrote:
>
>> Hi,
>>
>> I'm down to my last couple of minor issues. Thanks for the help so far!
>>
>> I have audio set to alsa:default. Above about 1.1x time stretch there is
>> some noticeable skipping/clicking in recorded playback audio. I have not
>> had this issue with mplayer which also uses alsa. Admittedly this is a
>> pretty minor.
>>
>> Ubuntu audio has been fairly well behaved for the last few years, but
>> earlier experience tells me this can be a real can of worms.
>>
>> Log attached.
>>
>> Am I missing something obvious?
>>
>
> What's you CPU usage like when timestretch is 1.2? You're getting buffer
> underruns so Myth is not supplying data to ALSA fast enough.
>

Agree, I have only seen this on underpowered frontends or where the VDPAU
hasn't been enabled in playback profiles.
http://www.mythtv.org/wiki/VDPAU#Enabling_VDPAU_in_MythFrontend
Re: Time stretch audio skipping [ In reply to ]
On 26/05/14 16:43, Duncan Kennington wrote:
> On 26 May 2014 15:30, Steve Hodge <stevehodge@gmail.com
> <mailto:stevehodge@gmail.com>> wrote:
>
> On Mon, May 26, 2014 at 2:40 PM, Aaron Pelly
> <apelly@monkeymasters.co.nz <mailto:apelly@monkeymasters.co.nz>>
> wrote:
>
> Hi,
>
> I'm down to my last couple of minor issues. Thanks for the
> help so far!
>
> I have audio set to alsa:default. Above about 1.1x time
> stretch there is some noticeable skipping/clicking in recorded
> playback audio. I have not had this issue with mplayer which
> also uses alsa. Admittedly this is a pretty minor.
>
> Ubuntu audio has been fairly well behaved for the last few
> years, but earlier experience tells me this can be a real can
> of worms.
>
> Log attached.
>
> Am I missing something obvious?
>
>
> What's you CPU usage like when timestretch is 1.2? You're getting
> buffer underruns so Myth is not supplying data to ALSA fast enough.
>
>
> Agree, I have only seen this on underpowered frontends or where the
> VDPAU hasn't been enabled in playback profiles.
> http://www.mythtv.org/wiki/VDPAU#Enabling_VDPAU_in_MythFrontend
CPU use is negligible.

Broad specs gleaned from lshw:

description: Motherboard
product: Z87X-D3H-CF
vendor: Gigabyte Technology Co., Ltd.

description: System Memory
size: 16GiB

description: CPU
product: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz

description: VGA compatible controller
product: GK110 [GeForce GTX 780]

VDPAU is in use.

It is possible the on-board sound is some shit chipset:

00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series
Chipset High Definition Audio Controller (rev 04)
Subsystem: Gigabyte Technology Co., Ltd Device a002
Flags: bus master, fast devsel, latency 0, IRQ 46
Memory at f3130000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel

I admit I'm on the fringes of my comprehension here, but is it possible
that I've got some issue or conflict with Nvidia/Intel sound?
Re: Time stretch audio skipping [ In reply to ]
On 27 May 2014 07:24, Aaron Pelly <apelly@monkeymasters.co.nz> wrote:

> Agree, I have only seen this on underpowered frontends or where the VDPAU
> hasn't been enabled in playback profiles.
> http://www.mythtv.org/wiki/VDPAU#Enabling_VDPAU_in_MythFrontend
>
> CPU use is negligible.
>
> Broad specs gleaned from lshw:
>
> description: Motherboard
> product: Z87X-D3H-CF
> vendor: Gigabyte Technology Co., Ltd.
>
> description: System Memory
> size: 16GiB
>
> description: CPU
> product: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
>
> description: VGA compatible controller
> product: GK110 [GeForce GTX 780]
>
> VDPAU is in use.
>
> It is possible the on-board sound is some shit chipset:


Without seeing the myth log, it will be impossible to tell

start mythfrontend with -v audio,playback --loglevel=debug

is this a remote frontend or combined frontend/backend?

_______________________________________________
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: Time stretch audio skipping [ In reply to ]
On Tue, May 27, 2014 at 9:24 AM, Aaron Pelly <apelly@monkeymasters.co.nz> wrote:
> On 26/05/14 16:43, Duncan Kennington wrote:
>
> On 26 May 2014 15:30, Steve Hodge <stevehodge@gmail.com> wrote:
>>
>> On Mon, May 26, 2014 at 2:40 PM, Aaron Pelly <apelly@monkeymasters.co.nz>
>> wrote:
>>>
>>> Hi,
>>>
>>> I'm down to my last couple of minor issues. Thanks for the help so far!
>>>
>>> I have audio set to alsa:default. Above about 1.1x time stretch there is
>>> some noticeable skipping/clicking in recorded playback audio. I have not had
>>> this issue with mplayer which also uses alsa. Admittedly this is a pretty
>>> minor.
>>>
>>> Ubuntu audio has been fairly well behaved for the last few years, but
>>> earlier experience tells me this can be a real can of worms.
>>>
>>> Log attached.
>>>
>>> Am I missing something obvious?
>>
>>
>> What's you CPU usage like when timestretch is 1.2? You're getting buffer
>> underruns so Myth is not supplying data to ALSA fast enough.
>
>
> Agree, I have only seen this on underpowered frontends or where the VDPAU
> hasn't been enabled in playback profiles.
> http://www.mythtv.org/wiki/VDPAU#Enabling_VDPAU_in_MythFrontend
>
> CPU use is negligible.
>
> Broad specs gleaned from lshw:
>
> description: Motherboard
> product: Z87X-D3H-CF
> vendor: Gigabyte Technology Co., Ltd.
>
> description: System Memory
> size: 16GiB
>
> description: CPU
> product: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
>
> description: VGA compatible controller
> product: GK110 [GeForce GTX 780]
>
> VDPAU is in use.
>
> It is possible the on-board sound is some shit chipset:
>
> 00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset
> High Definition Audio Controller (rev 04)
> Subsystem: Gigabyte Technology Co., Ltd Device a002
> Flags: bus master, fast devsel, latency 0, IRQ 46
> Memory at f3130000 (64-bit, non-prefetchable) [size=16K]
> Capabilities: <access denied>
> Kernel driver in use: snd_hda_intel
>
> I admit I'm on the fringes of my comprehension here, but is it possible that
> I've got some issue or conflict with Nvidia/Intel sound?

Where is your sound going? Out the HDMI port or the analogue output
from the Intel onboard sound chip or out an SPDIF interface attached
to the Intel onboard sound chip?

_______________________________________________
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: Time stretch audio skipping [ In reply to ]
On 27/05/14 09:28, Jean-Yves Avenard wrote:
> Without seeing the myth log, it will be impossible to tell
>
> start mythfrontend with -v audio,playback --loglevel=debug
>
> is this a remote frontend or combined frontend/backend?
>
Yes. Log was attached to an earlier mail. New log, with your suggested
options here: http://paste.ubuntu.com/7524531/

Remote frontend.

I must admit that in days past this problem was much worse. It has been
hard to reproduce this morning. For this example I used 1.3x time
stretch and only waited for the first occurrence.

Just quickly: You are a very busy man Jean-Yves; I have seen your
activity in the github repo. I am surprised and grateful that you also
take the time to read and contribute to a small list in 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: Time stretch audio skipping [ In reply to ]
On 27/05/14 09:36, Nick Rout wrote:
> Where is your sound going? Out the HDMI port or the analogue output
> from the Intel onboard sound chip or out an SPDIF interface attached
> to the Intel onboard sound chip?
>
analogue output from the Intel onboard sound chip

_______________________________________________
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: Time stretch audio skipping [ In reply to ]
On Tue, May 27, 2014 at 9:56 AM, Aaron Pelly <apelly@monkeymasters.co.nz>wrote:

> On 27/05/14 09:28, Jean-Yves Avenard wrote:
>
>> Without seeing the myth log, it will be impossible to tell
>>
>> start mythfrontend with -v audio,playback --loglevel=debug
>>
>> is this a remote frontend or combined frontend/backend?
>>
>> Yes. Log was attached to an earlier mail. New log, with your suggested
> options here: http://paste.ubuntu.com/7524531/
>
> Remote frontend.
>
> I must admit that in days past this problem was much worse. It has been
> hard to reproduce this morning. For this example I used 1.3x time stretch
> and only waited for the first occurrence.
>

I may be completely off base here, but I seem to remember something about
an option to use either video or audio timebase. I think there was a
recommendation to use one over the other but I can't remember which
(sorry!). See if you can find that setting and try the other option.

Cheers,
Steve
Re: Time stretch audio skipping [ In reply to ]
On Tue, May 27, 2014 at 2:40 PM, Steve Hodge <stevehodge@gmail.com> wrote:

> On Tue, May 27, 2014 at 9:56 AM, Aaron Pelly <apelly@monkeymasters.co.nz>wrote:
>
>> On 27/05/14 09:28, Jean-Yves Avenard wrote:
>>
>>> Without seeing the myth log, it will be impossible to tell
>>>
>>> start mythfrontend with -v audio,playback --loglevel=debug
>>>
>>> is this a remote frontend or combined frontend/backend?
>>>
>>> Yes. Log was attached to an earlier mail. New log, with your suggested
>> options here: http://paste.ubuntu.com/7524531/
>>
>> Remote frontend.
>>
>> I must admit that in days past this problem was much worse. It has been
>> hard to reproduce this morning. For this example I used 1.3x time stretch
>> and only waited for the first occurrence.
>>
>
> I may be completely off base here, but I seem to remember something about
> an option to use either video or audio timebase. I think there was a
> recommendation to use one over the other but I can't remember which
> (sorry!). See if you can find that setting and try the other option.
>

Nevermind, that option was removed a few years ago.

Cheers,
Steve
Re: Time stretch audio skipping [ In reply to ]
On 27 May 2014 07:56, Aaron Pelly <apelly@monkeymasters.co.nz> wrote:

> I must admit that in days past this problem was much worse. It has been hard
> to reproduce this morning. For this example I used 1.3x time stretch and
> only waited for the first occurrence.

1.1 and 1.2 didn't cause the issue.

Only 1.3

From top of my head, as I really have no idea, it does appear to be a
speed issue, the audio card is starved of data and there are buffer
underruns. Your CPU usage is fairly high for what you are trying to
display
You are using the "default" ALSA device, which may be just pulse
emulation, go into Settings Preferences and use a native alsa device,
browse the list for a hw one

Try disabling the 5.1 audio upmixer, keeping it stereo

Your screen only supports 60Hz , causing additional work.

Try disabling in your playback profile the extra denoise and hqscaling
filters, though it's a very powerful video card you have so I doubt it
will make a difference.

also try changing the playback profile from VDPAU High Quality to
VDPAU Slim or Normal just to see if it makes any difference.

>
> Just quickly: You are a very busy man Jean-Yves; I have seen your activity
> in the github repo. I am surprised and grateful that you also take the time
> to read and contribute to a small list in NZ.

you guys happen to use high-tech broadcasting, makes a good test bed !

_______________________________________________
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: Time stretch audio skipping [ In reply to ]
It took a while to get back on to this, but it is now fixed. For
completeness, notes are below:

On 27/05/14 15:52, Jean-Yves Avenard wrote:
> On 27 May 2014 07:56, Aaron Pelly <apelly@monkeymasters.co.nz> wrote:
>
>> I must admit that in days past this problem was much worse. It has been hard
>> to reproduce this morning. For this example I used 1.3x time stretch and
>> only waited for the first occurrence.
> 1.1 and 1.2 didn't cause the issue.
>
> Only 1.3

The problem was sporadic, and seemingly independent of system load. I
suspect there are some performance bottlenecks other than CPU that I do
not have the skill-set to locate or resolve.

> From top of my head, as I really have no idea, it does appear to be a
> speed issue, the audio card is starved of data and there are buffer
> underruns. Your CPU usage is fairly high for what you are trying to
> display

I see that. And I do not understand why that would be.

> You are using the "default" ALSA device, which may be just pulse
> emulation, go into Settings Preferences and use a native alsa device,
> browse the list for a hw one

The hardware specific devices do not appear to work for me. I do not
know why. I also do not know if I should care why they don't work. I
think not.

> Try disabling the 5.1 audio upmixer, keeping it stereo

***THIS***
Without upmixing the audio is fine. Again; I fail to see where the
bottle neck was. I am interested, but it is no longer a problem.

> Your screen only supports 60Hz , causing additional work.

xorg.conf is a black art. I will get around to trying to over/underclock
the monitor. That's a whole new thread. And possibly more appropriate on
a linux list anyway.

> Try disabling in your playback profile the extra denoise and hqscaling
> filters, though it's a very powerful video card you have so I doubt it
> will make a difference.

Did not try this. Forgot, sorry.

> also try changing the playback profile from VDPAU High Quality to
> VDPAU Slim or Normal just to see if it makes any difference.

No difference.

Thanks very much for your help guys.

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