m2vmp2cut man page
m2vmp2cut — MPEG2 frame accurate cutter
m2vmp2cut [-batch] (file|directory) command [argument... ]
M2vmp2cut is a command-line driven frame accurate (currently PAL) mpeg2 video (m2v file) with accompanied mp2 audio (mp2 file) cutter. Frame accuracy is achieved by re-encoding video around cutpoints. Audio is cut from separate mp2 file at positions that keep a/v sync as good as possible (maximum sync difference is around 10-15 milliseconds).
M2vmp2cut requires 2 arguments, file/directory and command. Enter `.' as the file/directory argument when it is irrelevant. The following commands are available:
- lvev6frames !
Old versions of m2vmp2cut supported using lve-generated "edit lists" for cutpoint information. With lvev6frames these old edits can be used with this m2vmp2cut version. This is a deprecated feature. To use this the `!' needs to be added to the command line.
- demux [projectx options]
M2vmp2cut requires mpeg files to be demuxed to elementary streams before cutting. This command uses ProjectX(1) to do the demuxing. A separate directory (in current directory, based on source filename) is created for output files. projectx options may contain e.g. more filenames to be demuxed into output streams.
This command uses new m2vcut-gui graphical utility for searching cutpoints. This work is done frame-accurately.
- cut [options] ...
This command is wrapper to m2vmp2cut.pl (which used to be the frontend of m2vmp2cut in old versions). This command has extensive help. Note that this (again) adds one third of disk usage so far when this creates final output file.
- play [options]
This command runs mplayer(1) for the file created with cut command.
- move destfile
Moves final output file to a new destination.
- getyuv [examples]
Decodes selected mpeg2 frames as a stream of yuv4mpeg pictures. Useful for further encoding. If an examples argument is given this command provides example output.
- getmp2 [examples]
Extracts selected mp2 audio data, to be muxed with (re-encoded) video. Mp2 data can be used as is, or as encoded to mp3 or vorbis. If an examples argument is given this command provides example output.
Display an help message.
Contribution material. Mostly encoding scripts. The command line interface of the programs these scripts invoke may change over time — there is less guarantees that these work in future than other m2vmp2cut functionality, in short term period.
m2vmp2cut mpeg2_file demux more mpeg2 files or other ProjectX opts
to demultiplex the source mpeg2, then execute GUI for cutpoint hunt:
m2vmp2cut mpeg2_file/demux_outputdir select
demux outdir is derived from the original mpeg2 file by removing latest suffix after dot (.) and replacing that with '.d'.
In order for to select to work the directory where m2v and mp2 files were demuxed must have video.m2v symlinked to the video and audio.mp2 to the audio; if those exist, the select tool can be used to continue with content demuxed by something else than m2vmp2cut.
After selection of cutpoints are done, the cut command will create a new mpeg2 file from the selected contents, re-encoding some video frames to achieve frame accuracy. Audio frames don't require any re-encoding. Alternatively, there are some scripts in the contrib directory which can re-encode the selected material to other formats. The contrib command will show available contrib scripts.