View Full Version : Split m2ts based on timecodes
willjohnson33
14th July 2010, 06:11
Is it possible to batch cut several parts of a video file based on a bunch of timecodes? These are m2ts videos but I supposed I could convert them if necessary.
The videos are sports videos and I would like to create several clips from each video based on start and stop timecodes.
Example: baseball.m2ts is the source video and I have a stats file that has marked all the singles in it by a start and stop timecode. I would like to cut the baseball.m2ts file into a bunch of clips based on where singles were hit during the game.
Any thoughts on how this can be accomplished would be greatly appreciated.
Best,
William
Ghitulescu
14th July 2010, 08:09
most ts processing tools (tsremux, tsmuxer & family) can trim any standard TS or M2TS file using time markers (so many seconds from the beginning, or from the end, rounded to IDR frames). It depends now on what do you understand by timecodes (and what kind of timecodes do you have in mind).
actarusfleed
15th July 2010, 16:35
Hi there,
I've a similar intent:
I want to cut some parts of a m2ts file ripped from a BD pre recorded video.
The programs you suggest works also if the main m2ts file contains HD audio tracks?
thank you,
actarus
willjohnson33
15th July 2010, 22:17
most ts processing tools (tsremux, tsmuxer & family) can trim any standard TS or M2TS file using time markers (so many seconds from the beginning, or from the end, rounded to IDR frames). It depends now on what do you understand by timecodes (and what kind of timecodes do you have in mind).
In Tsmuxer I only see the ability to manually cut the file and only one at a time. Is there a way input multiple start and start times so that it can be done as a batch process? I can't seem to find a guide to tsmuxer or tsremux anywhere.
Thanks
setarip_old
15th July 2010, 22:25
Hi!
Here's some documentation for tsMuxeR:
http://forum.doom9.org/showthread.php?t=142559
willjohnson33
16th July 2010, 07:12
thanks so much - it looks like I can do it with a little programming!:)
actarusfleed
16th July 2010, 13:51
--cut-start - Trim the beginning of the file. Value should be completed "ms" (the number of milliseconds), "s" (seconds) or "min" (minutes).
--cut-end - Trim the end of the file. Value should be completed "ms" (the number of milliseconds), "s" (seconds) or "min" (minutes)
It seems possibile!
Anyway I do not have any idea about the implementation! :-(
Someone can post an example?
Thank you,
Acta
laserfan
16th July 2010, 20:06
I have used it a couple times to drop the final logo screen or some such in order to fit a slightly too-long movie onto a disc:
MUXOPT --no-pcr-on-video-pid --new-audio-pes --blu-ray --vbr --custom-chapters=00:00:00.000;00:03:37.134;... --cut-start=0ms --cut-end=7135587ms --vbv-len=500So, --cut-start denotes the beginning of "that which you want to keep" and --cut-end the end of course.
It's up to you to identify the precise milliseconds you want--I expect you will need to make these at I-frames for best results.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.