Log in

View Full Version : MPEG-2: needs some help


Afrinux
13th January 2006, 01:52
Hi all!
I am writing a program to take a sequence end code off a mpeg-2(vob) stream.
I search all the stream to find the sequence end code "0x00, 0x00, 0x01, 0xB7" and replace it by {0x00, 0x00, 0x00, 0x00}. Is it the right way to do it?
I am confused because, when I search the vob data in a binary editor, I sometimes find the code {0x00, 0x00, 0x01, 0xB7} inside the stream, where the sequence end code were not supposed to be.
Do you think it would be wise to look for both the sequence end code and the padding code to make sure that I am taking off the right sequence end code?
Thanks for helping.
Afrinux

ronnylov
13th January 2006, 12:54
There already is a program that can do this.
Restream: http://shh.sysh.de/restream.html

But it does it only on elementary video stream so you need to demux the video. Perhaps you can try it and see what happens when removing or adding the end code.

Afrinux
14th January 2006, 05:50
Thanks ronnylov!

I want to write the program to include it into my tool. If ReStream was an opened source, it'd help a lot.

But it does it only on elementary video stream so you need to demux the video. Perhaps you can try it and see what happens when removing or adding the end code.
I have tried it. Now I am facing problems with Buffer Management Occupancy.
I still dont have a clue, what does it mean.
If someone knows, please help.
Afrinux