[Bug] Certain files make the audio cut out on Shield Tablet Lollipop - MX Player

After I updated my Shield Tablet to Stock Lollipop (happens on both 5.0.1 and 5.1),
I noticed that with certain files that use the SW decoder, the audio in MXPlayer crackles a lot, and eventually the audio on the whole tablet cuts out for around 10 seconds (at least judging by the Logcat). This only occurs with MXPlayer. VLC has no audio issues, but I'd rather using MXPlayer for better seeking support. Also, when the audio cuts out, the video keeps playing, but when the audio starts working again, the video pauses until it aligns with the audio.
This appears to be a relevant line of the logcat:
Code:
W/AudioFlinger(17468): write blocked for 10016 msecs, 1 delayed writes, thread 0xaedd7000
One thing that the problematic video files have in common are 48000Hz audio channels, which I believe is the native sample rate of my device. Is there some resampling that isn't getting applied to 48KHz audio that might fix the issue? Is the AudioTrack not getting flushed properly?
The full log is attached. And these lines I believe are not relevant, because they happen nearly all the time when I have headphones plugged in:
Code:
W/NvAudioPolicyManager(17468): getDeviceForStrategy() unknown strategy:

xperia64 said:
After I updated my Shield Tablet to Stock Lollipop (happens on both 5.0.1 and 5.1),
I noticed that with certain files that use the SW decoder, the audio in MXPlayer crackles a lot, and eventually the audio on the whole tablet cuts out for around 10 seconds (at least judging by the Logcat). This only occurs with MXPlayer. VLC has no audio issues, but I'd rather using MXPlayer for better seeking support. Also, when the audio cuts out, the video keeps playing, but when the audio starts working again, the video pauses until it aligns with the audio.
This appears to be a relevant line of the logcat:
Code:
W/AudioFlinger(17468): write blocked for 10016 msecs, 1 delayed writes, thread 0xaedd7000
One thing that the problematic video files have in common are 48000Hz audio channels, which I believe is the native sample rate of my device. Is there some resampling that isn't getting applied to 48KHz audio that might fix the issue? Is the AudioTrack not getting flushed properly?
The full log is attached. And these lines I believe are not relevant, because they happen nearly all the time when I have headphones plugged in:
Code:
W/NvAudioPolicyManager(17468): getDeviceForStrategy() unknown strategy:
Click to expand...
Click to collapse
@xperia64Did I don't think this is a resampling issue. Have you tried HW+ decoder? SW decoder on high resolution video might cause this issue. And I will be test more if you send a sample video clip.

bleu8888 said:
@xperia64Did I don't think this is a resampling issue. Have you tried HW+ decoder? SW decoder on high resolution video might cause this issue. And I will be test more if you send a sample video clip.
Click to expand...
Click to collapse
The issue occurs on nearly all if not all videos with 48KHz audio tracks, from 320x240 all the way up to full HD. It is impossible to play some of these videos with HW+ due to them being WMV or Microsoft MP4's. I've encountered the issue even in Big Buck Bunny. I've tried the 1280x720 and 854x480 MP4's and the 854x480 MSMP4, which exhibit the issue https://peach.blender.org/download/
The lower resolution ones especially should not be that intensive.
If I play the regular BBB MP4's with the HW/+ decoder and SW audio (because AC3), I didn't notice any crackling. If I play them with the SW decoder, they eventually start crackling and audio on the whole tablet cuts out. If I play the MSMP4 version with the SW decoder and software or hardware audio, it will crackle.
I've been using MXPlayer for quite a while, and I remember that when playing larger files on an older device like the Motorola Droid 1, the audio track would sometimes get ahead of the video, and the audio would pause for a while, but this is different because there is no apparent lag and audio on the whole tablet dies.

It would appear that Nvidia's stock kernel is part of the problem here. I flashed a different kernel and I cannot reproduce the crackling/cutout. Although it's somewhat strange that only MXPlayer had this issue.

