h264 atv2 fails HW rendring
#1
Hi xbmc community!

I'd like to make a thread about h264 and hardware rendring, witch in several cases fails according to logs that I've found on the mighty internet and a log witch I've pasted to the mighty internet.

I've been trying to play a mkv file (in this case called sample.mkv). The first experience is that I can see it's pretty laggy on my TV. After quite some research here, and at other forums i find threads about fps (~24|50?), container(mkv/mp4), bitrate, codec(h264,x264,xvid) etc. witch need to be almost exactly as described. As I can see all these conditions are fulfilled. But it's still lagging.

As we can see from my log file the video are h264:
logfile Wrote:09:53:37 T:166338560 M:111636480 INFO: ffmpeg[9EA2000]: Stream #0.0: Video: h264, yuv420p, 1280x720, PAR 1:1 DAR 16:9, 23.98 fps, 47.92 tbr, 1k tbn, 47.95 tbc

And then it tries to use HW decoding:
logfile Wrote:09:53:37 T:166338560 M:111636480 INFO: Apple VideoToolBox Decoder...
09:53:37 T:166338560 M:111636480 DEBUG: FactoryCodec - Video: vtb - Opening
09:53:37 T:166338560 M:111636480 NOTICE: Open - using avcC atom of size(40)
09:53:37 T:166338560 M:111616000 ERROR: CreateVTSession - failed with status = (-12913)
as we also can see here FactoryCodec reports "Video: vtb"?

When ffmpeg and what seems to me is SW rendring starts up as fallback, we can se that it uses h264 codec:
logfile Wrote:09:53:37 T:166338560 M:111550464 NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
09:53:37 T:166338560 M:111550464 DEBUG: FactoryCodec - Video: ff-h264 - Opened
09:53:37 T:166338560 M:111550464 NOTICE: Creating video thread

And least but not last, I'd like to paste links for the other 2 log files that I've found:
http://pastebin.com/F2gFAqbf
http://pastebin.com/vjfDTnPE
(And yes, I can see that their ERROR (status code) are different than mine.. but the main thing is that we're all trying to HW decode h264)
And if you missed my logfile link earlier in this post, here it is again:
http://pastebin.com/NcGn726J

EDIT1: Here's the mkv file: http://dl.dropbox.com/u/10539564/sample.mkv
Reply
#2
General
Unique ID : 0 (0x0)
Complete name : sample.mkv
Format : Matroska
File size : 35.4 MiB
Duration : 1mn 1s
Overall bit rate : 4 849 Kbps
Encoded date : UTC 2010-02-22 21:41:29
Writing application : no_variable_data
Writing library : no_variable_data

Video
ID : 2
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1mn 1s
Bit rate : 4 560 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.206
Stream size : 33.3 MiB (94%)
Language : English

Audio
ID : 1
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : A_AC3
Duration : 1mn 1s
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : 17ms
Stream size : 1.40 MiB (4%)
Reply
#3
Hi again

Bumped into some more info. Smile

Found this logfile: http://cl.ly/2O3U0h3O261W2K37042d
Yes, this guy complains about laggy HD vid aswell.. BUT here HW rendering seems to work.. Therefore it's probably his wifi network or something.

Anyway..
There's a slight different on these log files.
working Wrote:12:16:27 T:186818560 M:105975808 INFO: ffmpeg[B22A000]: Stream #0.0: Video: h264, yuv420p, 1280x528, PAR 1:1 DAR 80:33, 23.98 fps, 24 tbr, 1k tbn, 47.95 tbc

not working Wrote:09:53:37 T:166338560 M:111636480 INFO: ffmpeg[9EA2000]: Stream #0.0: Video: h264, yuv420p, 1280x720, PAR 1:1 DAR 16:9, 23.98 fps, 47.92 tbr, 1k tbn, 47.95 tbc

As we can see.. there's 3 differences.
ffmpeg id (B22A000 | 9EA2000), what kind of ID is this? ffmpeg version or thread ID? and we can see that the aspect ratio is different.
Tho.. the most likely one which got my attention is the tbr.
In the working one the tbr is almost the same as fps and in the malfunction one it's the double.

after a little googleing about this we can see:
link
Robert Wrote:tbr is guessed from the video stream and is the value users want to see
when they look for the video frame rate, except sometimes it is twice
what one would expect because of field rate versus frame rate.

witch makes me belive that this error i get is a ffmpeg/xbmc bug?
Reply
#4
or an interlaced video ... 720i ... if this is possible with h264? ... Very complete logfile stuff ... hope someone could find something helpfull from it ...
Reply
#5
irc quotes
Quote:17:57 <davilla> ERROR: CreateVTSession - failed with status = (-12913) means it does not like the avcC atom, yet VDA was fine with it.
18:04 <davilla> log says, NOTICE: Open - using avcC atom of size(40)
18:04 <davilla> so it's using the supplied avcC atom that is contained in the video file.
18:07 <effbiai> which means the solution will be to override that?
18:08 <davilla> no, it's more complicted than that. the avcC atom describes how the h264 is encoded, you would not only need to fix that but also the actual encoded video.
Reply
#6
Memphiz Wrote:or an interlaced video ... 720i ... if this is possible with h264? ... Very complete logfile stuff ... hope someone could find something helpfull from it ...

Scan type : Progressive (line 17 under Video in post 2)
Reply
#7
Can you make this sample with dts or dolby pro logic sound, just to try? I belive it would play without buffering then.
My skins:

Amber
Quartz

Reply
#8
pecinko Wrote:Can you make this sample with dts or dolby pro logic sound, just to try? I belive it would play without buffering then.

I removed the sound and kept the original video track. No luck.
Reply
#9
Sample plays perfectly on my ATV2-XBMC. I am running the latest nightly build by keith, Feb 27th.
Reply
#10
dazex Wrote:Sample plays perfectly on my ATV2-XBMC. I am running the latest nightly build by keith, Feb 27th.

please post log
Reply
#11
efbiai:
Here you go, I played the sample.mkv until it ended.
http://pastebin.com/p2g72LL7
Reply
#12
Thanks.
Just formatted my atv2 and installed everything over again.
Suddenly it worked here as well.
Will try to provoke the error again, so that we know what it is.
Reply
#13
effbiai Wrote:Thanks.
Just formatted my atv2 and installed everything over again.
Suddenly it worked here as well.
Will try to provoke the error again, so that we know what it is.

You probably instaled newer Xbmc build?
My skins:

Amber
Quartz

Reply
#14
pecinko Wrote:You probably instaled newer Xbmc build?

Same build both times (27 feb).
Maybe it was an error with the vtb?
Reply

Logout Mark Read Team Forum Stats Members Help
h264 atv2 fails HW rendring0