ATV2 - problem with video files encoded with 16 reference frames
#1
Disclaimer: I am using XBMC nightly on ATV2

Ok so I was going through my anime collection and somehow some series play great and some not so much. The strange thing is that nothing was more than 720p, but some series that I had problem with are SD quality only and still they did not play well with stuttering and buffering issue.

I did some research, looked into those files that I had trouble with and here's what I found - basically anything that is encoded using 16 reference frames would not work properly and I could kind of understand since 16 is way too much and some searching on google did confirm this. However the strange thing is I have files both SD and HD encoded with 12, 13, 14 and even 15 frames and they work flawlessly. I am not very familiar with encoding but would 16 frames require that much more power to process than 15 frames? Is the ATV2 capable of playing back 16 frames?

Anyway just want to know if this issue could be fixed, if not is there an easy way to fix my video files? I truly do not want to reencode those trouble files since there are quite a few of them.
Reply
#2
gecko666 Wrote:Disclaimer: I am using XBMC nightly on ATV2

Ok so I was going through my anime collection and somehow some series play great and some not so much. The strange thing is that nothing was more than 720p, but some series that I had problem with are SD quality only and still they did not play well with stuttering and buffering issue.

I did some research, looked into those files that I had trouble with and here's what I found - basically anything that is encoded using 16 reference frames would not work properly and I could kind of understand since 16 is way too much and some searching on google did confirm this. However the strange thing is I have files both SD and HD encoded with 12, 13, 14 and even 15 frames and they work flawlessly. I am not very familiar with encoding but would 16 frames require that much more power to process than 15 frames? Is the ATV2 capable of playing back 16 frames?

Anyway just want to know if this issue could be fixed, if not is there an easy way to fix my video files? I truly do not want to reencode those trouble files since there are quite a few of them.

i guess there is a limit somewhere ... for younit seems to be 15 ref frames on sd there ... the question if one more frame can be too much you can answer yourself i think ... where do you want to draw the line? 17 ref frames? But thats only one frame more then 16 ... and so on ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
The number of reference frames means squat unless coupled with size, profile and level.

/rant THERE IS A REASON THEY MAKE SPECS.... /rant.

The size, profile and level will set the number of reference frame needed. When IDIOTS think they can outsmart the spec by changing things, that's when trouble begins. Now stop that useless diddling and stick to the h264 spec and it will play fine on hardware decoders.
Reply
#4
Memphiz Wrote:i guess there is a limit somewhere ... for younit seems to be 15 ref frames on sd there ... the question if one more frame can be too much you can answer yourself i think ... where do you want to draw the line? 17 ref frames? But thats only one frame more then 16 ... and so on ...

We draw the line at 16, your point is moot since 16 is the top limit.




Quote:The number of reference frames means squat unless coupled with size, profile and level.

/rant THERE IS A REASON THEY MAKE SPECS.... /rant.

The size, profile and level will set the number of reference frame needed. When IDIOTS think they can outsmart the spec by changing things, that's when trouble begins. Now stop that useless diddling and stick to the h264 spec and it will play fine on hardware decoders.


Fair enough. To test everything out I encoded a short video using different settings as below:

[email protected] CABAC 14 Ref Frames - perfect playback
[email protected] CABAC 14 Ref Frames - perfect playback
[email protected] CABAC 15 Ref Frames - perfect playback
[email protected] CABAC 15 Ref Frames - perfect playback
[email protected] CABAC 16 Ref Frames - slow down, stuttering, buffering
[email protected] CABAC 16 Ref Frames - slow down, stuttering, buffering

Since I had another file at hand I tested it too:

[email protected] CABAC 16 Ref Frames - slow down, stuttering, buffering


As you can see everything else equal it's the 16th Reference Frame that makes all the difference.
Reply
#5
gecko666 Wrote:We draw the line at 16, your point is moot since 16 is the top limit.







Fair enough. To test everything out I encoded a short video using different settings as below:

[email protected] CABAC 14 Ref Frames - perfect playback
[email protected] CABAC 14 Ref Frames - perfect playback
[email protected] CABAC 15 Ref Frames - perfect playback
[email protected] CABAC 15 Ref Frames - perfect playback
[email protected] CABAC 16 Ref Frames - slow down, stuttering, buffering
[email protected] CABAC 16 Ref Frames - slow down, stuttering, buffering

