[mythtv-users] 1920x1080 transcode adds "grey bar"

Jonathan Rogers jonner at teegra.net
Wed Nov 7 21:34:37 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Randall Hopper wrote:
> Jonathan Rogers:
>  |Randall Hopper wrote:
>  |>      When Myth transcodes 1920x1080i programs to MPEG-4, it incorrectly
>  |> adds a "grey bar" at the bottom of the transcoded video.
>  |
>  |That is the issue and it's not just a limitation of MPEG-4, but MPEG-2
>  |also. The 1080i MPEG-2 video is actually 1920x1088, but players such as
>  |MythTV and mplayer know that eight lines should be cropped to get
>  |1920x1080. 
> 
> Is 1080 or 1088 stored for the video height in the MPEG file header?  I'd
> suspect it's the former (how do I check?).  Surely every decoder in the
> world isn't hard-coded to crop a magic number of "1088" lines down to 1080.

That's a very good question that I don't know the answer to, since I
haven't seen it in any discussions of MPEG or ATSC I've encountered so
far. I just know that I've observed players such as mplayer and MythTV
detecting and displaying an image of 1920x1080 rather than 1920x1088,
though I've been informed by several sources that an MPEG-2 image must
have dimensions in multiples of 16.

>  |So, either no lines are being added or mythtranscode is cropping eight
>  |lines and then adding eight new grey ones to make an MPEG-4 compatible
>  |frame. ...
>  |
>  |I'm not certain what the best way to handle the video would be. 
> 
> I'd be happy if it mythtranscode just encoded black lines instead of grey
> ones (if it had to encode them at all).  
> 
> Displaying 16:9 transcoded video on a 4:3 TV results in a nasty gray line
> running through the middle of the display.  But black I could live with --
> totally ignorable.

Through the middle? I thought it would be at the bottom, where it would
probably be in the overscan area of a CRT TV.

> 
>  |As you've noted, the MPEG-4 video can't have 1080 lines any more than the
>  |source MPEG-2 video can. I would guess that mythtranscode cannot or does
>  |not put any metadata in the output MPEG-4 video stream to indicate that
>  |eight lines should be cropped, so you see the eight grey lines that were
>  |always there, but were properly cropped when playing back the original
>  |recorded stream.
> 
> I'm actually not seeing 8 lines.  I'm seeing 3.  1920x1088 transcoded down
> to 720x480 shrinks the 8 bogus lines to 3. 
> 
> This suggests mythtranscode isn't tossing the 8 extra lines away before
> transcoding down to 720x480.

I understood that you were not resizing the video before encoding. If
mythtranscode is resizing, it should resize the 1920x1080 image down to
an MPEG-4 compatible size, discarding the extra lines at the beginning,
which would result in no extra lines of any color.

According to Michael T. Dean's response, it sounds like this is a bug in
mythtranscode that has been fixed in SVN trunk. I haven't encountered
this bug either because I haven't used mythtranscode to resize 1080i
down to 720x480 or because I have been using SVN trunk for a long time.

Jonathan Rogers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHMi9sMs6f82yVS5wRApMSAKCSW0cBLeisV1ls+KTkFIaEsHIgDgCdFuZY
errobqUoekPMRQnCD3KPjGA=
=8FxK
-----END PGP SIGNATURE-----


More information about the mythtv-users mailing list