Hi all, I've a .mp4 file which contain h.264 video and AAC audio. I wants to extract MacroBlock and motion vector information of each frame while decoding. Please find my below Pseudocode.
avformat_open_input(file_name) //opening file avcodec_open2(pCodecContext, pCodec, NULL) // opening decoder while (response >= 0) // reading each frame { response = avcodec_receive_frame(pCodecContext, pFrame); if (response == AVERROR(EAGAIN) || response == AVERROR_EOF || response < 0) { break; } * // extract macroblock of pFrame here* av_frame_unref(pFrame); } I have seen in other post mentioned that we can get MB information through MpegEncContext structure, but i'm confused were and how to instantiate object of that structure, how the MB data of the structure gets updated for each frame.? Ultimately, I wants to compare macroblock from one frame to other frame using SAD (sum of absolute difference) and trigger alerts if there is any distortion in macroblock level. I would really appreciate if anyone help on this ☺. Regards, Venkateswaran.S
_______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email libav-user-requ...@ffmpeg.org with subject "unsubscribe".