Well at least you have audio. I updated to 5.1 and did it through the ota with twrp and I have NO audio. Makes no sense. I went back to 5.0.1 and I have audio again. I tried a bunch of different things and still no way for me to get any audio on 5.1. I am thinking of trying a kernel and see if that helps. Or maybe go back, again, and wait for a fix!

JohnK71 said:
Well at least you have audio. I updated to 5.1 and did it through the ota with twrp and I have NO audio. Makes no sense. I went back to 5.0.1 and I have audio again. I tried a bunch of different things and still no way for me to get any audio on 5.1. I am thinking of trying a kernel and see if that helps. Or maybe go back, again, and wait for a fix!
Click to expand...
Click to collapse
@JohnK71 @xperia64
Would you try latest test version from following link?
https://sites.google.com/site/mxvpen/translation/test-build
Feedback will be appreciated.

bleu8888 said:
@JohnK71 @xperia64
Would you try latest test version from following link?
https://sites.google.com/site/mxvpen/translation/test-build
Feedback will be appreciated.
Click to expand...
Click to collapse
Sorry, but I am saying "NO" audio even playing music or checking and changing sounds. No sound at all and also no mic. It all works good back on 5.0.1 so not sure what's the deal with 5.1 for me. I guess I will hope for better results with next version of lollipop. Thanks anyway for the suggestion.

The test build did nothing different. However, version KS-034 of this kernel appears to have fixed my remaining audio issues. On KS-033, the audio was fine for 48KHz audio files, but would still cut out with 24KHz audio files and somewhat break any future AudioTracks in any app until reboot. Version 034 said it increased the HD audio buffer so I guess that did something.
http://forum.xda-developers.com/shi.../tweaked-kernel-nvidia-shield-tablet-t3069776

xperia64 said:
The test build did nothing different. However, version KS-034 of this kernel appears to have fixed my remaining audio issues. On KS-033, the audio was fine for 48KHz audio files, but would still cut out with 24KHz audio files and somewhat break any future AudioTracks in any app until reboot. Version 034 said it increased the HD audio buffer so I guess that did something.
http://forum.xda-developers.com/shi.../tweaked-kernel-nvidia-shield-tablet-t3069776
Click to expand...
Click to collapse
Shield Tablet OTA 3.0 looks like suspended due to audio issue.
See this link: https://forums.geforce.com/default/...3-0-update-feedback-thread-released-5-22-15-/

That is because of a different audio issue where the speakers would literally explode. I had the crackling on 5.0.1/2.2.1. as well.
And I actually went back to KS-033 because KS-034 made audio too latent and it reintroduced crackling on all files, granted it was diminished.

After updating to the latest BitO Kernel (KSX-043) and MXPlayer test version, crackling behavior has changed again, but I have a theory on the crackling this time.
I noticed that after a reboot, the crackling would stop for a while before it returned. The CPU in this device tries as hard as it can to keep its clockspeed at the minimum 51MHz while in sleep mode, regardless of wakelocks/background apps. I had been using Droidsound-e and my own AudioTrack-based music player in sleep mode and I noticed that those apps would skip/crackle a bit as they tried to process the music files but couldn't. That appears to somehow throw off audio output until reboot. The issues are still most noticeable in MXPlayer, but also appeared in other apps as well. I increased the minimum clockspeed to 204MHz and it seemed to help.
I don't know if this is the cause, or if it works on the stock kernel, but on my current setup it seems to work fine.

Related

[Q] Bluetooth + Wifi => choppy video

