Avidemux - Cutting out sections of video (& transcoding too)

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Post Reply
Message
Author
User avatar
handy
Posts: 611
Joined: Mon Apr 23, 2018 2:00 pm

Avidemux - Cutting out sections of video (& transcoding too)

#1 Post by handy »

Note: Please let me know if there are any problems with what follows:

Introduction

Avidemux is by the intention of its author a fairly limited piece of video editing software. What it does do, is some things in quite a simple fashion, especially when compared to most of the other far more capable members of the video editing fraternity.

This how-to is about (almost) nothing more than being able to cut one or more sections from a video. Which, when using Avidemux is (& should always be) a pretty simple process.

Preparation

Before we start editing, it should be known that the only setting that we need be concerned about out of all of the options showing in the left hand section (top to bottom) of the Avidemux GUI, is the Output Format.

I usually set this one (in the drop down menu under that sections Output Format title) to the same format as that of the video that I'm editing.

You can also easily use Avidemux to transcode videos too

Though, you can choose a different format if for some reason it suits you. In fact, another easy trick of Avidemux is the ability to easily change a video's format from one to another - with no other editing involved whatsoever. (So I guess this tutorial is about two things after all. ;) )

To do this, just choose your desired format & select the Menu File > Save being sure to at least change the file format suffix in the name to the format that you've chosen (.avi .mp4 .mkv ...), just doing that will save you from overwriting your original video file.

OK, now back to the video editing topic of this page:

Method

Load the video into Avidemux

Use whatever method your DE/WM &/or the filemanager/directory utility program that you use within it, to choose the video that you want to edit & then use your RMB menu, or drag & drop or however else you can get Avidemux to open the file (the reason I'm sounding so vague on this matter is that I've been using Worker in my custom Openbox system, as my filemanager/dirutil for so many years that I've forgotten about all of the other ways that most everyone else is using to do this stuff.

Anyway, if you can't find an easier way, just open Avidemux & use its Menu File > Open & then source the video file that you want to start snipping up.

Once choosen, the video will take some time (not that long really) to be processed & loaded into Avidemux.

Set your Markers
-----------------------------------------------------------------------------
Note: JmaCWQ, has bought the following to my attention:

Your how-to looks good, maybe an addition might be a mention of using keyframes as cut points when possible?
Avidemux 2.7.0 (appimage) displays a message about possible corruption just before saving if non-keyframe cut points are used.
My own experiences tend to agree with this as it seems hit n miss, if cutting a section not aligned to keyframes sometimes it works ok, sometimes not.

-----------------------------------------------------------------------------
Keyframes are arrived at via the use of the up/down cursor control keys.
_____________________________________________________________

After the video is loaded it can then be edited. So the first thing that needs to be done is for you to go to the Menu Edit > Set Marker A & select that straight away, IF you do actually want to remove video from the very beginning of the video.

Alternatively, you may want to cut a section out of the video starting from another point in the timeline. Under such circumstances apply the instructions written in the next paragraph as they are applicable. Just remember that you need to Set Marker A at the beginning of the section of video that you want to cut (pretty obvious really).

Next you need to drag the bar that you'll find down near the bottom of the Avidemux screen, through the timeline of the video until you get as close as you can to the start of the part of the video that you want to cut out.

Once there, you can use the curser control arrows on your keyboard to much more slowly & accurately move to the point where you want to set Menu Edit > Set Marker B so that we can mark the end of the section that we want to cut out of the move (this is the method we are using with Avidemux).

Once Marker B has been set, we then choose Menu Edit > Cut & as quick as that our Marker B point has now moved to the original position of Marker A.

Remember, if you find that the above method is unreliable, & you aren't already using keyframes when you set your A & B markers. Then try setting them using the up/down cursor control keys, as they should mean that you are cutting on keyframes.

A second cut

Now, if we so choose, we can use the timeline bar near the bottom of the Avidemux window to again scroll to as close as we can get to that point in the movie's timeline where the end of the section of video that we want to cut out is situated.

Again we use the left & right cursor control keys on our keyboard to accurately position the point where we want to set our marker. Once found, go to Menu Edit > Set Marker A, then (unless you want to remove a section & retain another in the video) we slide the video's timeline to the very end (use the cursor control right arrow to be sure that you are at the very end of the video - this often matters) & then we go to (you guessed it) Menu Edit > Set Marker B.

Cut some more video

After that we go to Menu Edit > Cut & now we may have the snippet of video that we have been working to isolate.

Next we go to Menu File > Save &

be sure to change the file's name from the original

& save it where we choose. I always add the file extension .mkv .avi .mp4[/b] that I have chosen from the Output Format drop down menu down near the bottom right of the Avidemux window.

Conclusion

Simplistically, at this point you should have the section of video that you wanted to excerpt from the larger/longer video stored on your computer & ready to play whenever you choose to view it.

Though of course you could have done far more complex things using these instructions. As it would be easy to use this method to remove multiple sections of a video & in so doing compress the remaining video pieces into one.

Good luck with that... ;)
1_MSI: MAG B560 TORP', i5, RAM 16GB, GTX 1070 Ti 12GB, M2 238GB + USB, MX-23 Fb to Openbox
2_Lenovo: Ideapad 520S, i5, RAM 8GB, GPU i620, HDD 1TB, MX-21 - Openbox
3_Clevo: P150SM-A, i7, RAM 16GB, nVidia 8600, 2x 1TB HDD & M.2 256 GB, MX-21 - Openbox

User avatar
Stevo
Developer
Posts: 12774
Joined: Fri Dec 15, 2006 8:07 pm

Re: Avidemux - Cutting out sections of video (& transcoding too)

#2 Post by Stevo »

Though we can't have Avidemux in our own repos until certain patents expire, the current 2.7.1 version is in a separate multimedia repository on the openSUSE Build Service: http://forums.debian.net/viewtopic.php?f=6&t=127574

I believe that deb-multimedia's 2.6.2 or its own stretch-backport 2.7.1 won't mess up libraries in MX, but don't quote me on that. Make sure it doesn't want to upgrade any other packages you have installed.

Post Reply

Return to “Tips & Tricks by users”