ajmoss
16th March 2002, 16:04
There are plenty of programs that can edit AVI files, but none listed in the doom9.net software links page that can chop and splice MPEG files. I need to be able to:
1. Identify the start of a given key frame. DVTool.exe only rounds to the nearest 2048 bytes, which is a necessary condition, but doesn't even guarantee to chop at the start of an MPEG frame (I-, P- or B-frame).
2. Correct the time stamp when joining files together. Even just using a hex editor, I can see that bytes 5-8 of each 2048 byte packet contain time information. If I concatenate two MPEG files whose time information doesn't match (the start of the second one coming just after then end of the first one), I get bad results.
Is there already a program that can do this for me? If not, I'll have to write my own (God help me), and I'll need the specifications of MPEG-1 headers (the first few bytes in each 2048 byte page). Where can I download them?
By default, every 12th frame in a MPEG is a key frame. In a given MPEG file, are there always the same number of packets between the starts of successive key frames? Indeed, is it permissible to insert a key frame early? For instance, if the picture changes from a football pitch to a TV studio in a single frame, I hope the algorithm will abandon attempts to encode this as a P-frame or B-frame.
1. Identify the start of a given key frame. DVTool.exe only rounds to the nearest 2048 bytes, which is a necessary condition, but doesn't even guarantee to chop at the start of an MPEG frame (I-, P- or B-frame).
2. Correct the time stamp when joining files together. Even just using a hex editor, I can see that bytes 5-8 of each 2048 byte packet contain time information. If I concatenate two MPEG files whose time information doesn't match (the start of the second one coming just after then end of the first one), I get bad results.
Is there already a program that can do this for me? If not, I'll have to write my own (God help me), and I'll need the specifications of MPEG-1 headers (the first few bytes in each 2048 byte page). Where can I download them?
By default, every 12th frame in a MPEG is a key frame. In a given MPEG file, are there always the same number of packets between the starts of successive key frames? Indeed, is it permissible to insert a key frame early? For instance, if the picture changes from a football pitch to a TV studio in a single frame, I hope the algorithm will abandon attempts to encode this as a P-frame or B-frame.