There is a huge thread about the same issue for the prime tablet, but I have it with my tf101.
If bluetooth speakers are used when streaming video over wifi, the video becomes very choppy and the sound is couple seconds behind. As soon as bluetooth is disabled everything goes back to normal in a second.
Is it a hardware issue?
Any ideas how to fix it?
I think it's an interference issue, but the odd thing is I just tried it with my old BT headset and had no problems. Maybe software? I'm rooted and running the stuff in my signature btw, perhaps the custom kernel and rom I flashed fixed something, or I never had the issue in the first place.
lecamarade said:
There is a huge thread about the same issue for the prime tablet, but I have it with my tf101.
If bluetooth speakers are used when streaming video over wifi, the video becomes very choppy and the sound is couple seconds behind. As soon as bluetooth is disabled everything goes back to normal in a second.
Is it a hardware issue?
Any ideas how to fix it?
Click to expand...
Click to collapse
I'm having the same problem. I also have the problem that youtube won't output to my bluetooth speakers (Creative D200) and it causes nothing to output to the speakers after trying. This is true even after unpairing and turning bluetooth off and back on. This is not an issue on my Android phone (Galaxy S3), though the video streaming lags while outputting to bluetooth, just not as badly as on the TF101. I guess it has to do with the bluetooth audio codec used in the speakers (aptX).
Which bluetooth speakers are you using?

[Q] Audio breaks in MP3 tracks

Hi all,
I just got myself a 16GB oneplus one. It is running on Cyanogen OS version 11.0-XNPH05Q.
I got this problem, which hopefully someone has a remedy for it:
During MP3 music playbacks (no matter what MP3 player app I have installed), there is always this audio ''breaks'' in between the song. It's like the music will start to play -->break-->play.
The playback is not very smooth and it's rather irritating.
Anything I can do to remedy this?
Eastlink said:
Hi all,
I just got myself a 16GB oneplus one. It is running on Cyanogen OS version 11.0-XNPH05Q.
I got this problem, which hopefully someone has a remedy for it:
During MP3 music playbacks (no matter what MP3 player app I have installed), there is always this audio ''breaks'' in between the song. It's like the music will start to play -->break-->play.
The playback is not very smooth and it's rather irritating.
Anything I can do to remedy this?
Click to expand...
Click to collapse
Honestly, I would try updating your rom. CM12 fixed a lot of audio issues, and a host of others as well. In any case, a custom rom and kernel would most likely be the easiest fix. Other than that, there's probably a thread somewhere around the OPO forums related to this
kibmikey1 said:
Honestly, I would try updating your rom. CM12 fixed a lot of audio issues, and a host of others as well. In any case, a custom rom and kernel would most likely be the easiest fix. Other than that, there's probably a thread somewhere around the OPO forums related to this
Click to expand...
Click to collapse
Unfortunately, I have tried using CM12 (latest weekly ROM cm-12-20150308-NIGHTLY-bacon), as well as LiquidSmooth ROM 5.0.
However, the problem occurs once the headphone is plugged into the headphone jack. I am getting this audio break from youtube videos, MP3 files in internal memory, etc...
But there aren't any issues with the music playback if I am using wireless bluetooth headphones or if the music is coming out from the phone speaker itself.
I suspect this could be a hardware issue? Maybe with the headphone jack?
Hi guys,
Any remedies on my problem? And by the way, if I downgrade my phone to CM11-33R, this issue of "music glitch" will disappear. Any ROM above CM11-33R will have this issue. This occurs only for music playback through earphones. No issues through the phone loudspeakers.
And another thing is what I found out accidentally:
When this music glitch happened, I just need to play some rock music at max volume, the phone will automatically bring up the google voice search screen. And I just need to close the google voice search and the music glitch will totally go away until the next time i plug in the earphones again.
No matter what i have tried, i.e. Official lollipop, franco kernel, etc... The music glitch is still there
Thanks

Feature Request: Start audio before video?

