[mythtv-users] Transcoding and aspect ratio (DVB-T)
Torbjörn Jansson
torbjorn.jansson at gmail.com
Sat May 6 07:19:45 EDT 2006
(old thread i know, but haven't read the user list in a while)
2006/4/3, Ian Grant <mailinglists at iangrant.me.uk>:
> > You were talking to one of them (ie, me) in the thread you linked to
> > above. This isn't an issue for me, so I haven't got the itch to research
> > it, but if you can find out, I can modify the mpeg4 transcoder to support
> > it.
> >
>
> I would love to get this working [as I imagine/want it to work], but have
> no real skill to offer myself. I'm happy to help, test, etc., in any way I
> can, though. I don't know how many other people are experiencing the same
> problems, certainly I suppose it would not be a problem if I were using a
> normal Linux frontend.
>
> I suspect it also requires some work on DSMyth, which is under development,
> but I think slowly.
yes, it's been slow.
but if someone want's to help out they're welcome to do so.
> I don't think the suggestion I quote of specifying a 16:9 resolution when
> transcoding (or adding black bars, if that were possible) is flexible
> enough, as the problem is particularly complex with DVB, where different
> programmes are transmitted in different aspect ratios and resolutions.
exactly, one field for aspect ratio at the begining of the file is not
going to work properly and do the right thing.
for example, what if the recording started as 4:3 and then later when
the movie started it's in 16:9, how do you choose one aspect ratio for
that?
if you pick the aspect at the begining of the recording, the rest of
it is going to look bad.
that's why the dsmyth filters is hardcoded to use 4:3 and when i wrote
that part of the code mythtv always used 4:3 in the file header so
there was not much point in using it.
but, if you do want to make the windows filters use the aspect
specified in the file header anyway, it's just a 2 line change in the
file NuvReader.cpp
in the function CNuvReader::GetVideoType the is 2 lines:
pVIH2->dwPictAspectRatioX=4;
pVIH2->dwPictAspectRatioY=3;
change that to something like
pVIH2->dwPictAspectRatioX=m_fileheader.aspect*1000;
pVIH2->dwPictAspectRatioY=1000;
or do some kind of lookup table for the most common aspects and then
use more accurat values for X and Y.
but, just because of this change doesn't mean the mediaplayer will
allways use it.
for this to work the mpeg4 decoder and video renderer must be using
VIDEOINFOHEADER2 and the mpeg4 decoder must forward the aspect info to
the video renderer.
More information about the mythtv-users
mailing list