Hi
I have a vb6 program that controls winamp for playback and now I would like to extend this program to also handle the work of cutting out a clips from mpeg-2 video files. Today I do this manually by opening the files in TMPGEnc and cut out the part I want there.
What I'm looking for is a program that supports either API or commandline so that I can pass a starttime and stoptime to that program and have it create a new mpeg-2 clip for me.
Anyone who could guide me in the correct directions?
</Morten>
+ Reply to Thread
Results 1 to 9 of 9
-
-
CLI tool: mpgtx
/Mats -
A while back I wrote simple command-line-based programs in C that could read and write uncompressed video files. Of course MPEG will be tougher but not out of the question I wouldn't think. The specifications for MPEG files would be the starting point. Once you can read/write MPEG files it would be a simple matter to build on top of that programs that can manipulate the video in straightforward ways, such as trimming between a start and stop frame/time. I could do that for uncompressed video in less than an hour now that I have the read/write capability. Of course for MPEG it will have to limit the cut points to key frames (between GOPs).
EDIT: Just saw Mats' post, looks like that will get you there sooner! -
There's a newer MPGTX in the following Zip file:
http://www.kaashoek.com/comskip/files/comclean_0_0_6.zip -
You can also try Mpeg2Cut2. It's more stable as mpgtx. But actually it depends on what you want to do with the cut file. Proper cutting is a rather complicated task for mpeg files.
GUI for dvdauthor:
https://www.videohelp.com/~gfd/ -
Changelog / Version history:
Latest Revision:-__ 17 SEPT 2006 _- Build 6917
...
_ Option to pass FROM and TO selection points via parameter.
I haven't tried it yet, but it sounds like a commandline cut option...
EDIT:
I just had a short look in the help file:
IGCUTTER
At this stage the parameter interface for IGCutter
is very basic and limited, for experimental use only.
Because the new parameter format is not 100% backwards compatible,
the new mode must first be enabled via the Mpg2Cut2 menu.
MENU - MISC - EXPERIMENTAL - Parm With Time Codes.
File names with imbeeded spaces MUST now b enclosed in quotes.
EG "C:\My Documents\FRED.MPG"
At this stage, proper functioning is limited to Mpeg2 files that
fall within the following restrictions :-
- Only 1 input file at a time.
- Mpeg-2 format only, NOT Mpeg-1.
- Progam Stream only. NO Transport Streams, No Elementary Streams.
- PTS must be locked to SCR at SEQ/GOP boundaries,
as is normal for DVD format.
This means some DTV captures may NOT be acceptable.
- SCR must not reset within the file.
IE It must always increase, never decrease.
This meams PANASONIC DVD recordings are NOT acceptable at this time.
MPG2CUT2 does NOT check that the restrictons are being adhered to,
as the interface is still very experimental.
Parameter format :-
"input-file-name" FROM-hh:mms.ff TO=hh:mm
s.ff O="output-file-name" xxx
All parameters are optional, except for the input-file-name,
which MUST be the FIRST parameter.
FROM= defaults to start of file
TO= defaults to end of file
The user will be presented with a File-SaveAs dialog,
which allows the output name to be overriden.
xxx = Time Code Style
ABS = Absolute
REL = Relative (default)
Time codes can omit the hour, minute and frame numbers,
where they are zero. Seconds MUST be pesent, even when zero.
EG FROM=30 is the same as FROM=00:00:30.00 (30 seconds)
Please note the the frame number portion is preceeded
with a DOT, not a Colon, as it specifies a fraction of a second.
BUT is it NOT a decimal fraction - it is a frame number.
EG: 30.5 = 30.05 = 30 seconds plus 5 frames.
Time Codes are by default expected to be RELATIVE SCR values,
a common convention in players that show time codes.
EG FROM=30 means 30 seconds from the start of the file,
even if the first SCR on the file is NOT ZERO.
If you want to eliminate the conversion to relative time,
specify the keyword parameter ABS (Absoloute).
Time codes must then match the actual SCR time stamps.GUI for dvdauthor:
https://www.videohelp.com/~gfd/ -
Originally Posted by mats.hogberg
Thanks!
Similar Threads
-
add background music using ffMpeg or any commandline tool (free)
By Shohag_ifas in forum AudioReplies: 2Last Post: 21st Jan 2011, 06:25 -
Does anyone know any tool to check if files 'mpeg-2' are faulty?
By sgbd in forum Video ConversionReplies: 8Last Post: 13th Sep 2010, 21:12 -
cmd line tool to join two mpeg-2 files
By nighthawk2018 in forum Newbie / General discussionsReplies: 1Last Post: 1st Mar 2010, 22:13 -
Cut and Merge MPEG-2 Files
By flash_49 in forum EditingReplies: 8Last Post: 12th Feb 2010, 10:03 -
Commandline tool for background
By linkeboda in forum Authoring (DVD)Replies: 5Last Post: 12th Oct 2007, 08:09