Under the settings for Audio I see something for Audio Delay. Does that apply to audio only files or will it work on videos also?
Is there a way we can get an audio delay where I can enter a negative value.. like have the audio start XX seconds before the video?
I don't play music when I drive in my car, I only play videos I've downloaded off YouTube. The problem? Video starts around 2 seconds before audio, so nothing is synched up properly on Bluetooth.
yuppicide said:
Under the settings for Audio I see something for Audio Delay. Does that apply to audio only files or will it work on videos also?
Is there a way we can get an audio delay where I can enter a negative value.. like have the audio start XX seconds before the video?
I don't play music when I drive in my car, I only play videos I've downloaded off YouTube. The problem? Video starts around 2 seconds before audio, so nothing is synched up properly on Bluetooth.
Click to expand...
Click to collapse
It will work on video files too. It may not work in HW decoder on some devices. You can just set HW+ as default decoder on such conditions.
If you want to set the audio delay only to Bluetooth devices, You can just set the Bluetooth audio delay instead of General one.
Thirumalai.K said:
It will work on video files too. It may not work in HW decoder on some devices. You can just set HW+ as default decoder on such conditions.
If you want to set the audio delay only to Bluetooth devices, You can just set the Bluetooth audio delay instead of General one.
Click to expand...
Click to collapse
I cannot get it to work at all. It doesn't seem like the setting does anything. I tried -2.0 and 2.0, neither did anything. Then I tried 20.0 as a test.. that didn't do anything either.
yuppicide said:
I cannot get it to work at all. It doesn't seem like the setting does anything. I tried -2.0 and 2.0, neither did anything. Then I tried 20.0 as a test.. that didn't do anything either.
Click to expand...
Click to collapse
Kindly collect a bug report & share with us. It may help us to understand the issue better.

Weird playback problems: no audio, hw-sw jumping

