• 1
  • 58
  • 59
  • 60(current)
  • 61
  • 62
  • 119
2018 - Amazon Fire TV Stick 4K
Yes. If this does not help -> bad luck.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
(2020-03-11, 22:28)fritsch Wrote: No. It is like it is - I don't plan to continue it, everything upstreamable is in Matrix already.

The "audio delay" for stereo that is automatically reencoded to DD+ by the firetv firmware without our influence is currently not programmatically fixable. Workarounds: enable upmix stereo in kodi, that will output multi-channel if you have it and the DD+ route is not taken. Passthrough and normal multi channel out is not affected by this firmware bug. If there is a delay for these files, it's a kodi bug / settings issue.

Ah, I thought the Fire TV builds were specifically to fix the delay. At any rate, I still have to manually offset audio .250ms for these files so I think it's time for me to switch to Rpi4. Thanks.
Reply
No, you got that wrong. "The delay" you are talking about is a firmware bug. I reported it to amazon - no feedback. There was a general delay with the old delay API that is fixed in these builds as well.

Btw. I have an idea - are you available for a test?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
Building: https://jenkins.kodi.tv/job/Android-ARM/17137/
Will result here: http://mirrors.kodi.tv/test-builds/android/arm/ (named pcm16 in name) - give it one hour time.


kodi outputs stereo with 32 bit float format. Perhaps the delay is gone when we output that in 16 bit Int - you will tell us.

Here: http://mirrors.kodi.tv/test-builds/andro...bi-v7a.apk (wait until mirror syncs)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
Can someone test this: https://fritschserver.no-ip.org/owncloud...do9GJNahYE please on FireTV 4K on VLC (Desktop, FireTV) and on another Android Device. I want to find out, if we really still hunt FireTV specifics here with aac 2.0 or if entire Android is affected with that sample.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
(2020-03-14, 07:18)fritsch Wrote: Can someone test this: https://fritschserver.no-ip.org/owncloud...do9GJNahYE please on FireTV 4K on VLC (Desktop, FireTV) and on another Android Device. I want to find out, if we really still hunt FireTV specifics here with aac 2.0 or if entire Android is affected with that sample.
Ok so here's something interesting that I stumbled upon that I need you and others on the forum to confirm to me because I am shocked that I came across it.

I got 3 samples. 1) This one, sync-aac-2.0.mkv 2)  the Pulp Fiction Hamburger scene you posted before 3) another scene from Home Alone, all with 2.0 AAC audio.

First I tried a clean install of your pcm16 Kodi, and the Fire Stick 4K's system audio settings are default aka  "Best Available"

All 3 samples on Fire TV 4K Kodi pcm16 = Delayed

Then I tried all 3 samples on Fire Stick 4K VLC 3.2.6 from the Amazon store, clean install, no settings changed:

All 3 samples on Fire TV 4K VLC = Delayed

Then I tried all 3 samples on various other devices and players. 

All 3 samples on Windows PC VLC = No Delay
All 3 samples on Windows PC with mpv = No Delay
All 3 samples on Windows PC with MPC-HC = No Delay
All 3 samples on Qualcomm-based Android phone with latest VLC = No Delay
All 3 samples on Qualcomm-based Android phone with mpv = No Delay
All 3 samples on Qualcomm-based Android phone with MXPlayer = No Delay

Therefore, the sample you wanted us to look at does not have a delay on any device except the Fire Stick 4K

But here's something shocking. I decided to try Nova Video Player from the Amazon store, no settings changed, on the Fire Stick 4K.

All 3 samples on Fire Stick 4K with Nova Video Player = No Delay!

I need somebody else to confirm my findings by seeing if there's a delay on the Fire Stick 4K with Nova Video Player. If other people can confirm my finding, perhaps fritsch can see why Nova doesn't have a delay on the 4K Stick but Kodi does. I suspect it may have to do with the fact that Nova uses brand new untouched libraries?
Reply
Can you post a Debug Log from Nova-Player? Might be yet another private workaround we don't know of.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
(2020-03-14, 14:30)fritsch Wrote: Can you post a Debug Log from Nova-Player? Might be yet another private workaround we don't know of.
First of all, did you confirm that Nova has no delay on your 4K Stick? I might be going crazy but I just checked it again and again, no delay.

