I am trying to read encoded frames from container file and write the same encoded frame back to the same kind of container format file, but it failed. Here is the detail:
I am using ffmpeg to write h.264 encoded frames into mov format using av_write_frame: av_write_frame(AVFormatContext*, AVPacket*); The mov file plays fine. But when I try to get the packet from the mov file back: av_read_frame(AVFormatContext*, AVPacket*); The packet data is different. I suppose when I read the same .mov file from ffmpeg using av_read_frame, I should get the same content (AVPacket->data/size should be the same). But it is not the case here. It looks like the start code is replaced with something else. The same problem applies to asf format, and even the packet size is different. Could you help on what the problem is and how do I read the encoded frames from file and write to a file with same format? Thanks in advance! _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
