Can I do lossless trim and splice of two mp4 videos using Camtasia?

  • 2
  • Question
  • Updated 5 years ago
I have two mp4 videos, both produced using Camtasia. Let's call one Intro and the other Content. I want to delete a portion off the front end of Content and then add Into to the front end of Content. I want to do this without losing quality, i.e. re-encoding and then save the results as one file. Is that possible with Camtasia?

Joe....
Photo of Joseph Zeh

Joseph Zeh

  • 10 Posts
  • 0 Reply Likes

Posted 7 years ago

  • 2
Photo of Dave Gehman

Dave Gehman

  • 78 Posts
  • 5 Reply Likes
Following...
interesting question, especially since MP4 is a lossy algorithm... but with lots of advantages over most lossy methods.
Photo of siwehoron

siwehoron

  • 1 Post
  • 0 Reply Likes
If you want to trim and join MP4 files, there are many useful tools that will help you.

For example, here is a guide on how to cut video like MP4, AVI, MOV, WMV, MKV, FLV, ASF, MXF, etc.

There is also a guide on how to combine video on this website.
Photo of goodluckthree

goodluckthree

  • 10 Posts
  • 2 Reply Likes
  • You may also try this step by step guide to trim MP4, MKV, AVI, MOV, WMV, FLV, VOB, WebM, MPG, WTV, ASF, RMVB, AVCHD, MXF, DV, Apple ProRes, MPEG-1, MPEG-2 and etc
  • This guide also can trim MP3, WAV, FLAC, OGG, WMA, M4A, CAF, VOC, AIFF, APE, DTS, Opus, AU, RA, 3GA, AAC, AC3 and etc.
Photo of Joseph Zeh

Joseph Zeh

  • 10 Posts
  • 0 Reply Likes
I understand mp4 is a lossy algorithm. But I don't want to compound lossyness by splicing two mp4 video clips. It seems to me that the resulting file could be the result of stitching two mp4 files together at I-frames without re-encoding them. At least that is what I am hoping to do with Camtasia. But I am not knowledgeable enough about the application to know if it supports that.
Photo of Dave Gehman

Dave Gehman

  • 78 Posts
  • 5 Reply Likes
Interesting. Much would depend on how Camtasia represents the video data.

Hopefully someone from TechSmith will join this conversation.

Are you aware that you can download a free trial version of Camtasia? I don't think it's crippled re: video editing. Hopefully it's also not crippled around producing output as MP4.

As for your editing needs: You can put the timeline cursor at any point in an imported file (such as a video), split the file at that point, and move a split-off portion to just about anywhere, then put it back down again.

Two imported video files can be abutted, but I don't know how smooth the resulting edit would be as the "playhead" swings past the point. (So far, we've only worked with captured stuff [e.g., PowerPoints with voice or captures of a program as it's running], and titles and captions.)

You can also inject a simple segue or transition between the 2 videos. That would avoid jump-cuts & glitches.
Photo of Joseph Zeh

Joseph Zeh

  • 10 Posts
  • 0 Reply Likes
I have Camtasia Studio 7 and used it to produce the Intro and Content mp4 files I mentioned in my original post. I am very familiar with the trim, splice and transition features of Camtasia. But what I am asking is can trim and splice of two mp4 clips, each produced at the same aspect ratio, same encoding parameters for bot sound and video be spliced without re-encoding the resultant video?

The problem seems to me to be more of a detailed file manipulation issue since MPEG compression begins with an I-frame, compresses for some number of frames and then begins again with another I-frame (also called key-frame). I just want to manipulate two files to concatenate them at an I-frame.

The are a number of freeware apps out there that claim to be able to do this. But I am wondering if Camtasia can do it and how do I proceed?

Joe...
Photo of Dave Gehman

Dave Gehman

  • 78 Posts
  • 5 Reply Likes
My bad... didn't understand your question until now.

I'll bow out--not knowledgeable enough. Poking around, I don't find a way to zoom in to the point where you see single frames, move the cursor by a single frame, or place the cursor at a keyframe other than in effects/transitions... I don't think that bodes well for your need.
Photo of Joseph Zeh

Joseph Zeh

  • 10 Posts
  • 0 Reply Likes
I think you are right, but I thought maybe a TechSmith technical person might be monitoring these posts and maybe could shed some definitive light. But thank you for the help and interest.

Joe....
Photo of Dave O'Rourke

Dave O'Rourke, Senior Software Engineer

  • 1445 Posts
  • 420 Reply Likes
Sorry, no. Camtasia Studio does not support the lossless trim and splice of 2 MP4 files. Any files you place on the timeline will be decoded first, then edits are applied, and when you produce, they are re-encoded using the settings you choose.

In order for 2 MP4 files to be demuxed (but not decoded), and re-muxed (but not re-encoded), they must be nearly identical. In practice, this can be very difficult to control. Even small differences in audio or video properties may make the file streams incompatible, and may prevent the streams from being combined.

As Joseph pointed out, there are some free tools that may be able to accomplish this. I tried out MP4Box, which is a well regarded command line tool for muxing/demuxing MP4 files. The documentation is found here: http://gpac.wp.mines-telecom.fr/mp4box/

To see how difficult this would be, I downloaded 4 videos from YouTube, all of the same dimensions, and from the same author. I found out that I could not concatenate videos of different frame rates. I also found that even though videos a.mp4 and b.mp4 were the same dimensions and frame rate, they could not be concatenated with MP4Box. So besides getting the frame rate and dimensions to match, there are other, more subtle properties of the MP4 that must also match.

Here's some screenshots to show the results:
1. mp4box concatenation tests: http://screencast.com/t/ucQGhsgf9
2. mp4box info output to text files: http://screencast.com/t/yhSBs9vtL
3. The output folder containing the test results: http://screencast.com/t/MrXW2xbUfioY
4. Property compare of a.txt and b.txt: http://screencast.com/t/bgicXXFk
5. Property compare of c.txt and d.txt: http://screencast.com/t/qvqmg1CKa6
6. MediaInfo properties of a bad concatenation: http://screencast.com/t/JltiuVyYbj
7. MediaInfo properties of a good concatenation: http://screencast.com/t/c2vX2HrE7hjr

This is a lot of work to avoid a small loss in quality. If you're doing this as part of a large video processing system that will handle thousands of videos, then it might be worth the effort. But for the normal case of just splitting, trimming, and joining video, I'd recommend just putting the videos on the timeline, performing the edits, and then producing using the default MP4 settings. This should give you a high quality file, and you shouldn't notice a significant loss in visual quality as compared to your source MP4 files.

Hope this helps.
Photo of Joseph Zeh

Joseph Zeh

  • 10 Posts
  • 0 Reply Likes
Dave,

Thanks very much for all the work you put into this, and the detailed feedback. I appreciate it very much. I am not attempting to do this on a production basis but only on fifteen or so tutorials I created using Camtasia where I want to change the intro. I have complete control of the video and sound properties and should be able to produce "exact" property matches. I have downloaded a free tool called Avidemux which claims to be able to do this. I haven't tested it yet (still learning to use the tool). I am going to look at MP4Box too.

This issue came up because someone tried to change the intros on my Camtasia produced tutorials using Avid Technologies video editor and the moment the mp4 files were brought into the Avid editor there was significant loss in quality. This surprised me because Avid is a high end commercial editor. So I recommended the non-re-encode approach.

Stupid me, I never tried just putting the videos in the Camtasia timeline, performing the edits and re-encoding using mp4 settings. I assumed if Avid Technologies editor would destroy the quality, then likely Camtasia would too. Perhaps I am wrong. I will give that a try. I will study your results above in detail before going further. Thanks again.

Joe....
Photo of Dave O'Rourke

Dave O'Rourke, Senior Software Engineer

  • 1445 Posts
  • 420 Reply Likes
Joe,

When you bring the videos into Camtasia Studio and put the first one on the timeline, you'll be prompted for the editing dimensions. At this point, make sure you choose "Recording Dimensions", which will keep the dimensions the same as your source video. This will avoid any loss of quality due to scaling the video. For this task (simple edits on an existing video), it's probably best to keep the dimensions constant through your re-editing/production workflow.

Please let me know how it goes. I'd be interested to hear/see your results.
Photo of Joseph Zeh

Joseph Zeh

  • 10 Posts
  • 0 Reply Likes
Dave,

I ran the experiment and got some interesting results. First of all, the quality of the resulting video is quite good; i.e. not noticeably less than the original. But the process seems to cut some image from the left side of each frame. This happens the moment I drag the first video to the timeline. I have used your suggestion of selecting "Recording Dimensions". See image below:



If I compare the original video (also made in Camtasia) played in Media Player to the the Resulting video played in Media Player I get the image below:



It seems Camtasia either clips some of the left edge or shifts the whole image to the right. Is there a shift control I need to adjust?

Here is how I ran the experiment:

1. I took one video I made in Camtasia and copied it twice: once name Intro and the other named Content. I did this to make sure all video and audio properties of each video were identical.
2. I brought both Intro and Content into Camtasia.
3. I dragged Intro onto the timeline and chose "Recording Dimensions".
4. I split Intro after the introduction music and video and deleted the end of the video.
5. Next I dragged Content onto the timeline after Intro and split it in two places: I deleted the first and last segment leaving a short clip abutted to Intro.
6. After producing the resulting video I compared like frames in the original to the resulting video with Snagit screen captures.

If you want to see other images or the videos I can either email them to you or give you a Dropbox link to them.

If you have any ideas about the left side clipping I would appreciate your input. And thanks for you interest and detailed responses. Much appreiated.

Joe....
Photo of Dave O'Rourke

Dave O'Rourke, Senior Software Engineer

  • 1445 Posts
  • 420 Reply Likes
Joe,

Offhand, I'm not sure what would cause the left side clipping. If you're willing to share the source and output MP4 files, I'd be happy to take a look. A Dropbox link would be great.
Photo of Joseph Zeh

Joseph Zeh

  • 10 Posts
  • 0 Reply Likes
Dave,

The resulting video can be found here:
https://www.dropbox.com/el/?r=/s/vvkg...

And the original here:
https://www.dropbox.com/el/?r=/s/sz6w...

If you send me your email address to jpz@srww.com I will add you to the share list for these videos and you can download them.

Thanks,
Joe....
Photo of Dave O'Rourke

Dave O'Rourke, Senior Software Engineer

  • 1445 Posts
  • 420 Reply Likes
Joe,

Thanks for the files.

I can reproduce the clipping on the left side if I put the Beginner's SketchUp Tutorial - Part 1.mp4 file on the timeline in Camtasia Studio 7.1.1. If I take the same file into Camtasia Studio 8.0.4, the clipping does not occur.

I was able to add a zoom-n-pan keyframe in 7.1.1 to stretch the video so that the black bar on the left did not show, but this makes the text in the video a bit fuzzy, which wasn't desirable either.

I'm still trying to determine the cause of the clipping. I need to head home for the day. I'll try to look at this some more tonight or tomorrow and see if I can come up with a workaround for you.
Photo of Joseph Zeh

Joseph Zeh

  • 10 Posts
  • 0 Reply Likes
Thanks Dave. Maybe this is the impetus for me to upgrade to version 8, which I have been reluctant to do. But I would still be interested in what you discover.

Joe...
Photo of Dave O'Rourke

Dave O'Rourke, Senior Software Engineer

  • 1445 Posts
  • 420 Reply Likes
Joe,

I apologize for the delay. I've asked our TechSupport staff to follow up with you offline to help with this issue. Thanks for your patience.
Photo of Joseph Zeh

Joseph Zeh

  • 10 Posts
  • 0 Reply Likes
No problem Dave. You have given me an out with the version 8 upgrade which will solve my problem (though I haven't purchased and tried it yet). At this point it is more curiosity for me. If the TechSupport staff finds and explanation I would be interested in it, but it is not critical to me at this point. You have been very helpful. Thanks,

Joe...
Photo of Joseph Zeh

Joseph Zeh

  • 10 Posts
  • 0 Reply Likes
Dave,

I now have version 8 and have verified the results you have gotten (no black stripe). Thanks again.

Joe....
Photo of Stephen

Stephen

  • 2 Posts
  • 0 Reply Likes
I have noticed that when I import an MP4 file into Camtasia 7 a vertical black bar appears on the left hand side of the video.


The bar is about 4-5 pixels wide. I know I can scale up the content to remove the bar but this affects the quality of the video and is not an option.


Is there any way I can prevent the bar from appearing in the first place?

Just to add that upgrading to Camtasia 8 is not an option at this time for my company. :(



Thank you.


Stephen




This reply was created from a merged topic originally titled
Vertical black bar appearing on imported MP4 file in Camtasia 7 (Windows)..
Photo of monica66

monica66

  • 4 Posts
  • 0 Reply Likes
For trimming, I used Brorsoft Video Converter which not only can help me trim the videos, but also can crop  and combine the videos for me.    
Photo of peter white

peter white

  • 4 Posts
  • 0 Reply Likes
Just a free Wins movie maker can do such job ... if you only want to trim or cut...
Photo of lawrephord201467

lawrephord201467

  • 8 Posts
  • 0 Reply Likes
is triming and cutting like two loops ?

This conversation is no longer open for comments or replies.