There's no way to get a debug log from Nova Player from what I can see in the settings but the source code is available. https://github.com/nova-video-player/aos-AVP
Reply
Scanning their sources right now and find may "funny" things, seems they workaround every brand out there.

Quote:  int audio_stream = AUDIO_STREAM_MUSIC;
  if(at->passthrough == 1 &&
      ( device_get_hw_type() == HW_TYPE_RK32 ||
        device_get_hw_type() == HW_TYPE_RK30 ||
        device_get_hw_type() == HW_TYPE_RK29))
    audio_stream = AUDIO_STREAM_VOICE_CALL;

so on Rockchip, you should not create MUSIC streams but voice calls :-(
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
Okay, got it:

Quote:  at->latency = call_static_int_method(at, at->audiosystemClass, "getOutputLatency", "(I)I", streamType);
  at->latency += (1000 * at->frame_count) / at->rate;
  at->init = 1;

See second reply: https://stackoverflow.com/questions/1580...on-android
And background from amazon: https://developer.amazon.com/de/docs/fir...ation.html

Kodi uses firetv's recommendation, this is what I implemented in fritschfiretv and ported to v19, but not 18.6 Leia offical: https://developer.android.com/reference/...Timestamp)
This should make the getOutputLatency obsolete.

Funny, so yeah broken firmware, let's check what amazon's exoplayer fork does:
https://github.com/amzn/exoplayer-amazon....java#L236

Funny, they also use getTimeStamp, you see nicely the: AMZN_CHANGE_BEGIN + AMZN_CHANGE_END where they change something.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
Will do some tests. It's totally odd to me, that their code works and mine not :-)

But before cursing at the entire world I will revisit my stuff once more and check.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
(2020-03-13, 21:15)fritsch Wrote: No, you got that wrong. "The delay" you are talking about is a firmware bug. I reported it to amazon - no feedback. There was a general delay with the old delay API that is fixed in these builds as well.

Btw. I have an idea - are you available for a test?

Right, but I thought the point of the Fire TV builds was to work around that bug by forcing the correct offset for affected audio stream types.

I can test but not sure how prompt I will be.

Also I should mention that my problem is not only with AAC. Also had it with a MOV I tried with stereo PCM, same delay. I tried one of the affected videos in Plex on the same Fire TV and it was perfectly in sync there.
Reply
Okay.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
Please try: http://mirrors.kodi.tv/test-builds/andro...bi-v7a.apk (Warning, this is Matrix based - if it works fine - I'll do a Leia build with a backport). Jenkins needs very long to build for Leia and my time is limited, therefore I fix it on Matrix first and then cherry-pick.

On my dev system it works now™. But this is only a soundbar, please check it and see if it's any better.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
Funny and why I did not notice the bug for so long:

Multi-Channel / DTS / AC3 / DD+ look like this:
Quote:2020-03-14 22:35:03.069 T:24866   DEBUG: Delay - Timestamp: 671.4166666611447
2020-03-14 22:35:03.070 T:24866   DEBUG: HW-Delay (1): 42.0833333333519 ms
2020-03-14 22:35:03.070 T:24866   DEBUG: Combined Delay: 671.4166666611447 ms
2020-03-14 22:35:03.070 T:24866   DEBUG: Delay Current: 635.341667 ms

Stereo (including AAC):
Quote:2020-03-14 22:38:51.730 T:24866   DEBUG: Delay - Timestamp: 305.3125000000705 ms
2020-03-14 22:38:51.731 T:24866   DEBUG: HW-Delay (1): 178.47916666666563 ms
2020-03-14 22:38:51.731 T:24866   DEBUG: Combined Delay: 305.3125000000705 ms
2020-03-14 22:38:51.731 T:24866   DEBUG: Delay Current: 304.126389 ms

Long story short: I wrongly pushed the timestamp calculated getTimeStamp-Delay into our Audio-Engine. The HW-Delay you see is the difference that the TimeStamp API calculates (fritschfiretv + Matrix) in comparison to standard Kodi Leia. Means for this content (Stereo) FireTV 4K was always roughly 180 to 200 ms wrong on average (and will stay wrong on official Leia builds), depending on sample even more.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
  • 1
  • 58
  • 59
  • 60(current)
  • 61
  • 62
  • 119

Logout Mark Read Team Forum Stats Members Help
2018 - Amazon Fire TV Stick 4K3