avs-device-sdk icon indicating copy to clipboard operation
avs-device-sdk copied to clipboard

After a repeat of pause & play music voice commands the music playback becomes really choppy.

Open Lmau3 opened this issue 5 years ago • 5 comments

IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.

Briefly summarize your issue:

It happens very often that while playing music from amazon music, using the voice command pause and after play the music playback becomes really choppy.

What is the expected behavior?

Music must be playback in correct way.

What behavior are you observing?

We are observing that in a multiple pause / play song scenario when playing Amazon Prime music, the music the playback becomes really choppy.

Provide the steps to reproduce the issue, if applicable:

Perform a sequence of voice commands pause play, the pause can last from 20 seconds up to 5 minutes. Songs used during the test:

  1. Happy by pharrell williams
  2. Karaoke by Boomdabash, Alessandra Amoroso -
  3. Coco Chanel by Gaia

I am attaching the log file. logs_13oct20.txt

the event music playback becomes really choppy.occurred at : 13:30:48.218

2020-10-13 13:30:48.218 [ 1c] 0 MediaPlayer:seekSuccessful:name=AudioMediaPlayer,offsetInMs=3976
2020-10-13 13:30:48.218 [ 44] 9 BaseStreamSource:onNeedDataCalled:size=4096
2020-10-13 13:30:48.226 [ 44] 9 BaseStreamSource:m_needDataCallbackId already set
2020-10-13 13:30:48.224 [ 1c] 9 MediaPlayer:messageReceived:name=AudioMediaPlayer,type=state-changed,source=audio_sink-actual-sink-pulse
2020-10-13 13:30:48.221 [ 34] 9 HTTP2Transport:onActivity
2020-10-13 13:30:48.232 [ 1c] 9 MediaPlayer:messageReceived:name=AudioMediaPlayer,type=state-changed,source=audio_sink
2020-10-13 13:30:48.236 [ 34] 0 MimeResponseSink:receivedRequestId:value=x-amzn-requestid\: 0225bbfffeddecea-0000a42d-01d589d3-469aae9c8488e4b8-df431d92-99
2020-10-13 13:30:48.239 [ 1c] 9 MediaPlayer:messageReceived:name=AudioMediaPlayer,type=state-changed,source=audio-pipeline
2020-10-13 13:30:48.241 [ 34] 9 MimeResponseSink:onReceiveHeaderLine:line=access-control-allow-origin\: *

Tell us about your environment:

What version of the AVS Device SDK are you using?

  <1.17.0>

Tell us what hardware you're using:

  • [ ] Desktop / Laptop
  • [ ] Raspberry Pi
  • [x] Other - tell us more: imx7

Tell us about your OS (Type & version):

  • [x] Linux
  • [ ] MacOS
  • [ ] Raspbian Stretch
  • [ ] Raspbian Jessy
  • [ x] Other - tell us more: yocto thud with linux kernel

Lmau3 avatar Oct 13 '20 16:10 Lmau3

Hi All, Yesterday when I opened the issue I forgot to provide the information printed on the serial console where you can see errors in the gstreamer library.

The gstreamer version we use is 1.14.4 Today I repeated the same operations described yesterday and the problem “the music playback becomes really choppy”carose again.

I attach the logs. Log_serial_14oct20.txt logs_14oct20.txt

the event music playback becomes really choppy occurred at : 9: 27: 04: 107

0:08:00.458697575  1054 0x669ba680 WARN                   pulse pulsesink.c:704:gst_pulsering_stream_underflow_cb:<audiw
0:10:12.267829802  1054 0x66097490 WARN         audio-resampler audio-resampler.c:274:convert_taps_gint16_c: can't finds
GStreamer-CRITICAL **: 09:27:04.107: gst_segment_to_stream_time: assertion 'segment->format ==d
GStreamer-CRITICAL **: 09:27:04.107: gst_segment_to_stream_time: assertion 'segment->format ==d

Lmau3 avatar Oct 14 '20 09:10 Lmau3

Hi @Lmau3 thanks for posting.

Do you see this issue every time when you pause and resume playback for Amazon Music? Testing on Ubuntu 1.17 I am not able to reproduce the same issue.

Looking at your logs I do not see any issues with downloading or buffering the audio data. Have you made any changes to the gstreamer mediaplayer that could result in choppy audio? The logs you sent for gstreamer appear to be cutoff.

womw avatar Oct 28 '20 00:10 womw

Hi @womw thanks for your reply.

You can find my answers in Italic character.

Do you see this issue every time when you pause and resume playback for Amazon Music? No this problem does not present every time, but after a series do pause and resume playback, unfortunately the number of these steps is not always the same but variable.

Testing on Ubuntu 1.17 I am not able to reproduce the same issue. Looking at your logs I do not see any issues with downloading or buffering the audio data. Have you made any changes to the gstreamer mediaplayer that could result in choppy audio? No I didn't make any changes to the gstreamer or mediaplayer, they are the original ones of avs-device-sdk 1.17.0.

The logs you sent for gstreamer appear to be cutoff. The fact that you see the cutoff log of gstreamer is definitely my mistake in the log capture.

Today rerun the tests and as you can see in the gstreamer log below you can see the complete line message.

Logs_serial_28oct20.txt

Lmau3 avatar Oct 28 '20 16:10 Lmau3

Hello @Lmau3, Are you still experiencing this issue? Are you seeing this on the latest SDK Version?

blazusiak-amazon avatar Aug 22 '22 00:08 blazusiak-amazon

Hello @blazusiak-amazon , For now I have completed the update of my device to SDK version 1.25 and now I am continuing to update to 1.26. The problem (Music playback becomes really choppy) seems a bit improved, in the sense that the problem is generated only the first time the playback of a music is paused after a period that the device is in stand-by mode. The problem (music playback becomes really choppy) seems a bit improved, in the sense that the problem is generated only the first time you pause the playback of a music, after a period that the device has been in the stand-by mode (> 5 minutes) . At the second pause and then resume command, the music plays correctly. However I will keep you updated once complete update of my device to the version with sdk 1.26

Lmau3 avatar Aug 29 '22 14:08 Lmau3

Hello @Lmau3, Due to the inactivity of this ticket, this ticket will be closed. Please feel free to re-open the ticket if you have more questions or feel that your question has not been answered fully.

blazusiak-amazon avatar Oct 03 '22 17:10 blazusiak-amazon