Kodi Community Forum

Full Version: hints.aspect not set while opening codec
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a problem adjusting the video size inside video/CDVDDecoder::OpenStream().

In Helix the hints.aspect was normally set to a value giving me the possibility stretching the video by setting iDisplayWidth / height to get it visibly correct.
In Kodi Isengard I normally get the aspect value 0 and have no possibility to adjust the settings.

Regarding CDVDCodecAmlogic.cpp it is line 191ff:

Code:
if (m_hints.aspect > 0.0 && !m_hints.forced_aspect)
  {
    m_videobuffer.iDisplayWidth  = ((int)lrint(m_videobuffer.iHeight * m_hints.aspect)) & -3;
    if (m_videobuffer.iDisplayWidth > m_videobuffer.iWidth)
    {
      m_videobuffer.iDisplayWidth  = m_videobuffer.iWidth;
      m_videobuffer.iDisplayHeight = ((int)lrint(m_videobuffer.iWidth / m_hints.aspect)) & -3;
    }
  }

For reproduction:

- TVHeadEnd
- PVR Addon
- Choose a german SD Channel (WDR3 / SAT1 or similar)
- My screen resolution: 1080p
- Latest release from Master with Odroid XU3 specific MFC Decoder for Video

Has there be anything changed? I could try to figure the problem out but then it would be great if somebody can explain in some words the internal workflow (files / methods would be optimal).

Currently this happens:

- Video is opened
- DVDDecoder say that its not decodable because hints are invalid (first frames do not contain enough information)
- FFMPEG Decoding is activated until the necessary information are present (width / height / fps, (aspect ratioHuh?))
- DVDDecoder is opend again with success (hint are valid, but unfortunately aspect is 0)

Thanks for your support and the great kodi application!
Hi I am not sure if this has anything to do with you are talking about, but since I upgraded to isengard on wetek play, it seems to have trouble detecting the correct aspect ratio when playing some channels in live tv via tvheadend. Some 16:9 are squashed into 4:3.

Log: http://sprunge.us/GfES
(2015-06-19, 09:30)marathont Wrote: [ -> ]I upgraded to isengard on wetek play

What kind of H/W VideoDecoder is used? And what kond of video format are you talking about (press o and read the information from overlay)?
Afaik the stuation depends on the ability of the decoder to react on aspect ratio changes while running a video.

In Helix on Decoder initalization time normally the correct aspect ratio was passed - this is not so with Isengard.
Maybe some issue / change in the ffmpeg library wich graps out the stream info by running as many frames as necessary before switching to h/w decoding.
I have solved the issue inside the MFC decoder I'm using for my odroid xu3-device (looking on each frame with BitStreamConverter until the frame with the necessary information arrives).

But: It really seems that something has changed between K14 and K15, maybe it's the ffmpeg library wich normally reads the streams until all information are available??
I have seen that at least AmLogic Decoder also checks continuous Mpeg2 Streams for display changes, but I think it would be good if all hints are available directly on start to avoid image flashing on startup.
I just checked one of my videos with the xbmc master branch (using ffmpeg).
The video (https://www.dropbox.com/s/ponzkd4mrsozj1...-1.ts?dl=0) is a short Live-TV record (11MB).

It is not displayed in the correct aspect ratio and there are some mpeg log errors regarding "Image size invalid"

Playing this video with K14 (Helix) it is displayed correctly (havent tested today but I'm quite sure)
Also the packet send via hints to the Open() method of the decoder is not an valid frame to initialize h/w decoder buffers (is it the P-frame??).

[Edit] Seems more like I was sure that this video fills the sceen, but the aspect 1.33 is in the stream so it is corrrectly displayed.
Pls. don't do anything with this post......
Hi

I just tried out TVH with Kodi and I noticed the same bug that the Aspect ratio is not detected correctly. In my case I also noticed it on SD and HD channels.
When I set it to"16:9" all channels look ok.
We've left hints.aspect unset because otherwise aspect ratio changes midstream weren't detected by Kodi. I'm not sure if this is an issue anymore.

To those of you who have the wrong aspect ratio, can you open a ticket on trac.kodi.tv?
I can do that yes
Ok here is the ticket:

http://trac.kodi.tv/ticket/16085#ticket

If someone subcribes and maybe posts a log that would be great. Since I only have a production machine I can't change back to TVH for a couple of days to get a log.