[mythtv-users] 0.24 mythpreviewgen issues - first frame always

Kevin Blackham blackham at gmail.com
Mon Apr 4 05:49:47 UTC 2011

I've been running a user job to convert my recordings to h264, then
update recorded.basename.  They play back fine in the frontend, DLNA
server, even the mythweb flash player.  However, the mythpreviewgen
command seems to be doing something odd.

Even though it logs "AFD: Opened codec 0x2394660, id(H264) type(Video)
... Preview: Grabbed preview '/space/mythtv/2249_20110328210000.mp4'
640x480 at 620s" - it has not grabbed a frame from near 620s, it is
grabbing the first frame.  In my case, that first frame is trash due
to cheap BTTV card, analog issues, or something of the sort.  It does
not appear to be an encoding anomaly. Example images:

First frame of h264: http://i.imgur.com/BuiVR.png
First frame of RTjpeg: http://i.imgur.com/ryjUx.png
Preview generated from h264: http://i.imgur.com/Tb2mb.png
Preview generated from RTjpeg: http://i.imgur.com/bg6Nh.png
...and approximate offset in h264 where it matches: http://i.imgur.com/D7hP0.png

Command used (per backend logs): mythpreviewgen --size 0x0 --chanid
2249 --starttime 20110328210000
...and manually specifying --seconds or --frame has no effect.  It's
always the first frame.

If I use something like "mplayer -ss 300 -frames 1 -vo png:z=9 -ao
none 2249_20110328210000.mp4" I can generate a "00000001.png" which is
a proper image.  Whatever implementation mythpreviewgen is using seems
broken.  Noteworthy though is this message from mythpreviewgen:

Player(0): GetScreenGrabAtFrame: Recording does not have position map
so we will be unable to grab the desired frame.
Run 'mythcommflag --file 2249_20110328210000.mp4 --rebuild' to fix.

Rebuilding the map as suggested does not help.  Message repeats.
Completely re-scanning the h264 for commercial flagging does not make
it go away either (note: after scanning h264, then simply changing
recorded.basename back to 2249_20110328210000.nuv, It did generate the
RTjpeg preview linked above).  What is this position map?

Slightly related thread?
mythpreviewgen version: fixes/0.24 [v0.24-231-gc2baf1b]

More information about the mythtv-users mailing list