跑步
ffprobe -v quiet -print_format json -show_format -show_frames -show_streams -unit -select_streams v "D:\CH621.ts" > "D:\CH621.ts.json" -skip_frame nointra
结果表明,所有 6 个 I-FRAMES 都是 IDR,但专业 TS-MPEG 分析器显示,在生成输出的编码器上配置的 2 秒间隔内,IDR 帧只有 3 个。那么,有人知道为什么吗?
ffprobe 版本 N-91504-g3735d55af3 版权所有 (c) 2007-2018 FFmpeg 开发人员使用 gcc 7.3.1 (GCC) 20180710 构建
FFPROBE 结果:
> {
> "frames": [
> {
> "media_type": "video",
> "stream_index": 0,
> "key_frame": 1,
> "pkt_pts": 936200658,
> "pkt_pts_time": "10402.229533 s",
> "pkt_dts": 936371658,
> "pkt_dts_time": "10404.129533 s",
> "best_effort_timestamp": 936200658,
> "best_effort_timestamp_time": "10402.229533 s",
> "pkt_duration": 3000,
> "pkt_duration_time": "0.033333 s",
> "pkt_pos": "752",
> "pkt_size": "6308 byte",
> "width": 400,
> "height": 224,
> "pix_fmt": "yuv420p",
> "sample_aspect_ratio": "224:225",
> "pict_type": "I",
> "coded_picture_number": 0,
> "display_picture_number": 0,
> "interlaced_frame": 0,
> "top_field_first": 0,
> "repeat_pict": 0,
> "color_range": "tv",
> "color_space": "bt709",
> "color_primaries": "bt709",
> "color_transfer": "bt709",
> "chroma_location": "left",
> "side_data_list": [
> {
> "side_data_type": "Active format description"
> }
> ]
> },
> {
> "media_type": "video",
> "stream_index": 0,
> "key_frame": 1,
> "pkt_pts": 936380658,
> "pkt_pts_time": "10404.229533 s",
> "pkt_dts": 936386658,
> "pkt_dts_time": "10404.296200 s",
> "best_effort_timestamp": 936380658,
> "best_effort_timestamp_time": "10404.229533 s",
> "pkt_duration": 3000,
> "pkt_duration_time": "0.033333 s",
> "pkt_pos": "169576",
> "pkt_size": "7285 byte",
> "width": 400,
> "height": 224,
> "pix_fmt": "yuv420p",
> "sample_aspect_ratio": "224:225",
> "pict_type": "I",
> "coded_picture_number": 1,
> "display_picture_number": 0,
> "interlaced_frame": 0,
> "top_field_first": 0,
> "repeat_pict": 0,
> "color_range": "tv",
> "color_space": "bt709",
> "color_primaries": "bt709",
> "color_transfer": "bt709",
> "chroma_location": "left",
> "side_data_list": [
> {
> "side_data_type": "Active format description"
> }
> ]
> },
> {
> "media_type": "video",
> "stream_index": 0,
> "key_frame": 1,
> "pkt_pts": 936398658,
> "pkt_pts_time": "10404.429533 s",
> "pkt_dts": 936551658,
> "pkt_dts_time": "10406.129533 s",
> "best_effort_timestamp": 936398658,
> "best_effort_timestamp_time": "10404.429533 s",
> "pkt_duration": 3000,
> "pkt_duration_time": "0.033333 s",
> "pkt_pos": "188000",
> "pkt_size": "21889 byte",
> "width": 400,
> "height": 224,
> "pix_fmt": "yuv420p",
> "sample_aspect_ratio": "224:225",
> "pict_type": "I",
> "coded_picture_number": 4,
> "display_picture_number": 0,
> "interlaced_frame": 0,
> "top_field_first": 0,
> "repeat_pict": 0,
> "color_range": "tv",
> "color_space": "bt709",
> "color_primaries": "bt709",
> "color_transfer": "bt709",
> "chroma_location": "left",
> "side_data_list": [
> {
> "side_data_type": "Active format description"
> }
> ]
> },
> {
> "media_type": "video",
> "stream_index": 0,
> "key_frame": 1,
> "pkt_pts": 936560658,
> "pkt_pts_time": "10406.229533 s",
> "pkt_dts": 936638658,
> "pkt_dts_time": "10407.096200 s",
> "best_effort_timestamp": 936560658,
> "best_effort_timestamp_time": "10406.229533 s",
> "pkt_duration": 3000,
> "pkt_duration_time": "0.033333 s",
> "pkt_pos": "353064",
> "pkt_size": "9635 byte",
> "width": 400,
> "height": 224,
> "pix_fmt": "yuv420p",
> "sample_aspect_ratio": "224:225",
> "pict_type": "I",
> "coded_picture_number": 5,
> "display_picture_number": 0,
> "interlaced_frame": 0,
> "top_field_first": 0,
> "repeat_pict": 0,
> "color_range": "tv",
> "color_space": "bt709",
> "color_primaries": "bt709",
> "color_transfer": "bt709",
> "chroma_location": "left",
> "side_data_list": [
> {
> "side_data_type": "Active format description"
> }
> ]
> },
> {
> "media_type": "video",
> "stream_index": 0,
> "key_frame": 1,
> "pkt_pts": 936647658,
> "pkt_pts_time": "10407.196200 s",
> "pkt_dts": 936689658,
> "pkt_dts_time": "10407.662867 s",
> "best_effort_timestamp": 936647658,
> "best_effort_timestamp_time": "10407.196200 s",
> "pkt_duration": 3000,
> "pkt_duration_time": "0.033333 s",
> "pkt_pos": "440860",
> "pkt_size": "7583 byte",
> "width": 400,
> "height": 224,
> "pix_fmt": "yuv420p",
> "sample_aspect_ratio": "224:225",
> "pict_type": "I",
> "coded_picture_number": 10,
> "display_picture_number": 0,
> "interlaced_frame": 0,
> "top_field_first": 0,
> "repeat_pict": 0,
> "color_range": "tv",
> "color_space": "bt709",
> "color_primaries": "bt709",
> "color_transfer": "bt709",
> "chroma_location": "left",
> "side_data_list": [
> {
> "side_data_type": "Active format description"
> }
> ]
> },
> {
> "media_type": "video",
> "stream_index": 0,
> **"key_frame": 1,**
> "pkt_pts": 936707658,
> "pkt_pts_time": "10407.862867 s",
> "best_effort_timestamp": 936707658,
> "best_effort_timestamp_time": " s",
> "pkt_duration": 3000,
> "pkt_duration_time": "0.033333 s",
> "pkt_pos": "516060",
> "pkt_size": "10647 byte",
> "width": 400,
> "height": 224,
> "pix_fmt": "yuv420p",
> "sample_aspect_ratio": "224:225",
> "pict_type": "I",
> "coded_picture_number": 15,
> "display_picture_number": 0,
> "interlaced_frame": 0,
> "top_field_first": 0,
> "repeat_pict": 0,
> "color_range": "tv",
> "color_space": "bt709",
> "color_primaries": "bt709",
> "color_transfer": "bt709",
> "chroma_location": "left",
> "side_data_list": [
> {
> "side_data_type": "Active format description"
> }
> ]
> }
> ],
> "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_time_base": "1/60",
> "codec_tag_string": "[27][0][0][0]",
> "codec_tag": "0x001b",
> "width": 400,
> "height": 224,
> "coded_width": 400,
> "coded_height": 224,
> "has_b_frames": 1,
> "sample_aspect_ratio": "224:225",
> "display_aspect_ratio": "16:9",
> "pix_fmt": "yuv420p",
> "level": 13,
> "color_range": "tv",
> "color_space": "bt709",
> "color_transfer": "bt709",
> "color_primaries": "bt709",
> "chroma_location": "left",
> "field_order": "progressive",
> "refs": 4,
> "is_avc": "false",
> "nal_length_size": "0",
> "id": "0x21",
> "r_frame_rate": "30/1",
> "avg_frame_rate": "30/1",
> "time_base": "1/90000",
> "start_pts": 936200658,
> "start_time": "10402.229533 s",
> "duration_ts": 540000,
> "duration": "6.000000 s",
> "bits_per_raw_sample": "8",
> "nb_read_frames": "6",
> "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
> }
> }
> ],
> "format": {
> "filename": "D:\\CH621.ts",
> "nb_streams": 4,
> "nb_programs": 1,
> "format_name": "mpegts",
> "format_long_name": "MPEG-TS (MPEG-2 Transport Stream)",
> "start_time": "10402.229533 s",
> "duration": "6.010667 s",
> "size": "586748 byte",
> "bit_rate": "780942 bit/s",
> "probe_score": 50