[mythtv-users] hdpvr_lossless_cut.sh drops 1/2 the fields from BBC-HD 1080i

belcampo belcampo at zonnet.nl
Sun Jul 11 09:41:54 UTC 2010


Althought there was no guarantee it would work according to:
# This script *might* work on 1080i material now.  Who knows?
I tried it and it drops half the fields.

mediainfo -f 8940_20100616225500.mkv 8940_20100616225500.mpg |grep "Bit 
rate"|grep ps
Bit rate                         : 6 633 Kbps
Bit rate                         : 12.7 Mbps

Probably the problem is in 'some' ffmpeg library which doesn't know the 
difference between fields and frames.

A LLOOONNNNGG time ago following patch solved that for me. I'm not the 
author, found it then and am happy with my old ffmpeg version.

Index: libavcodec/h264_parser.c
===================================================================
--- libavcodec/h264_parser.c    (revision 17591)
+++ libavcodec/h264_parser.c    (working copy)
@@ -120,6 +120,7 @@
      /* set some sane default values */
      s->pict_type = FF_I_TYPE;
      s->key_frame = 0;
+    s->field_frame_flag = 0;

      h->s.avctx= avctx;
      h->sei_recovery_frame_cnt = -1;
@@ -200,6 +208,7 @@
                      case SEI_PIC_STRUCT_TOP_FIELD:
                      case SEI_PIC_STRUCT_BOTTOM_FIELD:
                          s->repeat_pict = 0;
+                        s->field_frame_flag = 1;
                          break;
                      case SEI_PIC_STRUCT_FRAME:
                      case SEI_PIC_STRUCT_TOP_BOTTOM:


More information about the mythtv-users mailing list