Since I had another file at hand I tested it too:

[email protected] CABAC 16 Ref Frames - slow down, stuttering, buffering


As you can see everything else equal it's the 16th Reference Frame that makes all the difference.

Yeah ... but this nice statistic only works for your encoder settings. Other people might user other encoder settings and then 15 Ref frames might be to much aswell. (and for 1080p everything is different again)

So what davilla said ... Smile
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#6
Memphiz Wrote:Yeah ... but this nice statistic only works for your encoder settings. Other people might user other encoder settings and then 15 Ref frames might be to much aswell. (and for 1080p everything is different again)

So what davilla said ... Smile

Alright so how would you explain this then, I took a 480p file, encoded it with h.264 normal profile, turned off pretty much all the options, put on 16 reference frames and same problems. Don't care about 1080p and nobody should complain about those since the ATV can only output 720p anyway. For the record the files I tested earlier were indeed in HD 720p and yes anything below 15 frames did work, granted I did not turn on all the fancy options but most of them.

Now I'm not demanding anything here, just wanted to bring up a problem for the devs to look into IF they want to look into. Besides have you ever thought that perhaps many problems posted in this forum about slowdowns, buffering issues, etc. might actually have to do with this? Just some food for thought.
Reply
#7
I might just add code to detect out of spec h264 files and just refuse to play them. That would solve about 1/2 the 'buffering' issues that get reported.

I can even pop up a dialog box that indicates the abuse of encoding standards.
Reply
#8
davilla Wrote:I might just add code to detect out of spec h264 files and just refuse to play them. That would solve about 1/2 the 'buffering' issues that get reported.

I can even pop up a dialog box that indicates the abuse of encoding standards.

Ha, I'd love to see that actually. What might you put in that dialog?

If I have helped you in any way, please forgive me, it was entirely accidental.
Reply
#9
I will implement a different approach ... whenever we detect media with out of spec encoding - we look into the metadata and try to extract the person who encoded it ... then we lookup the contact information on facebook and whenever such a movie gets played we send an email to that person with the text ...

"Someone has setup us the bomb - all your base are belpng to us - increasing ref rames doesn't increase guts size"

so ... back to topic - i'm pretty sure there are some buffering/stuttering problems around which just get caused by out of spec encodings. Nothing to think about imho. There are also some really stupid movies outthere which get played from within xbmc - we can't do anything against this too Wink
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#10
Memphiz Wrote:so ... back to topic -...... There are also some really stupid movies outthere which get played from within xbmc - we can't do anything against this too Wink

Back off topic.... I get given.. oops... lent, a lot of movies, and some are god awful. Perhaps a dialog to warn me if I'm about to watch something horrible?

If I have helped you in any way, please forgive me, it was entirely accidental.
Reply
#11
Cranial Wrote:Back off topic.... I get given.. oops... lent, a lot of movies, and some are god awful. Perhaps a dialog to warn me if I'm about to watch something horrible?

then better don't watch transformers ... Wink ... so ... i stop spamming now ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#12
Still interesting that Apple's native player is able to do this.

gecko666, the problem could be any number of things, including that most of the hardware decoder in the ATV2 is undocumented. Apple knows secrets that we don't.

While it's doubtful that they will put effort into finding more info just for 16 ref frames, it's very possible that the secret that makes 16 ref frames works will come out with other secrets that they are interested in finding. When that will happen is anyone's guess, if ever. Dev resources are limited in many ways, so they will most often spend their time on fixing things for the greater good than the occasional out-of-spec file.

Cheers.
Reply
#13
(2011-11-19, 07:32)davilla Wrote: I might just add code to detect out of spec h264 files and just refuse to play them. That would solve about 1/2 the 'buffering' issues that get reported.

I can even pop up a dialog box that indicates the abuse of encoding standards.

sorry to resurrect such an old topic, but can this actually be done ? this would be really convenient.
Reply

Logout Mark Read Team Forum Stats Members Help
ATV2 - problem with video files encoded with 16 reference frames0