Alphamoose <[email protected]> added the comment:

Every slice in interlaced raw-264 is handled as one frame, although pairs of
slices are clearly marked as two fields of one frame (according to num_frame,
field_pic_flag). Resulting in double frame rate and dropped frames when encoding
as 25fps.
Sample file attached.

ffmpeg.exe -i E:\DVB\tmp\field_frame_detection.264
FFmpeg version SVN-r25685, Copyright (c) 2000-2010 the FFmpeg developers
  built on Nov  7 2010 04:09:14 with gcc 4.4.2
  configuration: --enable-gpl --enable-version3 --enable-libgsm
--enable-pthreads --enable-libvorbis --enable-libtheora --enable-libspeex
--enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger
--enable-libopencore_amrwb --enable-libopencore_amrnb --enable-libvpx
--disable-decoder=libvpx --arch=x86 --enable-runtime-cpudetect --enable-libxvid
--enable-libx264 --extra-libs='-lx264 -lpthread' --enable-librtmp
--extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --target-os=mingw32
--enable-avisynth --cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc'
--enable-memalign-hack
  libavutil     50.32. 6 / 50.32. 6
  libavcore      0.12. 0 /  0.12. 0
  libavcodec    52.94. 3 / 52.94. 3
  libavformat   52.84. 0 / 52.84. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.56. 0 /  1.56. 0
  libswscale     0.12. 0 /  0.12. 0
[h264 @ 019ce650] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 019cbd00] max_analyze_duration reached
[h264 @ 019cbd00] Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1)
-> 25.00 (50/2)
Input #0, h264, from 'E:\DVB\tmp\field_frame_detection.264':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 50 fps, 25
tbr, 1200k tbn, 50 tbc
At least one output file must be specified


First part of output of mpeg4ip's h264_parse:
h264_parse.exe - mpeg4ip version 1.5.0.1
Nal length 6 start code 4 bytes 
 ref 0 type 9 Access unit delimeter
   primary_pic_type: 0
Nal length 30 start code 4 bytes 
 ref 1 type 7 Sequence parameter set
   profile: 100
   constaint_set0_flag: 0
   constaint_set1_flag: 0
   constaint_set2_flag: 0
   constaint_set3_flag: 0
   level_idc: 40
   seq parameter set id: 0
   chroma format idx: 1
   bit depth luma minus8: 0
   bit depth chroma minus8: 0
   Qpprime Y Zero Transform Bypass flag: 0
   Seq Scaling Matrix Present Flag: 0
   log2_max_frame_num_minus4: 5
   pic_order_cnt_type: 0
    log2_max_pic_order_cnt_lsb_minus4: 5
   num_ref_frames: 4
   gaps_in_frame_num_value_allowed_flag: 0
   pic_width_in_mbs_minus1: 119 (1920)
   pic_height_in_map_minus1: 33
   frame_mbs_only_flag: 0
     derived height: 1088
    mb_adaptive_frame_field_flag: 0
   direct_8x8_inference_flag: 1
   frame_cropping_flag: 1
     frame_crop_left_offset: 0
     frame_crop_right_offset: 0
     frame_crop_top_offset: 0
     frame_crop_bottom_offset: 2
   vui_parameters_present_flag: 1
    aspect_ratio_info_present_flag: 1
     aspect_ratio_idc:1
    overscan_info_present_flag: 0
    video_signal_info_present_flag: 1
     video_format: 0
     video_full_range_flag: 0
     colour_description_present_flag: 1
      colour_primaries: 1
      transfer_characteristics: 1
      matrix_coefficients: 1
    chroma_loc_info_present_flag: 0
    timing_info_present_flag: 1
     num_units_in_tick: 1
     time_scale: 50
     fixed_frame_scale: 1
    nal_hrd_parameters_present_flag: 0
    vcl_hrd_parameters_present_flag: 0
    pic_struct_present_flag: 1
Nal length 8 start code 4 bytes 
 ref 1 type 8 Picture parameter set
   pic_parameter_set_id: 0
   seq_parameter_set_id: 0
   entropy_coding_mode_flag: 1
   pic_order_present_flag: 0
   num_slice_groups_minus1: 0
   num_ref_idx_l0_active_minus1: 0
   num_ref_idx_l1_active_minus1: 0
   weighted_pred_flag: 0
   weighted_bipred_idc: 0
   pic_init_qp_minus26: 0
   pic_init_qs_minus26: 0
   chroma_qp_index_offset: 0
   deblocking_filter_control_present_flag: 1
   constrained_intra_pred_flag: 0
   redundant_pic_cnt_present_flag: 0
