Android FireTV and Nexus Player - Jerky video playback (not as trivial as you think)
#1
Hey guys,

To get it out of the way: I'm not a complete noob when it comes to home video and computers/programming. Trust me when I say my playback issues are *not* caused by network issues, video files, or terrible eyes Big Grin
Video files are stored on a NAS, conntected via an ethernet cable at 1000mbit/s to the router. The router has wireless-AC and that's how the Android boxes are connected, they are right next to the router (literally only 30cm/1ft apart, with only air between them). The files are shared via the NFS protocol.

The issue up until 15.2:
I have the new Fire TV box with Kodi 15.2 installed. It is running with 1080p@60Hz connected via HDMI on a Samsung UE55ES6100 which I have fully calibrated with a X-Rite i1Display Pro colorimeter. For testing purposes Motion Plus (interpolation) has been completely turned off.
When I try playing h264 files (24p and either 720p or 1080p and regardless of bitrate) the video appeared somehow "jerky" (hard to describe). I'm not talking about the 3:2 pulldown. I tried turning off MediaCodec and also libstagefright but the playback still was jerky. Playing the same file in the native photo player, in the VLC for android player, and in the MX player yielded no such issue. The video there was perfectly smooth.
This issue became much more clear when I turned Motion Plus on on my TV (blur reduction 10, judder reduction 6, this produces no "soap opera" effect but does a PERFECT 24p -> 60Hz conversion, usually). With the effect turned on, I could see the jerkyness manifold. It seemed to me like the TV was getting confused about how the frames were coming in. It would perfectly smooth out the scenery pans for 1-3 seconds and then it would get thrown off by something and would jerk really hard for like 0.5-1s and struggle to "stabilize" for the next 1-2s. As if the images it received were not "conventional" or something and it would get confused about weather this is a 24p video or what. This is not a Motion Plus issue, as this is also visible with it turned off but much harder to see because of all the "normal" judder caused by 24p on 60hz.

The weird thing is, during ALL of this testing, the "codecinfo" screen ALWAYS showed "dropped: 0" for the video Huh
And like I said, with all the other players the video was clearly smoother. Turning Motion Plus back on with my settings, it was superb. I have a test scene I use with a loooong scenery camera pan and it is smooth as butter, not a single jerk or anything. I also have a WDTV Live Player running at 60Hz and it also produces a perfectly smooth image.

So, obviously I was suspecting Kodi to be the issue. Not the issue per se, but probably using some "unusual" way of rendering/presenting the frames or something. A way that the Fire TV box/OS is not able to handle for some reason. And like I said, MediaCodec and libstagefright and software decoding didn't change anything. So I bought a Google Nexus Player. Running Marshmallow 6.0 and the latest November updates, I installed Kodi again and tried again. And what do you know, it has the EXACT same issue as the Fire TV player. Regardless of file, regardless of settings, regardless of renderer/decoder. Kodi could not produce smooth frames, but the other software players could unfortunately.

