Hello
I have written two tools which may be useful in connection to MovieCut/mcut. Unfortunately they are currently only callable from the shell, i.e. using telnet or ssh.
Both programs and their source code are included in the attached tar file. Brief descriptions are below.
Best Regards
Anders Holst
mreconstructap
In case the .ap-file is lost, or corrupted, or nonexisted because the movie comes from another platform, then the program "mreconstructap" can construct a new .ap-file corresponding to the movie. The .ap-file is used to map between time and position in the movie file, and is required to be able to use MovieCut/mcut.
Just call it like:
> mreconstructap movie.ts
and it will replace the old movie.ts.ap.
msplice
With this program you can append movies or movie parts (from the same service), or split them apart again, or merge parts of movies in another order (for whetever use that may be).
In more detail, msplice considers a movie as consisting of a number of parts, separated by "discontinuities" in the recorded time. Such discontinuities appear e.g. at the cut positions of MovieCut or mcut, but also sometimes when there are errors in the stream. msplice can split up one or several movies at those discontinuities and merge the parts together again in any order. In doing so it will try to clean up the cuts/discontinuities to avoid flickering and breaking up of the picture. (Note however, that if parts from several movies are appended they need to be from the same service, or the result will be unusable. Also, if you happen to use the same part twice, the dreambox will be confused and jumping and winding will not work.)
Some examples of how to use it:
Appending:
If you have imported a movie in several parts from e.g. DM7000 or DM7020 and want them as one chunk, or if Enigma2 crashed and left an ongoing recording in two parts, then you can merge them as:
> msplice -o resulting_movie.ts part1.ts part2.ts part3.ts
Note however that you must have .ap-files for all parts, so if they come from an Enigma1 model you must use mreconstructap first on each part.
Splitting:
If you have merged several short movies with msplice, and want to undo that, then you can use the -s (for "split") flag:
> msplice -s movie.ts
The parts will be separated into movie_sec001.ts, movie_sec002.ts, etc. Note that this will not work if the merged parts are perfectly adjacent, as for several parts of a movie from Enigma1. Then there are no discontinuities any more between the parts. If you need to split it up again in smaller chunks without having discontinuities in the movie, you should use mcut instead.
Checking and repairing:
With the first version of mcut, the cuts vere not "clean", i.e. the picture flickered and broke up for a few frames. With msplice you can repair such previously cut movies, to get rid of the flickering. The price to pay is loss of aproximately one GOP around the cut.
To check how many cuts a movie contains, and whether they are "clean", use the -l (for "list") flag:
> msplice -l movie.ts
It checks the file (without modifying it) and reports the length of each part, and tells if any cut is not clean. If there are unclean cuts in the movie, then the -r (for "repair") flag can be used to clean it up:
> msplice -r movie.ts
Note that this will overwrite the original movie. If you want a cleaned copy instead, use the normal form of msplice instead:
> msplice -o cleaned_movie.ts movie.ts
Advanced use:
If the task involves splitting up several movies and then merge selected parts of them, this can be done in one step:
> msplice -o resulting_movie.ts movie1.ts:1,3 movie2.ts:4-6 movie3.ts:3,2,1
where the numbers after the colon indicate which parts of each movie to use. If the movie names are long, and each movie has to occur at several positions in the list, then aliases can be used:
> msplice -o resulting_movie.ts A=movie1.ts B=movie2.ts A:1 B:2 A:3-5
where A and B can be any strings not containing colons or equal signs.
This advanced form may not be so often useful in practice but it was fun to implement...