[Q] audio pass through; compressed formats - MX Player

Audio pass-through is a very important feature on Android media boxes with HDMI and SPDIF ports. As I understand it, this mode is currently supported but only when H/W mode is selected and the software audio decoding option is deselected. I noticed that this somehow causes the flag AUDIO_OUTPUT_FLAG_DIRECT to be set in AudioTrack.cpp which is a very helpful signal to the downstream audio handlers. Kodi also has limited support for audio pass-through, but unfortunately no such signal that I could detect. The SPMC version of Kodi uses the AUDIO_STREAM_VOICE_CALL hack to signal pass-through mode but this can cause problems on boxes that also need to support applications such as Skype.
If I understand everything correctly, then perhaps it would be easy to add an audio pass-through option when using the H/W+ or S/W video decoding modes. The H/W mode may not work with all video streams, and even when it does, some features, such as screen resizing, and screen capturing may be lost.

Yes, what ed35bc wrote is also important for me

Related

Video playing with breaks after switching audiotracks

Hi,
Got problem with video playback after switching audiotracks. After switching audiotrack - video start to play with breaks and jerks.
If playing without switching or after switching to default track - it`s ok.
Happens with 720p AVI files with AC3 audio (tries many of them).
Device: Digma HDMP 600 (stock software).
Thanks for advance.
How about changing decoder to H/W+ or S/W?
No idea of the specs on a Digma HDMP 600. Sounds like a buffering issue. Try toggling SW audio.
Settings -> Decoder -> SW audio

Oreo - Developer Bluetooth options discussion

Hi all!
I wanted to open up a discussion about the new Oreo features for Bluetooth codecs in the developer section. I haven't been able to find a comprehensive guide or info anywhere that covers how it actually should work, and I don't believe it's working correctly - I would like to explore more with you.
I'm on a Google (carrier free) Pixel, using a fresh install of OPR6.170623.012 - which is working brilliantly by the way.
It seems to me that I can't make the settings stick, if I for example change the Bluetooth Audio Codec to aptX, or modify any of the other settings when I go back in it always reverts to the 'Use System Selection (Default)' option. I'm typically trying this with Bluetooth off, changing the setting and turning Bluetooth on. I've also tried rebooting in-between, as well as different variations. The developer toggle is set to on of course.
It may be my misunderstanding of how this works, but it even if I stay on the developers screen and change the codec, if I turn Bluetooth on and it connects to a device, for instance my in-car Bluetooth audio, which I believe supports aptX, it doesn't care what the codec setting is and displays 'Streaming: SBC', which is of course what I'd expect would be overridden.
The only thing that seems to stick is the AVRCP version. I'm wondering if the Bluetooth HCI snoop log will provide any information?
Have any of you had any experience with this, or have anything to add to the conversation?
Many thanks in advance,
OK so it seems this codec list doesn't allow you to set a 'default', it just allows for modifying the codec during playback?
What I've experienced so far is that it does work with 'Use System Selection' to use the best codec available on the device you are connected to. It also allows you to change the codec to another while streaming/playing. The sub-text under Bluetooth Audio Codec does dynamically change from SBC to AAC.
Example: My headphones support SBC and AAC, the Pixel defaults to AAC on establishing a Bluetooth connection but does allow downgrading to SBC by picking from the list (as a test).
It however doesn't retain whatever you pick in the list if bluetooth is turned off then back on, it basically always defaults to system selection, then auto-picks on every connection. Perhaps this is by design, it is developer tools after all.
I haven't been able to get this to work with aptX in my car yet with my Pixel, even though it is apparently supported?
Also of note: To achieve AAC on my Bluetooth headphones I had to put them into a 'Priority on sound quality' mode and also turn off the Bluetooth phone (i.e. call connectivity, music ONLY) on the Pixel connection to achieve AAC.
are you sure that your car supports aptx? before this developer option it was very hard to actually see the codec being used.
I believe so, the Bluetooth product states that it supports EDR and aptX, but yes, I cannot be 100% certain.
Are you suggesting it should be possible with Pixel and the Oreo build as-is?

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.

Easy Projection - Either no video or no subtitle?

On my P20 I noticed a weird phenomenon when I connected the phone (USB C) to a projector (VGA) by a simple cable with no power up feature:
1. Desktop mode - there is no video through the Netflix app, though there is audio and subtitle.
2. Phone mode - there is video and audio but no subtitle.
The only subtitles I was able to get to show up through the projector were hard coded variety through streaming websites.
Has anyone had success with all three components of a Netflix item - audio, video and subtitle?
Thanks!
RegSK said:
On my P20 I noticed a weird phenomenon when I connected the phone (USB C) to a projector (VGA) by a simple cable with no power up feature:
1. Desktop mode - there is no video through the Netflix app, though there is audio and subtitle.
2. Phone mode - there is video and audio but no subtitle.
The only subtitles I was able to get to show up through the projector were hard coded variety through streaming websites.
Has anyone had success with all three components of a Netflix item - audio, video and subtitle?
Thanks!
Click to expand...
Click to collapse
Could this be a FAULTY CABLE issue, or VGA connection in general issue?
A few days on and still no ideas ?! Can someone step up to the plate please?

Categories

Resources