-
Notifications
You must be signed in to change notification settings - Fork 964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swap from DTS order to PTS order #90
Comments
Hi there @wpregliasco I'm glad to know the material is useful for you =)
You must read the packets because once you decode them, the CODEC does the magic :) |
you could change your hello world to show how the packets are stored at the file. while (av_read_frame(pFormatContext, pPacket) >= 0)
{
// if it's the video stream
if (pPacket->stream_index == video_stream_index) {
//https://ffmpeg.org/doxygen/trunk/structAVPacket.html
logging("pts %" PRId64, pPacket->pts);
logging("dts %" PRId64, pPacket->dts);
}
av_packet_unref(pPacket);
} |
wow ! I finally understood. Just to clarify to others (and myself) this is my story:
That we can arrange in the table (ts = timescale = 1/256)
when you send the first two packets to the codec, there is no output frame, and As a consecuence, codec needs the last two packets (in parenthesis) to render last frame #6. I have no more to add, thanks and thanks again for you time. Willy |
thanks for sharing @wpregliasco you can also notice that avframe has an attribute to show bitstream order. :) |
Hi,
Thanks for your clear and deep explanations, I finnaly understood a lot of dark items in ffmeg !!
Still I have a silly question from the hello world example:
The question is (actually I have two questions):
Thanks again for sharing your knowledge. Regards,
Willy
The text was updated successfully, but these errors were encountered: