There must be a better way

Post about your cool new gadgets and toys. Ask other users for help with techy problems.

There must be a better way

Postby Мастер » Sun Feb 14, 2016 3:22 pm

I am taking some multi-gigabyte video files (m2ts format), and converting them to not-as-many-gigabyte files (MP4 format) using software called Handbrake.

The problem is, my source files have extraneous material at the beginning and the end, and I want to cut it out. Handbrake will do this, although it won't allow material in the middle to be cut. But, one must specify how much to cut. This can be done in seconds, or in frames; everything I am seeing suggests that there are 25 frames per second. (Should be 30 in North America, I think.)

So, how to do it? Convert the m2ts to MP4 format, a process that takes several hours. Then I can watch the MP4, simultaneously watching the clock (which I suspect is not updated with perfect accuracy) and the video, to get an idea of where I want to cut. Note the time, and multiply by 25; that gives me the estimated frame count of the cut point.

If I'm lucky, this will give me a cut point to within ten frames or so. I can then reconvert the video (takes what seems forever), and see how accurate my guesses are. Adjust, and reconvert. Examine, adjust, and convert again. And again. And maybe again. And maybe again after that. Each time takes hours, and the fans on the computer are going at full speed the entire time.

There must be a better way. But what is it?
They call me Mr Celsius!
User avatar
Мастер
Moderator
Moderator
Злой Мудак
Mauerspecht
 
Posts: 23935
Joined: Tue Aug 02, 2005 2:56 pm
Location: Far from Damascus

Re: There must be a better way

Postby Arneb » Sun Feb 14, 2016 4:29 pm

Hmmm. I am sure I am not quite getting what the problem is. Otherwise, I'd ask, why not convert the entire video, cut the converted version using any old video editing software and convert the end result back to .m2ts - or use the edited .mp4 right away?
Non sunt multiplicanda entia praeter necessitatem
User avatar
Arneb
Moderator
Moderator
German Medical Dude
God of All Things IT
 
Posts: 70075
Joined: Thu Nov 23, 2006 8:22 pm
Location: Potsdam, Germany

Re: There must be a better way

Postby tubeswell » Sun Feb 14, 2016 5:12 pm

Can't you drop the files into iMovie or something and clip the unwanted segments out, then publish the movie (as MP4)?
A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.

If you are seeing an apparent paradox, that means you are missing something.
User avatar
tubeswell
Enlightened One
Enlightened One
 
Posts: 324866
Joined: Sun Sep 19, 2010 11:51 am
Location: 129th in-line to the Llama Throne (after the last purge)

Re: There must be a better way

Postby Мастер » Sun Feb 14, 2016 5:13 pm

Arneb wrote:Hmmm. I am sure I am not quite getting what the problem is.


The problem is, it takes forever to do this. The end result is fine, it is just painfully slow.

Arneb wrote:Otherwise, I'd ask, why not convert the entire video, cut the converted version using any old video editing software


The question then would be, what is that any old video editing software? The one I have won't do it, at least not quickly. I can tell it, start at frame 2,759, and it will spin the fan for a couple of hours, and produce the MP4 output. Then I can look at it, and say, oops, I cut out a fraction of a second too much, let's try to start at frame 2,755 instead. Oops, that's not enough, maybe 2,757 is right? Better, but still too early - let's try 2,758. There we go, just right. Several hours on each attempt. And that's if I can estimate the start point to within two-tenths of a second when viewing it. If I'm off by more than that, it takes more attempts.

I don't have any software that will allow me to quickly inspect the video on a frame-by-frame basis, zooming into frame 2,759, then checking (within a few seconds if possible) whether that's right, or if I should go forward or backward a few frames. I'm doing it by trial-and-error.


Arneb wrote:and convert the end result back to .m2ts - or use the edited .mp4 right away?


I am not sure if my concern is well-founded, but I wonder if going from m2ts to MP4 and then back to m2ts might result in loss of quality. The Mp4 file is what will be viewed, so that's the one that needs to be cut. If the m2ts file is too long, other than taking up some extra disc space, that's OK. The objective here is to get an MP4 cut (at the beginning and the end) at just the right frame. Determining which frame to cut (at each end) is the tricky part, at least with the software I'm using now.
They call me Mr Celsius!
User avatar
Мастер
Moderator
Moderator
Злой Мудак
Mauerspecht
 
Posts: 23935
Joined: Tue Aug 02, 2005 2:56 pm
Location: Far from Damascus

Re: There must be a better way

Postby Мастер » Sun Feb 14, 2016 5:15 pm

tubeswell wrote:Can't you drop the files into iMovie or something and clip the unwanted segments out, then publish the movie (as MP4)?


I've never used iMovie; if it can allow frame-by-frame inspection/cutting, then that would do it. (Even if i don't use it to produce the final output, if it can determine the exact frames to cut, that would solve the problem.)

I will give it a try.
They call me Mr Celsius!
User avatar
Мастер
Moderator
Moderator
Злой Мудак
Mauerspecht
 
Posts: 23935
Joined: Tue Aug 02, 2005 2:56 pm
Location: Far from Damascus

Re: There must be a better way

Postby Lance » Sun Feb 14, 2016 9:11 pm

I haven't done this for a long time but, yes, your problem is the software. You should be able to open the source file, select the portions you want the save the result in the new format. It will be time consuming but selecting scenes by frame boundary should be simple.

I don't know what software you need, but that is the answer.
No trees were killed in the posting of this message.
However, a large number of electrons were terribly inconvenienced.

==========================================

Build a man a fire and he will be warm for a few hours.
Set a man on fire and he will be warm for the rest of his life.
User avatar
Lance
Administrator
Administrator
Cheeseburger Swilling Lard-Ass who needs to put down the remote and get off the couch.
 
Posts: 91419
Joined: Thu May 12, 2005 5:51 pm
Location: Oswego, IL

Re: There must be a better way

Postby tubeswell » Wed Mar 23, 2016 4:42 am

Мастер wrote:I've never used iMovie; ...
I will give it a try.


How is the trying going?
A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.

If you are seeing an apparent paradox, that means you are missing something.
User avatar
tubeswell
Enlightened One
Enlightened One
 
Posts: 324866
Joined: Sun Sep 19, 2010 11:51 am
Location: 129th in-line to the Llama Throne (after the last purge)


Return to Computers and Gadgets

Who is online

Users browsing this forum: No registered users and 1 guest