[mythtv-users] Odd squishing of aspect ratio by mythtranscode

Zuriel elpinkus at yahoo.com
Fri Jul 29 11:38:59 UTC 2011


From: E. Westbrook <mythtv-users at westbrook.com>
To: Discussion about MythTV <mythtv-users at mythtv.org>
Sent: Friday, July 29, 2011 5:47 PM
Subject: [mythtv-users] Odd squishing of aspect ratio by mythtranscode
> 
> Hello all,
> 
> I'm seeing "squished" video after transcoding and I wonder if it's pilot error
> on my part or a bug.  Nothing jumped out at me when searching commits, bugs,
> wiki, or google.

I have also seen this, but it hasn't reached the top of my to-do list. All my
content is widescreen, so I just set mythfrontend to 16:9 and forgot about it.

Picking a file at random off my backend to ffmpeg -i:

ffmpeg -i 1080_20110630213300.nuv

[nuv @ 0x63a420]Estimating duration from bitrate, this may be inaccurate
Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
Input #0, nuv, from '1080_20110630213300.nuv':
  Duration: 58:47:46.51, start: 93587.964000, bitrate: 127 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 1920x1088, PAR 34:45 DAR 4:3, 25 tbr, 1k tbn, 1k tbc
    Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 128 kb/s

Running two day old master. I think it started a month or two ago? As I said, I
haven't investigated.

Oh, I also changed the default aspect ratio in Mythweb to 16:9 to make the
thumbnails and flash video streaming use the correct aspect ratio. These were
all defaulting to 4:3.

> <snip>
> 
> Below are links to "dd" extracts of the video files, and a log extract.
> 
> Anything else needed can be cheerfully provided.
> 
> Thanks for any thoughts!
> Eric
> 
> As recorded (.mpg.old)
> Clip: http://westbrook.com/1021_20110728183000_trim.mpg (8MB)
> http://westbrook.com/20110729004037432050246a.png

ffmpeg -i:
Input #0, mpegts, from '1021_20110728183000_trim.mpg':
  Duration: 00:00:04.74, start: 71944.511700, bitrate: 14147 kb/s
  Program 1
    Stream #0.0[0x31]: Video: mpeg2video (Main), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 14950 kb/s, 59.96 fps, 59.94 tbr, 90k tbn, 119.88 tbc
    Stream #0.1[0x34](eng): Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s

> As transcoded (.nuv)
> Clip:  http://westbrook.com/1021_20110728183000_trim.nuv (8MB)
> http://westbrook.com/20110729004054281259735a.png

[nuv @ 018EB9D0] Estimating duration from bitrate, this may be inaccurate
Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 59.94 (60000/1001)
Input #0, nuv, from '1021_20110728183000_trim.nuv':
  Duration: 00:00:47.61, start: 0.016000, bitrate: 1409 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 1280x720, PAR 3:4 DAR 4:3, 59.94 tbr, 1k tbn, 1k tbc
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 1411 kb/s

So the video stream is the right resolution (1280x720, 16:9) but the aspect
ratio in the mpegts stream is being ignored and 4:3 assumed, then 4:3 is stored
in the nuv container and so the video is being displayed as 4:3? Just guessing.

I don't know how mythweb failing to find the aspect ratio in the database and
using the default setting relates to any of this, might just be the initial
detection not working right and causing problems for everything else.

Incidentally, my mythweb hack was just:

mythweb/modules/stream/stream_flv.pl

         } else {
-            $x = 4; $y = 3;
+            $x = 16; $y = 9;


mythweb/modules/tv/classes/Program.php

             default:
-                return 4/3;
+                return 16/9;



More information about the mythtv-users mailing list