So, Just to make sure I got it right: 1) "AVPacket"s may be longer than MPEG TS and MPEG ES, they may be some MPEG ES packets concatenated together. 2) If I open an "mpg" file, containing an MPEG ES, and zero out some blockes of 188 Bytes(the whole block, with no care of any headers), is it the same as zeroing out "data" field of "AVPackets" when I open it using ffmpeg(libavcodec) tools? (It's my understanding of your very last sentences[highlighted] and I hope it is correct)
Thanks, Alireza On Sat, Dec 20, 2008 at 11:05 AM, Markus Rechberger <[email protected]>wrote: > > An AVPacket can have a different size than a TS Packet. > > It's like a TS Packet with a certain ID comes in with a Packet start > identifier, and following > packets with the same ID have to be concatenated till the next packet > with a Packet start identifier comes in. > MPEG- SI/PSI Sections usually have the length defined including a > crc32 number at the end. > As for the mpeg2 elementary stream the stream needs to conform the > specs of the corresponding codec. > For example the mp2 audio header themself also define the length of > the packet, the packets which are returned > for an mp2 stream is 8 times as big as a valid mp2 audio frame with my > examples. > *Zeroing out packet data will zero out the ES packet*, ffmpeg strips off > the TS header when concatenating > the TS packets. > > regards, > Markus > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
