Opened 3 years ago

Closed 12 months ago

#9411 closed defect (duplicate)

ffprobe reports wrong coded_height for AVC 1080p video

Reported by: asp Owned by:
Priority: normal Component: ffprobe
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by asp)

Running ffprobe on a 1080p AVC video reports a coded_height of 1080, instead of 1088 (which I believe is correct). This does not happen for HEVC.

How to reproduce:

ffprobe -print_format json -show_programs 1080p-avc.ts
...
"width": 1920,
"height": 1080,
"coded_width": 1920,
"coded_height": 1080,
...
ffprobe -version
ffprobe version N-103553-g5e7e2e5031 Copyright (c) 2007-2021 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration:
libavutil      57.  4.101 / 57.  4.101
libavcodec     59.  7.102 / 59.  7.102
libavformat    59.  5.100 / 59.  5.100
libavdevice    59.  0.101 / 59.  0.101
libavfilter     8.  7.101 /  8.  7.101
libswscale      6.  1.100 /  6.  1.100
libswresample   4.  0.100 /  4.  0.100

There's an old bug report of a similar issue that seems to have been fixed at some point: https://trac.ffmpeg.org/ticket/6958 I'm mentioning it because the coded_height seems to be correct in version 4.3.2, but not latest master commit.

Full output

ffprobe version N-103553-g5e7e2e5031 Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: 
  libavutil      57.  4.101 / 57.  4.101
  libavcodec     59.  7.102 / 59.  7.102
  libavformat    59.  5.100 / 59.  5.100
  libavdevice    59.  0.101 / 59.  0.101
  libavfilter     8.  7.101 /  8.  7.101
  libswscale      6.  1.100 /  6.  1.100
  libswresample   4.  0.100 /  4.  0.100
[h264 @ 0x55f94308ad00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x55f94308ad00] decode_slice_header error
[h264 @ 0x55f94308ad00] no frame!
[h264 @ 0x55f94308ad00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x55f94308ad00] decode_slice_header error
[h264 @ 0x55f94308ad00] no frame!
[h264 @ 0x55f94308ad00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x55f94308ad00] decode_slice_header error
[h264 @ 0x55f94308ad00] no frame!
[h264 @ 0x55f94308ad00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x55f94308ad00] decode_slice_header error
[h264 @ 0x55f94308ad00] no frame!
[h264 @ 0x55f94308ad00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x55f94308ad00] decode_slice_header error
[h264 @ 0x55f94308ad00] no frame!
[h264 @ 0x55f94308ad00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x55f94308ad00] decode_slice_header error
[h264 @ 0x55f94308ad00] no frame!
[h264 @ 0x55f94308ad00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x55f94308ad00] decode_slice_header error
[h264 @ 0x55f94308ad00] no frame!
[h264 @ 0x55f94308ad00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x55f94308ad00] decode_slice_header error
[h264 @ 0x55f94308ad00] no frame!
[h264 @ 0x55f94308ad00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x55f94308ad00] decode_slice_header error
[h264 @ 0x55f94308ad00] no frame!
[h264 @ 0x55f94308ad00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x55f94308ad00] decode_slice_header error
[h264 @ 0x55f94308ad00] no frame!
[h264 @ 0x55f94308ad00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x55f94308ad00] decode_slice_header error
[h264 @ 0x55f94308ad00] no frame!
[h264 @ 0x55f94308ad00] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x55f94308ad00] decode_slice_header error
[h264 @ 0x55f94308ad00] no frame!
Input #0, mpegts, from '/home/anders/ts-dumps/1080p-avc.ts':
  Duration: 00:00:13.88, start: 73535.690644, bitrate: 4157 kb/s
  Program 1 
    Metadata:
      service_name    : New Service - 1920x1080p50@4Mbps
      service_provider: 
  Stream #0:0[0x64]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn
{
    "programs": [
        {
            "program_id": 1,
            "program_num": 1,
            "nb_streams": 1,
            "pmt_pid": 99,
            "pcr_pid": 100,
            "start_pts": 73535690644,
            "start_time": "73535.690644",
            "end_pts": 73549570644,
            "end_time": "73549.570644",
            "tags": {
                "service_name": "New Service - 1920x1080p50@4Mbps",
                "service_provider": ""
            },
            "streams": [
                {
                    "index": 0,
                    "codec_name": "h264",
                    "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
                    "profile": "High",
                    "codec_type": "video",
                    "codec_tag_string": "[27][0][0][0]",
                    "codec_tag": "0x001b",
                    "width": 1920,
                    "height": 1080,
                    "coded_width": 1920,
                    "coded_height": 1080,
                    "closed_captions": 0,
                    "film_grain": 0,
                    "has_b_frames": 1,
                    "sample_aspect_ratio": "1:1",
                    "display_aspect_ratio": "16:9",
                    "pix_fmt": "yuv420p",
                    "level": 42,
                    "color_range": "tv",
                    "color_space": "bt709",
                    "color_transfer": "bt709",
                    "color_primaries": "bt709",
                    "chroma_location": "left",
                    "field_order": "progressive",
                    "refs": 1,
                    "is_avc": "false",
                    "nal_length_size": "0",
                    "id": "0x64",
                    "r_frame_rate": "50/1",
                    "avg_frame_rate": "50/1",
                    "time_base": "1/90000",
                    "start_pts": 6618212158,
                    "start_time": "73535.690644",
                    "duration_ts": 1249200,
                    "duration": "13.880000",
                    "bits_per_raw_sample": "8",
                    "disposition": {
                        "default": 0,
                        "dub": 0,
                        "original": 0,
                        "comment": 0,
                        "lyrics": 0,
                        "karaoke": 0,
                        "forced": 0,
                        "hearing_impaired": 0,
                        "visual_impaired": 0,
                        "clean_effects": 0,
                        "attached_pic": 0,
                        "timed_thumbnails": 0,
                        "captions": 0,
                        "descriptions": 0,
                        "metadata": 0,
                        "dependent": 0,
                        "still_image": 0
                    }
                }
            ]
        }
    ]
}

Attachments (1)

1080p-avc-small.ts (2.3 MB ) - added by asp 3 years ago.

Change History (4)

by asp, 3 years ago

Attachment: 1080p-avc-small.ts added

comment:1 by asp, 3 years ago

Description: modified (diff)

comment:2 by Balling, 12 months ago

Status: newopen

This happened after https://trac.ffmpeg.org/ticket/6958#comment:7

But yeah, Mediatrace shows:

11E0D1 pic_width_in_mbs_minus1: 119 (0x077)
11E0D2 pic_height_in_map_units_minus1: 67 (0x043)

so in fact it is 120x68 in x16 units, that is 1920x1088.

21C834    frame_cropping_flag (1 bytes)
21C834     frame_cropping_flag:                Yes
21C834     frame_crop_left_offset:             0 (0x0)
21C834     frame_crop_right_offset:            0 (0x0)
21C834     frame_crop_top_offset:              0 (0x0)
21C835     frame_crop_bottom_offset:           4 (0x4)

Last edited 12 months ago by Balling (previous) (diff)

comment:3 by Balling, 12 months ago

Resolution: duplicate
Status: openclosed

Lets close it as a dup of #6958 which was never apparently fixed or maybe regressed agsin.

Note: See TracTickets for help on using tickets.