<div dir="ltr">Hi friends,<div><br></div><div>The test video I used is a bit large, it's about 100 MB <a href="https://dl.dropboxusercontent.com/u/89678527/Threw%20It%20On%20The%20Ground.avi">https://dl.dropboxusercontent.com/u/89678527/Threw%20It%20On%20The%20Ground.avi</a></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/11 ವಿನೋದ್ Vinod H I <span dir="ltr"><<a href="mailto:vinvinod@gmail.com" target="_blank">vinvinod@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">It would be better if you can give a link to the test video file also.<br></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Tue, Dec 10, 2013 at 6:29 PM, Safi ud Din Khan <span dir="ltr"><<a href="mailto:safiuddinkhan@gmail.com" target="_blank">safiuddinkhan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
I can understand its all extremely confusing .... i have also been
to this stuff it took me 5 moths just to understand how everything
worked ..... <br>
<br>
my advice to you you is that you should atlest read about how mpeg 2
compression works .... mpeg4 , h264 and other compression are quiet
complex but at their core they work pretty much like mpeg 2
compression <br>
<br>
atlest concern mpeg2 part in this book its bit out dated but you
would understand that how everything works<br>
<br>
<a href="https://dl.dropboxusercontent.com/u/15671916/video%20compression/DigitalVideoAndHDTVAlgorithmsAndInterfaces.pdf" target="_blank">https://dl.dropboxusercontent.com/u/15671916/video%20compression/DigitalVideoAndHDTVAlgorithmsAndInterfaces.pdf</a><br>
<br>
you dont need to have to go too deep to understand video
decoding/encoding ... ffmpeg library will do much for you ... just
get some of how mpeg 2 codec works <br><div><div>
<br>
<div>On 12/10/2013 12:14 PM, YIRAN LI wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div>
<div dir="ltr">Hi friends,
<div><br>
</div>
<div><br>
</div>
<div>I'm now checking a duration issue of a video file.</div>
<div>Here is some trace print out when file is opened, so we can
know the dts of last AVPacket is 167542, and the last frame
time stamp = 167376, and coded_picture_num = 4013</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div> <span style="white-space:pre-wrap">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 113: 00:00:33.416 MAIN rhbc73 process packet,
Packet.dts = 292, Packet.pts = -9223372036854775808 Line
114: 00:00:33.416 MAIN rhbc73 -- get a full frame,
pFrame->pkt_dts = 125, pFrame->pkt_pts =
-9223372036854775808, BestEffortTimeStamp = 125,
pFrame->coded_picture_number = 3 Line 116: 00:00:33.416
MAIN rhbc73 process packet, Packet.dts = 334, Packet.pts =
-9223372036854775808 Line 117: 00:00:33.416 MAIN rhbc73 --
get a full frame, pFrame->pkt_dts = 167,
pFrame->pkt_pts = -9223372036854775808,
BestEffortTimeStamp = 167, pFrame->coded_picture_number
= 4 Line 119: 00:00:33.416 MAIN rhbc73 process packet,
Packet.dts = 375, Packet.pts = -9223372036854775808 Line
120: 00:00:33.416 MAIN rhbc73 -- get a full frame,
pFrame->pkt_dts = 209, pFrame->pkt_pts =
-9223372036854775808, BestEffortTimeStamp = 209,
pFrame->coded_picture_number = 5 Line 122: 00:00:33.416
MAIN rhbc73 process packet, Packet.dts = 417, Packet.pts =
-9223372036854775808 Line 123: 00:00:33.416 MAIN rhbc73 --
get a full frame, pFrame->pkt_dts = 250,
pFrame->pkt_pts = -9223372036854775808,
BestEffortTimeStamp = 250, pFrame->coded_picture_number
= 6 Line 125: 00:00:33.416 MAIN rhbc73 process packet,
Packet.dts = 459, Packet.pts = -9223372036854775808 Line
126: 00:00:33.416 MAIN rhbc73 -- get a full frame,
pFrame->pkt_dts = 292, pFrame->pkt_pts =
-9223372036854775808, BestEffortTimeStamp = 292,
pFrame->coded_picture_number = 7 Line 128: 00:00:33.416
MAIN rhbc73 process packet, Packet.dts = 501, Packet.pts =
-9223372036854775808 Line 129: 00:00:33.416 MAIN rhbc73 --
get a full frame, pFrame->pkt_dts = 334,
pFrame->pkt_pts = -9223372036854775808,
BestEffortTimeStamp = 334, pFrame->coded_picture_number
= 8 Line 131: 00:00:33.416 MAIN rhbc73 process packet,
Packet.dts = 542, Packet.pts = -9223372036854775808 Line
132: 00:00:33.416 MAIN rhbc73 -- get a full frame,
pFrame->pkt_dts = 375, pFrame->pkt_pts =
-9223372036854775808, BestEffortTimeStamp = 375,
pFrame->coded_picture_number = 9 Line 12134:
00:00:51.168 MAIN rhbc73 process packet, Packet.dts =
167417, Packet.pts = -9223372036854775808 Line 12135:
00:00:51.168 MAIN rhbc73 -- get a full frame,
pFrame->pkt_dts = 167250, pFrame->pkt_pts =
-9223372036854775808, BestEffortTimeStamp = 167250,
pFrame->coded_picture_number = 4010 Line 12137:
00:00:51.168 MAIN rhbc73 process packet, Packet.dts =
167459, Packet.pts = -9223372036854775808 Line 12138:
00:00:51.168 MAIN rhbc73 -- get a full frame,
pFrame->pkt_dts = 167292, pFrame->pkt_pts =
-9223372036854775808, BestEffortTimeStamp = 167292,
pFrame->coded_picture_number = 4011 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</span><br>
</div>
<div><span style="white-space:pre-wrap"><br>
</span></div>
<div>But when I check the file using ffprobe -show_frames
-select_streams v input I could see<span style="white-space:pre-wrap"><br>
</span></div>
<div><br>
</div>
<div>
<div>
[FRAME]</div>
<div>media_type=video</div>
<div>key_frame=0</div>
<div>pkt_pts=N/A</div>
<div>pkt_pts_time=N/A</div>
<div>pkt_dts=167501</div>
<div>pkt_dts_time=167.501000</div>
<div>pkt_duration=N/A</div>
<div>pkt_duration_time=N/A</div>
<div>pkt_pos=103794518</div>
<div>pkt_size=74</div>
<div>width=1920</div>
<div>height=1080</div>
<div>pix_fmt=yuv420p</div>
<div>sample_aspect_ratio=1:1</div>
<div>pict_type=P</div>
<div>coded_picture_number=4016</div>
<div>display_picture_number=0</div>
<div>interlaced_frame=0</div>
<div>top_field_first=0</div>
<div>repeat_pict=0</div>
<div>[/FRAME]</div>
<div>[FRAME]</div>
<div>media_type=video</div>
<div>key_frame=0</div>
<div>pkt_pts=N/A</div>
<div>pkt_pts_time=N/A</div>
<div>
pkt_dts=167542</div>
<div>pkt_dts_time=167.542000</div>
<div>pkt_duration=N/A</div>
<div>pkt_duration_time=N/A</div>
<div>pkt_pos=103794920</div>
<div>pkt_size=74</div>
<div>width=1920</div>
<div>height=1080</div>
<div>pix_fmt=yuv420p</div>
<div>sample_aspect_ratio=1:1</div>
<div>pict_type=P</div>
<div>coded_picture_number=4017</div>
<div>display_picture_number=0</div>
<div>interlaced_frame=0</div>
<div>top_field_first=0</div>
<div>repeat_pict=0</div>
<div>[/FRAME]</div>
</div>
<div><br>
</div>
<div>the ffprobe and ffmpeg libs were built from same latest
source, so I'd like to know why ffprobe could dump a last
frame of timestamp 167542 but av_read_frame +
avcodec_decode_video2</div>
<div>
couldn't</div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks</div>
<div><span style="white-space:pre-wrap"> </span></div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
Libav-user mailing list
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br>Vinod H I<br><br>
</font></span></div>
<br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br></div>