Menu

Tree [0c5434] master /
 History

HTTPS access


File Date Author Commit
 Build32 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 Build64 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 Icon 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 Images 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 Linux 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 System 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 Windows 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 .gitignore 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 Makefile.lx 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 PMMPEGJoint.cbp 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 ReadMe.txt 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 compile32.bat 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 compile64.bat 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit
 makefile.mingw 2023-11-19 Oskar Dolch Oskar Dolch [0c5434] init commit

Read Me

Content
=======
1. What is PaM MPEGJoint
2. Some theory about MPEG files
3. How to use MPEGJoint
4. How to compile MPEGJoint


1. What is PaM MPEGJoint
========================
PaM MPEGJoint is an application for joining two or more MPEG video files into one. Occassionally, it can
be used to fix an invalid MPEG. MPEGJoint re-multiplexes the original streams and attempts to find an
optimal algorhitm to recover the original splitted file.


2. Some theory about MPEG files
===============================
MPEG format for video and audio encoding is very efficient for storing multimedia. Typically it beats all
concurrent formats in terms of quality vs. file size ratio. A splitted MPEG video can often be downloaded
from internet. Splitting the video files into several parts should make the possible download easier.
However, the MPEG video format makes the task of splitting MPEG files somehow complicated. This boring
theory is included for those who would like to undertand what MPEGJoint actually does.

MPEG file consists of one or more media stream. The streams can be video, audio, or private (for example,
there can be a stream of text coded subtitles with times, which only specialized player can understand).
When splitting such a stream (called multiplex, by the way), the video is the one making troubles. The
video stream consists of video frames. (Also audio stream does, but it is not the trouble maker.) There are
basically three types of frames, defined by the method of its compression. I-frame is a picture, which is
compressed only by itself - so basically by JPEG algorithm. P-frame is a picture, which needs the previous
I-frame in order to be decoded. The MPEG video compression is based on the fact, that in video stream, the
consequent images do not differ much. So for a P-frame, the differece between P- and previous I-frame is
actually compressed. (It is even more complicated, in fact, but it is not important here.)

Finally there exist B-frames, which are compressed using both the previous and following either P- or
I-frame, whichever is closer. The video stream consists of groups of pictures. Each group starts with
I-frame, folowed by several (say 3 to 7) P-frames. And there are 2 B-frames between each I-P or P-P
pair.

It should be clear from the previous description, that it is impossible to automatically split the video
stream so that the following two requirements hold both simultaneously:

1. Each video frame in each part can be decoded
2. No video frame appears twice - in two consequent parts

The word "automatically" is important. Using a visual editor, human could split the file at the takes, so
the previous conditions could stay valid both. Another option would be to recompress the whole stream. But
this is usually not what the web master would like to do.

So there are basically two methods of splitting MPEG files, each can have few variations:

1. Split it at a group boundary marking the beginning of group as "broken link". This method fulfills the
condition 2 but breaks 1. There are always two B-frames on the beginning of each part, which cannot be
decoded.

2. Repeat the last group from previous part once more in the next part, removing the two non-decodable
B-frames. This method fulfills condition 1 but breaks 2.

What the MPEGJoint does?
------------------------
MPEGJoint goes through all the video files and extracts video and audio media streams (cannot handle
private streams). Then it creates completely new multiplex and attempts to find the method used for
the file splitting. If takes appropriate action to create smooth seam between the consecutive files.


3. How to use MPEGJoint
=======================
Run MPEGJoint and click "Open" button. Select the files you want to join. MPEGJoint will guess the order
of input files, however, you can rearrange the files using drag and drop. While building the list of files,
MPEGJoint will also check whether the selected file is valid MPEG file, and also whether particular part
should be joined to the previous one. This is done from the file name, so it might not be correct. You
should check the original guess, and if it does not match your expectation, you can change the "Join"
flag using right click and popup menu (on Windows systems) or check box click (on Linux systems) to correct
it. You can also use right click popup menu to diable or enable all joins at once.

What does it means? If the "Join" flag is set, MPEGJoint attemts to recover the seam as mentioned in the
previsous part. Otherwise it will not perform any check and moreover will mark the first group of the next
part as "broken link".

You can also add other files clicking the "Open" button again, or delete a file from the list using "Del"
key.

Once you are satisfied with the setting, click "Save" button the create the new MPEG file. MPEGJoint will
start creation of the new multiplex. You can always interrupt it by "Stop" button. Once it is finished,
you can click "New" button to clear the list and start joining new series.


4. How to compile MPEGJoint
===========================
Extract the source archive preserving the subdirectories. On linux systems, type "make -fMakefile.lx main"
in shell. On Windows, run the compilexx.bat file appropriate for your platform.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.