Log in

View Full Version : Sequence endcode


robot1
3rd February 2005, 18:00
I post in this section... because it's a general mpeg question, and a lot of developers read this section.
In CCE (and I think in other encoders) there is an option
"Add sequence endcode".
Scenarist doesn't accept a stream without the "sequence endcode" ... so normally the sequence endcode is added.
Is the sequence endcode just a fixed number of bytes added at the end of the stream, or what?

I guess it's 4 bytes
00 00 01 B7

Am I wrong?
Can you pass from a stream with sequence endcode to a stream without sequence endcode removing the last four bytes?

I ask because ProCoder always adds the sequence endcode, and DVD-RB needs streams without it.

Thanks in advanced to everyone.

Guest
3rd February 2005, 18:16
Yes, the sequence end code is the start code {00 00 01 b7}. Semantically, it signals the end of the MPEG2 bitstream. Without it, you could not display the final frame (quirk of frame reordering).

If you want to generate a file that you can later concatenate to, then you need to omit the sequence end code. Yes, you can simply edit it away. But be careful, it may not be exactly the last 4 bytes of the file. Just remove everything from it to the EOF.

robot1
3rd February 2005, 18:47
Thanks for the detailed explanation.
:)