问题
When I run the following line on my video it only outputs P frames and B frames and no I frame,
ffprobe -select_streams v -show_frames -show_entries frame=pict_type -of csv 00000.MTS
How is it possible for a video not to have I frames.
Here is the link to the video.
According to this tutorial's definition, P frames are just built upon previous frames, If there is no other frame to build upon how can we use P frames?
Output of ffprobe -i 00000.MTS
is:
...
Input #0, mpegts, from '00000.MTS':
Duration: 00:17:13.24, start: 1.040000, bitrate: 16451 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
回答1:
As mentioned in Wikipedia
:
P-frames can contain either intra macroblocks or predicted macroblocks
So your video can contain I-frame macroblocks in P-frames.
回答2:
I see plenty of I-frames in the shared sample video.
Run
ffprobe videotoshare.mts -show_entries frame=key_frame,pict_type,pkt_pts_time -select_streams v -of compact -v 0 | grep ame=1
frame|key_frame=1|pkt_pts_time=1.520000|pict_type=I
frame|key_frame=1|pkt_pts_time=2.040000|pict_type=I
frame|key_frame=1|pkt_pts_time=2.560000|pict_type=I
frame|key_frame=1|pkt_pts_time=3.080000|pict_type=I
frame|key_frame=1|pkt_pts_time=3.600000|pict_type=I
frame|key_frame=1|pkt_pts_time=4.120000|pict_type=I
frame|key_frame=1|pkt_pts_time=4.640000|pict_type=I
frame|key_frame=1|pkt_pts_time=5.160000|pict_type=I
Full video shows similar readout
ffprobe videotoshare-full.mts -show_entries frame=key_frame,pict_type,pkt_pts_time -select_streams v -of compact -v 0 | grep ame=1
frame|key_frame=1|pkt_pts_time=1.120000|pict_type=I
frame|key_frame=1|pkt_pts_time=1.640000|pict_type=I
frame|key_frame=1|pkt_pts_time=2.160000|pict_type=I
frame|key_frame=1|pkt_pts_time=2.680000|pict_type=I
frame|key_frame=1|pkt_pts_time=3.200000|pict_type=I
frame|key_frame=1|pkt_pts_time=3.720000|pict_type=I
来源:https://stackoverflow.com/questions/48608792/my-video-has-no-keyframes-how-it-is-possible