In a last hope I installed Kodi 16a4 on my FireTV:
Using MediaCodec-Surface and the issue is finally gone! Videos play buttery smooth now, it is amazing. I was so happy to being able to keep Kodi and not having to return the Android box (since there's nothing else even coming close to Kodi). Disabling MediaCodec-Surface and using the "old" MediaCodec produced the same jerky results as 15.2 did. Same goes for software decoding. Only MediaCodec-Surface was buttery smooth.

(btw: on 15.2 and 16a4, MediaCodec and MediaCodec-Surface were not able to render *.flv-Videos (VP6) on both the Nexus Player and the Fire TV; it worked with software decoding but I had to go to the menu to change it by hand every time)

So I was thinking of just using 16a4 since MediaCodec-Surface worked so well for me. This is until I tried to play a h264 video that uses BT.709 (shows up as "yuv420(tv, bt709)" in codecinfo). This time, the video was not "jerky" but had judder all over the place. I can't quite put my finger on it, but something is definitely wrong about the video playback, it is juddery all the time, as if the video was filmed with 20 fps or something. It is constant but very small judder, which I suspect not everybody "sees". It also seemed like the video was lagging behind the audio a little bit, but I'm not 100% sure on that. The same happens to 25p videos with BT.709, not only 24p.
However, I have the same judder for these videos in ALL of the software players I tested (VLC, MX, internal). I'm not able to get rid of it for BT.709 videos, regardless of setting. But seeing this is not only in Kodi, I assume Fire TV screws up somehow, which is a shame. Unfortunately I don't have the Nexus Player anymore to test the same videos on it to see if it has the same issue. Unfortunately I have lots of movies in BT.709 and can't use my Fire TV for this Undecided Do you guys happen to have any ideas why this is?

Debug kodi.log
This is the log I did for Kodi 16a4 with MediaCodec-Surface for the issue with the BT.709 video ( = small but constant video judder)

Debug kodi.log
This is the log for Kodi 16a4 with MediaCodec for all 24p videos ( = jerky video)

Debug kodi.log
This is the log for Kodi 16a4 with software decoding for all 24p videos ( = same result as MediaCodec)

Debug kodi.log
This is the log for Kodi 16a4 with MediaCodec-Surface for all non-BT.709 videos ( = usually smooth, but not when debug logging is turned on, lol)

Sorry for the long post.
Reply
#2
No one? Sad Not even on the juddery BT.709 video with MediaCodec-Surface?
Reply
#3
No a lot of love round these parts for closed secured Firmware devices like the Amazon FireTV's anymore.
Especially when FireTV's are from a company that is openly Hostile to any legal Open Source software like Kodi.

Its a simple fact of life that naturally Kodi Diamond sponsors come first as they are actually willing to work with the Kodi devs. They also care about making sure their Firmware is Kodi compatible with regular updates. Do you think Amazon care about this anymore ?
Then there is the fact, with Android. Koying carries most of the development work load I believe so this Amazon gear is near the bottom of the priorities list.

You have bought a cheap DRM streaming device, that in all likelihood is sold at a loss so Amazon can trap you in their ecosystem and get your to pay for video streaming. That it happens to run Kodi - OK up till this point was a bonus.

Cross your fingers and maybe wait for Firmware fix from Amazon if your very patient, or buy new Kodi compatible Hardware.

Reply
#4
Oh believe me, I know about Amazon's antics all too well. But the Fire TV is still an Android box and the Google Nexus Player had the same issues.
The thing is, I wanted an all-in-one box that not only could do Kodi but also YouTube, Spotify and some other stuff. Android was the best choice for this IMO. I bought multiple Android boxes and ended up keeping the Fire TV 2 because it had 2GB RAM, wifi AC, ran pretty well overall and as a bonus had working Prime Video (which I automatically have included in my membership anyway so why not use it?). I'm using the FireStarter launcher and now it's just another Android box.
I was considering the WeTek Core as well but it doesn't have wireless AC and it's not available (yet).
Reply
#5
(2015-11-13, 21:25)ellekz Wrote: Oh believe me, I know about Amazon's antics all too well. But the Fire TV is still an Android box and the Google Nexus Player had the same issues.
The thing is, I wanted an all-in-one box that not only could do Kodi but also YouTube, Spotify and some other stuff. Android was the best choice for this IMO. I bought multiple Android boxes and ended up keeping the Fire TV 2 because it had 2GB RAM, wifi AC, ran pretty well overall and as a bonus had working Prime Video (which I automatically have included in my membership anyway so why not use it?). I'm using the FireStarter launcher and now it's just another Android box.
I was considering the WeTek Core as well but it doesn't have wireless AC and it's not available (yet).

*cough* Nvidia Shield TV *cough*

Works excellent Smile I went from using Linux HTPC's to this and have zero regrets!

Sure, i doesn't solve the existing problems you are having. Wish i could help you there!

Cheers!
Reply
#6
(2015-11-13, 21:28)wyild1 Wrote: *cough* Nvidia Shield TV *cough*

Works excellent Smile I went from using Linux HTPC's to this and have zero regrets!

Sure, i doesn't solve the existing problems you are having. Wish i could help you there!

Cheers!

Yeah, I was looking into the Shield as well but it's 200 EUR + 40 EUR for the remote and it seemed like it only had the whole gaming hardware as an advantage over the Nexus and Fire TV, which I don't really have any need for. That's why I went with the others Smile

But I'm curious. How come the Google Nexus Player AND the Fire TV both suffer from the same issue but the Shield TV doesn't? Do you have a Samsung TV? Is it possible this issue has something to do with the TV? As in, the Samsung expects the 24p@60Hz frames to come in somehow differently than it does under Kodi and thus somehow struggles with all of this, like I decribed?

I need to find somone with a non-Samsung TV and test my box on it to rules this out...
Reply
#7
I'm actually waiting for FireOS 5 final to have a look at the Amazon thingies again, but yeah, I must admit it's hard to get interested in sub-shield devices Wink

Re Bt509, a sample would definitely help, but if it's the same on all players, there's very little chance anything can be done about it. Probably a hardware decoder issue.
If it also fails on the internal player, be sure to report the issue to Amazon.
Reply
#8
What the OP has posted has also mirrored my findings with my first revision of the amazon Fire TV and my Panasonic GT50 TV, except....

My connection between the AFTV and my Switch to the Media Server is a wired one, full gigabit and full throughput, wired with CAT5E cables etc etc etc. Whether it is a media server with SMB shares or using NFS shares it would not matter the jerkiness noted, with 0 dropped frames reported is fairly typical of my viewing experience with the AFTV, more noticeable on the panning scenes.I'm not convinced that disabling either of the hard acceleration options resolves it.

Trying the latest Jarvis beat was going to be next on my list of things to try.

I sort of regret getting rid of my dedicated Windows HTPC and whilst there are many advantages of having a small dedicated box over that of a comparatively large HTPC I did not have much in the way of issues with it.

At the time that I bought the AFTV it was on offer for £69. The NVidia Shield is now being sold with a remote and a controller for £149 and the Weetek Core remains "close" to being released, it has for a while now and so I'm tending to look at what is on the market now, plus it approaches the cost of the Shield.
But with being a Prime member I do get the great interface that the AFTV offers, I doubt that I would have bought the AFTV without having the benefits of the Prime service, not for the TV aspect but for the other Prime benefits.

So I'll try out the Jarvis build, I seem to be aware of this issue more than my wife who says that she hardly notices it, and take it from there.
Reply
#9
(2015-11-18, 09:40)Vimes Wrote: I seem to be aware of this issue more than my wife who says that she hardly notices it, and take it from there.

Yes, this was my impression as well. You and I seem to have a more trained eye for this. I blame YouTube and the like as a reason why people got "used" to crappy videos and playback. This is also why I don't really give too much credit when someone on the internet says "oh no it's working perfectly smooth for me!" unless it's from someone credible.

Try the Jarvis build with MediaCodec-Surface. It works pretty well for all videos except those marked with yuv420p(tv, bt709), which are usually WEB-DL shows off iTunes. For those I use my TV to play the videos. I've enabled DLNA in Kodi and now just right click on the video (context button on the Fire TV remote) and select "Play using..." and then my Samsung TV and it plays smooth (albeit the video quality is subpar since the video renderer in my TV is shitty, details are a little washed out). I hope it'll get fixed somehow by Google/Amazon soon, otherwise I'll probably look into the WeTek Core when it's finally available.

The Shield finally bundles the remote for the 199 EUR price tag, which is great. But the remote seriously lacks some buttons and I'm still not 100% convinced it doesn't suffer from the judder issue for BT.709 videos, since both the Fire TV 1+2 (with Fire OS 5.0.3) and the Google Nexus Player (Marshmallow) suffer from this issue.
Reply
#10
(2015-11-18, 15:24)ellekz Wrote:
(2015-11-18, 09:40)Vimes Wrote: I seem to be aware of this issue more than my wife who says that she hardly notices it, and take it from there.

Yes, this was my impression as well. You and I seem to have a more trained eye for this. I blame YouTube and the like as a reason why people got "used" to crappy videos and playback. This is also why I don't really give too much credit when someone on the internet says "oh no it's working perfectly smooth for me!" unless it's from someone credible.

Try the Jarvis build with MediaCodec-Surface. It works pretty well for all videos except those marked with yuv420p(tv, bt709), which are usually WEB-DL shows off iTunes. For those I use my TV to play the videos. I've enabled DLNA in Kodi and now just right click on the video (context button on the Fire TV remote) and select "Play using..." and then my Samsung TV and it plays smooth (albeit the video quality is subpar since the video renderer in my TV is shitty, details are a little washed out). I hope it'll get fixed somehow by Google/Amazon soon, otherwise I'll probably look into the WeTek Core when it's finally available.

The Shield finally bundles the remote for the 199 EUR price tag, which is great. But the remote seriously lacks some buttons and I'm still not 100% convinced it doesn't suffer from the judder issue for BT.709 videos, since both the Fire TV 1+2 (with Fire OS 5.0.3) and the Google Nexus Player (Marshmallow) suffer from this issue.


This post refers to the Wetek Play and not the Core, which has yet to be released....

http://forum.kodi.tv/showthread.php?tid=...pid2163992

it notes judder on 1080p playback.


This post noted stutter with the shield....

http://forum.kodi.tv/showthread.php?tid=220297&page=105

From post # 1574 you read about types of stutter / judder.

I understand about the many variables, including how the person perceives the content in terms of their own expectations and satisfaction etc. But as I tend to be particularly sensitive to these things it would be something that bothers me and also surprises me as well as I watch a film panning to see the stutters causing the micro burps and wondering how this is not bothersome for others...?

Apart from the Rasp Pi (which never showed stutter for me) my biggest success with a Kodi player was the traditional HTPC and whilst it might not be the most elegant or cheapest / smallest of solutions these days it does tend to remind me of the success that I had when using it over the years, whether with Kodi or Media Portal of old.

As you have noted the Shield has the std remote, albeit slightly gimped with few buttons, included in the price but I still kinda miss my MCE remote when using the AFTV and its very very few buttons. It doesn't matter how you map the buttons as only having a few still remains a few.
Reply
#11
(2015-11-08, 15:28)ellekz Wrote: So I was thinking of just using 16a4 since MediaCodec-Surface worked so well for me. This is until I tried to play a h264 video that uses BT.709 (shows up as "yuv420(tv, bt709)" in codecinfo). This time, the video was not "jerky" but had judder all over the place. I can't quite put my finger on it, but something is definitely wrong about the video playback, it is juddery all the time, as if the video was filmed with 20 fps or something. It is constant but very small judder, which I suspect not everybody "sees". It also seemed like the video was lagging behind the audio a little bit, but I'm not 100% sure on that. The same happens to 25p videos with BT.709, not only 24p.
However, I have the same judder for these videos in ALL of the software players I tested (VLC, MX, internal). I'm not able to get rid of it for BT.709 videos, regardless of setting. But seeing this is not only in Kodi, I assume Fire TV screws up somehow, which is a shame. Unfortunately I don't have the Nexus Player anymore to test the same videos on it to see if it has the same issue. Unfortunately I have lots of movies in BT.709 and can't use my Fire TV for this Undecided Do you guys happen to have any ideas why this is?

Really odd. BT709 is the universal and international standard for HD video... It's also known as ITU709. You'd expect all HD video using YCrCb encoding (which is what Blu-ray, Broadcast TV, most streaming services etc. use) to be using BT709. It defines what colours the RGB primaries are, how RGB is converted to YCrCb etc.

The TV flag is interesting though. Is the content you are watching native interlaced rather than progressive ? Some encoding uses TV=interlaced, Film=Progressive. (Though 24p wouldn't be interlaced so that might be a red herring)
Reply
#12
(2015-11-25, 12:22)noggin Wrote: Really odd. BT709 is the universal and international standard for HD video... It's also known as ITU709. You'd expect all HD video using YCrCb encoding (which is what Blu-ray, Broadcast TV, most streaming services etc. use) to be using BT709. It defines what colours the RGB primaries are, how RGB is converted to YCrCb etc.

The TV flag is interesting though. Is the content you are watching native interlaced rather than progressive ? Some encoding uses TV=interlaced, Film=Progressive. (Though 24p wouldn't be interlaced so that might be a red herring)

It is very odd indeed. I have an episode of a TV show from two providers. From Hulu and Netflix it shows up as "yuv420" (no issues) and from iTunes it shows up as "yuv420(tv, bt709)" (small constant judder). Here's the MediaInfo for both files:

Hulu:
Quote:General
[...]
Format : Matroska
Format version : Version 4 / Version 2
File size : 691 MiB
Duration : 52mn 14s
Overall bit rate : 1 850 Kbps
Encoded date : UTC 2015-11-23 17:23:19
Writing application : mkvmerge v7.6.0 ('Garden of Dreams') 64bit built on Feb 8 2015 13:04:34
Writing library : libebml v1.3.1 + libmatroska v1.4.2

Video
ID/String : 1
Format : AVC
Format/Info : Advanced Video Codec
Format_Profile : [email protected]
Format_Settings_CABAC/String : Yes
Format_Settings_RefFrames/String : 5 frames
CodecID : V_MPEG4/ISO/AVC
Duration/String : 52mn 14s
Width/String : 1 280 pixels
Height/String : 720 pixels
DisplayAspectRatio/String : 16:9
FrameRate_Mode/String : Constant
FrameRate/String : 23.976 fps
ColorSpace : YUV
ChromaSubsampling : 4:2:0
BitDepth/String : 8 bits
ScanType/String : Progressive
Default/String : Yes
Forced/String : No

Audio
[...]

iTunes:
Quote:General
[...]
Format : Matroska
Format version : Version 4 / Version 2
File size : 1.56 GiB
Duration : 52mn 2s
Overall bit rate : 4 279 Kbps
Encoded date : UTC 2015-11-23 17:37:39
Writing application : mkvmerge v8.0.0 ('Til The Day That I Die') 64bit
Writing library : libebml v1.3.1 + libmatroska v1.4.2
DURATION : 00:51:58.347000000
NUMBER_OF_FRAMES : 893
NUMBER_OF_BYTES : 24974
_STATISTICS_WRITING_APP : mkvmerge v8.0.0 ('Til The Day That I Die') 64bit
_STATISTICS_WRITING_DATE_UTC : 2015-11-23 17:37:39
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : No
Format settings, ReFrames : 2 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 52mn 2s
Bit rate : 3 810 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.172
Stream size : 1.39 GiB (89%)
Language : English
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Audio
[...]

This basically happens for all videos that show up as "yuv420(tv, bt709)". HOWEVER, there's instances where videos show up as something like "yuv420(tv, unknown/bt709/unknown)" (can't remember how exactly) and those are fine as well.
And like I said, the judder is not like the typical 3:2 pull-down for 24p content on 60Hz but a small and constant judder. It reminds me a little bit of 25p videos playing at 60Hz. But as others have mentioned, this must be some kind of platform bug since all video players seem to have this issue with those videos.
But the software decoder in Kodi is still jerky for all videos.
Reply
#13
Suspect it may be something else - and the BT709 flag a coincidence. In other words the mastering and encoding process may be different for the two sources, and the BT709 flagging just one element in the difference?

They also differ in CABAC and number of Reference Frames (iTunes doesn't use CABAC and only uses 2 ref frames, Hulu is using CABAC and 5 reference frames) for instance.

Also presumably the Hulu file is aimed at streaming playback whilst the iTunes file was for file-based playback - so there may be more fundamental differences in the way the resulting MKVs are encoded (particularly when it comes to time stamping?) - or was the file somehow created from iTunes by streaming?
Reply
#14
I could never get my Fire TV to play anything smooth with Kodi after when of the over the air updates. It used to work fine on 14.2 and then it stopped dropped frames and stutterinng all the time. Nothing else had changed other than the FireTV update. As its not rooted could not undo it. Every version of Kodi after this has suffered the same issue but Kodi does not report any issues or dropped frames. It drove me mad so I gave up and just use it for Amazon Prime now as that works brilliantly and got the Nvidia Shield for flawless playback for Kodi and Netflix as that also sucked on the Fire TV.
Reply
#15
Hi. I was directed to this thread from the nexus player thread.
http://forum.kodi.tv/showthread.php?tid=206515&page=48

I'm having all the same issues as the original poster except with a nexus player and lg tv. I've also recently installed a beta of android Jarvis after reading this thread. My experience is similar. Jarvis with the surface codec undoubtedly gets rid of the problem of glitches and the occasional stutter with the nexus player and this type of h264 file. (Hoorah) I've found though that the only way to make it really smooth is by forcing kodi to stop playing 24hz and force it to play 60hz on my 60hz screen (using the tvhz app)

I have no idea why playing 24p files on kodi at 60hz results in smoother playback than the 24hz it wants to play. I'm just pleased I've found a solution.

Come to think of it 24p at 60hz is how my tv plays Netflix streams and I have no problem with those either. The isengard build won't play smoothly on that setting (or any other setting) though.

There's two major bugs with Jarvis I've noticed so far. The contrast and brightness in the kodi settings has no effect. Much worse, subtitles won't load at all even though there's clearly an srt file in the same folder. I would report these bugs but it seems an unnecessarily difficult process to do it.

I still think I'd be better off with a wetek core when it's released (the Nvidia shield is to me massively overpriced) but this new surface codec is great for smoother playback on the nexus player.
Reply

Logout Mark Read Team Forum Stats Members Help
FireTV and Nexus Player - Jerky video playback (not as trivial as you think)1