v1.10.17 - custom codec installed
Firestick 4K
Fire TV 2
I have several fire devices, including a FTV2 and the new 4K stick.
While testing the new 4K stick, I found several issues, first is only on the new stick, 2nd is on both devices.
Hopefully you guys can help me out, I have spent 2 evenings already and still not resolved.
1) Random switching from HW to HW+ to SW
During playback of many video's, including tv episodes, the video starts playing in HW mode, runs smooth. Then at random times it switched to HW+, usually with black reloading screen in between, then later it switches to SW stating HW+ not supported - and stays in SW modus. In SW it seems OK-ish, but sometimes see skipping, lag etc. that is not present in HW(+) decoding.
a) If it starts playing OK, then why does it need to switch to other modes? If it works then i dont understand why that happens
b) The older FTV2 does not have this issue, I have never seen this before. It starts with HW or HW+ and stays that way, never any issues in this regard. The new stick hardware codec support is even better than the older FTV2.
2) No audio on many streams
I found that many streams starts in HW modus, with no audio at all. It stays that way if I let it run.
If I switch it to HW+, it does have audio, but out-of-sync.
Also, after a while it switches back to HW or sometimes SW.
a) why does it choose HW, not HW+?
b) why out of sync in HW+?
c) Why does it switch back to HW or SW, if it working (out-of-sync)
d) Installed custom-codec all-in-one, did not solve it
-------------------------------
I have also tried several other players, to some success. But they have their own issues, like buffering, laggy playback, stutter when FWD etc.
So I need to get this working, there are no real alternatives
I have done some extra testing. I now got it all working on my FTV2, with an older version 1.9.11 (+compatible codec pack).
I also set HW+ as default for network streams. I have tested several video's, x264/x265, dts/ac3 they seem to all work and keep working OK. Usually they stay in HW+ modus until the end and all smooth.
I couldnt find the older version, so I tried the latest MX 1.10.25, with latest codec pack. At first, it was working...but later when watchin an episode it gave me all sorts of trouble:
- blocking issues
- streams stops
- stream does not start again after trying new
- switch from HW+ to SW
- cant switch manually to HW+, gives error HW+ not supported
So weird, especially since it is working fine on the older FTV2.
Anyway, will try to get the older version and see if that helps.
timtoolman2k11 said:
I have done some extra testing. I now got it all working on my FTV2, with an older version 1.9.11 (+compatible codec pack).
I also set HW+ as default for network streams. I have tested several video's, x264/x265, dts/ac3 they seem to all work and keep working OK. Usually they stay in HW+ modus until the end and all smooth.
I couldnt find the older version, so I tried the latest MX 1.10.25, with latest codec pack. At first, it was working...but later when watchin an episode it gave me all sorts of trouble:
- blocking issues
- streams stops
- stream does not start again after trying new
- switch from HW+ to SW
- cant switch manually to HW+, gives error HW+ not supported
So weird, especially since it is working fine on the older FTV2.
Anyway, will try to get the older version and see if that helps.
Click to expand...
Click to collapse
In general, It will automatically try the next decoder when the playback has failed before completion of the file. It is an intended behaviour since 1.8.x. Kindly collect the bug report from the latest version immediately after the issues. It will help us to understand better.
Thanks for your reply. I will try to get the report next time.
In meantime I have tested with exact same (old) version, 1.9.11 + codec pack on fire stick 4K.
I had set HW+ as default for network, same as on the FTV2.
So basically, exactly same set-up, same streams, but on newer hardware.
At first it seemed ok, however:
- setting HW+ as default, at some streams, I cannot FWD, it just jumps back to beginning
- on tv episodes, it starts with HW+, then jumps to HW for some reason (no change in audio or video) - does not happen on FTV2
- on certain movies, it starts with audio on HW+, then jumps to HW modus without audio, makes no sense - does not happen on FTV2
- on movies with multiple audio tracks, in HW modus it plays just one track , cannot switch to other track, stuck in commentary track. same stream in HW+ modus has the main track selected and playing.
All in all very weird, never had so many issues. I just installed it and it would work. What troubles me is that I now have a working FTV2 setup, ubt exact setup does not work on the Fire stick 4K. Very frustrating.
I also found that HDR playback is very dull, very dim, not bright at all. So staying on old version is ok up until 1080P. 4K+HDR is not working ok, but will be probably be fixed in newer version.
I will keep the FTV2 at the now working setup.
I wil re-install latest mx and codec pack on 4K stick and test again.
If I encounter errors, I will try to post bug report. Hopefully that will help the devs to fix this. It seems it is not really liking the new Fire stick hardware for some reason.
Ok. Did some testing again. Here my results + logs.
- Fire 4K Stick
- MX 1.10.25 (default settings)
- codec pack: https://forum.xda-developers.com/attachment.php?attachmentid=4656301&d=1543696913
(from a post saying that it worked perfectly on ac3, while another didnt)
- 6 different network streams
---------------------------------
1. 720P X264 - single channel audio (stereo i think)
- starts in HW+
- stays in HW+
- FFWD OK
- keeps playing OK
2. 1080P X264 - multichannel 5.1 audio
- starts in HW
- commentary track on - cannot switch to other tracks
- FFWD not working OK
After a short while:
- restarts video in HW+
- audio main channel on
Very short after:
- switched to SW
- no audio
- choppy playback
Log: report_2018-12-03_194334.zip
-------------------------------------
3. 4K X265 stream
- MX crashes directly after start
- Starting 2nd time, MX starts playing in HW+
- Audio/video OK
- FFWD OK
- Keeps playing ok
Log: report_2018-12-03_194948.zip
-------------------------------------------
4. 1080P X264 stream
- starts in HW
- No audio
- FFWD not working OK
After short while:
- restart in HW+
- audio not starting right away, after about 10s it starts (but sync)
- FFWD OK
- keeps playing OK
5. HD 5.1 audio
- starts in HW
- no audio
- FFWD not working
After short while:
- restart in HW+
- audio working
- FFWD working
- keeps playing OK
Log: report_2018-12-03_200011.zip
--------------------------------------
6. 720P X264 - stereo
- starts in HW
- No audio
Shortly after playing:
- switch to HW+
- audio working
Very short after:
- Switch to SW
- Choppy playback
Log: report_2018-12-03_200412.zip
---------------------------------------------
My conclusions so far:
- Stream 1 starts in HW+, keeps playing OK, no issues
- Stream 4 & 5 should be fixed by setting HW+ default for network streams.
(except for the small delay in start of audio of 4, but that is ok)
- Stream 2 & 6, can partially be fixed by HW+ default, but not the switch to SW
- Stream 3: crash is not OK, but after 2nd try it works OK
- I dont understand why some streams start in HW+, while other start in HW then later switch to HW+
This is now keeping me from using my stick. While on my old FTV2, with old MX it seems to all work just fine.
Seems like it is not liking the new 4K stick hardware / does not seem to see the hardware decoding abilities - which are matching and surpassing the old FTV2.
Hopefully my testing and logs can help you guys to fix these issues. - if fixed it will be an instant Pro buy for me thats for sure!
I have tried other players, but they all have their own issues - and not the level of support of MX devs.
So I will now sit back and wait for the fixes to come on.
Ofcourse I am happy to test again to verify correct workings after updates.
timtoolman2k11 said:
My conclusions so far:
- Stream 1 starts in HW+, keeps playing OK, no issues
- Stream 4 & 5 should be fixed by setting HW+ default for network streams.
(except for the small delay in start of audio of 4, but that is ok)
- Stream 2 & 6, can partially be fixed by HW+ default, but not the switch to SW
- Stream 3: crash is not OK, but after 2nd try it works OK
- I dont understand why some streams start in HW+, while other start in HW then later switch to HW+
This is now keeping me from using my stick. While on my old FTV2, with old MX it seems to all work just fine.
Seems like it is not liking the new 4K stick hardware / does not seem to see the hardware decoding abilities - which are matching and surpassing the old FTV2.
Hopefully my testing and logs can help you guys to fix these issues. - if fixed it will be an instant Pro buy for me thats for sure!
I have tried other players, but they all have their own issues - and not the level of support of MX devs.
So I will now sit back and wait for the fixes to come on.
Ofcourse I am happy to test again to verify correct workings after updates.
Click to expand...
Click to collapse
The HW decoder directly uses the android mediaplayer framework implemented on the device. So, most of the issues on HW decoder might be caused by the firmware itself. It looks like Amazon has heavily modified the android mediaplayer and media codec frameworks or its implementation has issues. According to the logs, the media server process ( a system process) which plays a vital role in hardware accelerated playbacks (HW & HW+) has died in the midway. So, the player has encountered the issues and switched to the next decoder. So, MX Player doesn't have much scopes for the improvement on this issue.
Wow really? That would mean everyone with this new device should have these issues. That has not been reported anywhere. All praise for this stick. Or am i the only one to have a faulty one? Very odd.
I installed MX fresh out of the box. I can try to do a reset and re-install. If that doesnt work, then I guess I have to return it.
Is there really nothing you can do to fix this? You are on amazon store as well, right? Then I guess it should work, but it currently doesnt.
Ok, did a reset of the stick, only installed bare minimum for testing.
Now, it seems to work ok !
I guess something was messed up causing the media server issues. Don't know what, maybe some other apps I installed.
Yes, still some streams start in HW, with no audio or wrong audio.
However, I have set HW+ as default - so that is fixed.
I have watched several streams last night, they started in HW+ and kept playing in HW+, all working fine. No fallbacks to SW.
The only issue I have now is the crash on some 4K streams on first play still happens. After 2nd try it works fine. Not a biggie, still would be good if this is fixed.
timtoolman2k11 said:
Ok, did a reset of the stick, only installed bare minimum for testing.
The only issue I have now is the crash on some 4K streams on first play still happens. After 2nd try it works fine. Not a biggie, still would be good if this is fixed.
Click to expand...
Click to collapse
Can you please collect the bug report immediately after the crash?
In your previous bug report, the logs were so limited. Looks amazon has set the log buffer size to the minimum. If it possible, enable the developer option and increase the log buffer side.

Audio delay when playing video over bluetooth

Slight issue.
Using VLC and the new OnePlus Z headphones, I am getting about 250ms mismatch between the audio and video when playing a movie. VLC can correct this, but I've never seen this before on other devices.
Anyone got any ideas why? I haven't checked with other apps yet to see whether it's VLC or the phone or headset.
Alan
OK - just tested a couple of other apps and it may be VLC which is the issue. Either that or it's sorted itself out
Alan

Categories

Resources