Nal length 15 start code 4 bytes 
 ref 0 type 6 SEI
   payload_type: 0 buffering_period
   payload_size: 1 0xc0
    seq_parameter_set_id: 0
   payload_type: 6 recovery_point
   payload_size: 1 0xc4
    recovery_frame_cnt: 0
    exact_match_flag: 1
    broken_link_flag: 0
    changing_slice_group_idc: 0
   payload_type: 1 pic_timing
   payload_size: 1 0x14
    pict_struct: 1
    clock_timestamp_flag[0]: 0
Nal length 23650 start code 4 bytes 
 ref 1 type 1 Coded slice of non-IDR picture
   first_mb_in_slice: 0
   slice_type: 2 (I)
   pic_parameter_set_id: 0
   frame_num: 15 (9 bits)
   field_pic_flag: 1
    bottom_field_flag: 0
   pic_order_cnt_lsb: 64
Nal length 6 start code 4 bytes 
 ref 0 type 9 Access unit delimeter
   primary_pic_type: 1
Nal length 9 start code 4 bytes 
 ref 0 type 6 SEI
   payload_type: 1 pic_timing
   payload_size: 1 0x24
    string is "$"
    pict_struct: 2
    clock_timestamp_flag[0]: 0
Nal length 14468 start code 4 bytes 
 ref 1 type 1 Coded slice of non-IDR picture
   first_mb_in_slice: 0
   slice_type: 0 (P)
   pic_parameter_set_id: 0
   frame_num: 15 (9 bits)
   field_pic_flag: 1
    bottom_field_flag: 1
   pic_order_cnt_lsb: 65
Nal length 6 start code 4 bytes 
 ref 0 type 9 Access unit delimeter
   primary_pic_type: 2
Nal length 9 start code 4 bytes 
 ref 0 type 6 SEI
   payload_type: 1 pic_timing
   payload_size: 1 0x14
    pict_struct: 1
    clock_timestamp_flag[0]: 0
Nal length 8292 start code 4 bytes 
 ref 1 type 1 Coded slice of non-IDR picture
   first_mb_in_slice: 0
   slice_type: 1 (B)
   pic_parameter_set_id: 0
   frame_num: 16 (9 bits)
   field_pic_flag: 1
    bottom_field_flag: 0
   pic_order_cnt_lsb: 60
Nal length 6 start code 4 bytes 
 ref 0 type 9 Access unit delimeter
   primary_pic_type: 2
Nal length 9 start code 4 bytes 
 ref 0 type 6 SEI
   payload_type: 1 pic_timing
   payload_size: 1 0x24
    string is "$"
    pict_struct: 2
    clock_timestamp_flag[0]: 0
Nal length 15310 start code 4 bytes 
 ref 1 type 1 Coded slice of non-IDR picture
   first_mb_in_slice: 0
   slice_type: 1 (B)
   pic_parameter_set_id: 0
   frame_num: 16 (9 bits)
   field_pic_flag: 1
    bottom_field_flag: 1
   pic_order_cnt_lsb: 61
Nal length 6 start code 4 bytes 
 ref 0 type 9 Access unit delimeter
   primary_pic_type: 2
Nal length 9 start code 4 bytes 
 ref 0 type 6 SEI
   payload_type: 1 pic_timing
   payload_size: 1 0x14
    pict_struct: 1
    clock_timestamp_flag[0]: 0
Nal length 15081 start code 4 bytes 
 ref 0 type 1 Coded slice of non-IDR picture
   first_mb_in_slice: 0
   slice_type: 1 (B)
   pic_parameter_set_id: 0
   frame_num: 17 (9 bits)
   field_pic_flag: 1
    bottom_field_flag: 0
   pic_order_cnt_lsb: 58
Nal length 6 start code 4 bytes 
 ref 0 type 9 Access unit delimeter
   primary_pic_type: 2
Nal length 9 start code 4 bytes 
 ref 0 type 6 SEI
   payload_type: 1 pic_timing
   payload_size: 1 0x24
    string is "$"
    pict_struct: 2
    clock_timestamp_flag[0]: 0
Nal length 14934 start code 4 bytes 
 ref 0 type 1 Coded slice of non-IDR picture
   first_mb_in_slice: 0
   slice_type: 1 (B)
   pic_parameter_set_id: 0
   frame_num: 17 (9 bits)
   field_pic_flag: 1
    bottom_field_flag: 1
   pic_order_cnt_lsb: 59
File 'field_frame_detection.264' not attached - you can download it from 
https://roundup.ffmpeg.org/file1156.

----------
priority: normal -> important
status: closed -> open
substatus: needs_more_info -> approved

________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue1457>
________________________________________________

Reply via email to