[FFmpeg-trac] #3216(undetermined:new): ffprobe and ffmpeg functions return different last frame for same file
FFmpeg
trac at avcodec.org
Tue Dec 10 08:28:51 CET 2013
#3216: ffprobe and ffmpeg functions return different last frame for same file
-------------------------------------+-------------------------------------
Reporter: hxuanyu | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
I met an issue that the output of ffprobe -show_frames seems different
from what av_read_frame+avcodec_decode_video2 ouputs
The ffprobe and ffmpeg libs were built from same latest code.
I used ffprobe -show_frames -select_streams v input to print out all frame
info. and here's the info of last 2 frames
[FRAME]
media_type=video
key_frame=0
pkt_pts=N/A
pkt_pts_time=N/A
pkt_dts=167501
pkt_dts_time=167.501000
pkt_duration=N/A
pkt_duration_time=N/A
pkt_pos=103794518
pkt_size=74
width=1920
height=1080
pix_fmt=yuv420p
sample_aspect_ratio=1:1
pict_type=P
coded_picture_number=4016
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]
[FRAME]
media_type=video
key_frame=0
pkt_pts=N/A
pkt_pts_time=N/A
pkt_dts=167542
pkt_dts_time=167.542000
pkt_duration=N/A
pkt_duration_time=N/A
pkt_pos=103794920
pkt_size=74
width=1920
height=1080
pix_fmt=yuv420p
sample_aspect_ratio=1:1
pict_type=P
coded_picture_number=4017
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]
on the other hand, our application uses av_read_frame and
avcodec_decode_video2 to read a avpacket and decode into a frame. Below
are some traces
Line 100: 00:00:33.384 MAIN rhbc73 process packet, Packet.dts =
0, Packet.pts = -9223372036854775808
Line 101: 00:00:33.384 MAIN rhbc73 process packet, Packet.dts =
42, Packet.pts = -9223372036854775808
Line 102: 00:00:33.400 MAIN rhbc73 process packet, Packet.dts =
83, Packet.pts = -9223372036854775808
Line 103: 00:00:33.400 MAIN rhbc73 process packet, Packet.dts =
125, Packet.pts = -9223372036854775808
Line 104: 00:00:33.400 MAIN rhbc73 process packet, Packet.dts =
167, Packet.pts = -9223372036854775808
Line 105: 00:00:33.400 MAIN rhbc73
-- get a full frame, pFrame->pkt_dts = 0, pFrame->pkt_pts =
-9223372036854775808, BestEffortTimeStamp = 0,
pFrame->coded_picture_number = 0
Line 107: 00:00:33.400 MAIN rhbc73 process packet, Packet.dts =
209, Packet.pts = -9223372036854775808
Line 108: 00:00:33.400 MAIN rhbc73
-- get a full frame, pFrame->pkt_dts = 42, pFrame->pkt_pts =
-9223372036854775808, BestEffortTimeStamp = 42,
pFrame->coded_picture_number = 1
Line 110: 00:00:33.400 MAIN rhbc73 process packet, Packet.dts =
250, Packet.pts = -9223372036854775808
Line 111: 00:00:33.416 MAIN rhbc73
-- get a full frame, pFrame->pkt_dts = 83, pFrame->pkt_pts =
-9223372036854775808, BestEffortTimeStamp = 83,
pFrame->coded_picture_number = 2
Line 12140: 00:00:51.168 MAIN rhbc73 process packet, Packet.dts
= 167501, Packet.pts = -9223372036854775808
Line 12141: 00:00:51.168 MAIN rhbc73
-- get a full frame, pFrame->pkt_dts = 167334, pFrame->pkt_pts =
-9223372036854775808, BestEffortTimeStamp = 167334,
pFrame->coded_picture_number = 4012
Line 12143: 00:00:51.184 MAIN rhbc73 process packet, Packet.dts
= 167542, Packet.pts = -9223372036854775808
Line 12144: 00:00:51.184 MAIN rhbc73
-- get a full frame, pFrame->pkt_dts = 167376, pFrame->pkt_pts =
-9223372036854775808, BestEffortTimeStamp = 167376,
pFrame->coded_picture_number = 4013
so from this we can see last frame has different pkt_pts and
coded_picture_number from the output of ffprobe.
The file I tested is here
https://dl.dropboxusercontent.com/u/89678527/Threw%20It%20On%20The%20Ground.avi
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3216>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list