Manual / Help to use Avidemux as beginner (Windows 10)

Started by conhelio, October 03, 2020, 08:50:05 AM

Previous topic - Next topic

conhelio

Hi, is there any basic manual available describing how to work with avidemux? The help button doesn´t appear to provide this kind of info... ???
Thanks for any hints!

eumagga0x2a

Please describe your goal and I will try to give you a step-by-step guide.

conhelio

Hi, I want to edit a videoclip MP4 format, just cutting parts, e. g. beginning, end, or cutting a piece in the middle. I have found I have to use the markers A and B, but not really how to do it. A step by step guide would be helpful.

So is there really no manual or similar around?

Thanks anyway for your help!

eumagga0x2a

Quote from: conhelio on October 03, 2020, 12:10:54 PMI want to edit a videoclip MP4 format, just cutting parts, e. g. beginning, end, or cutting a piece in the middle.

With or without re-encoding the video stream?

Quote from: conhelio on October 03, 2020, 12:10:54 PMSo is there really no manual or similar around?

There are pretty many third-party tutorials around, mostly severely outdated or incorrect.

eumagga0x2a

#4
I'll go ahead and provide a walk-through for the case of cutting in copy mode (re-encoding is simpler).

0. The most important thing: please use the latest Avidemux nightly, it has got a lot of important fixes, not present in the last release.

https://avidemux.org/nightly/win64/ (these are cross-compiled builds)

or

https://avidemux.org/nightly/vsWin64 (these are native builds)

At the moment of writing the 64-bit build from the former directory is more recent. It doesn't matter much which one you use unless you need VapourSynth support which is possible only with native builds – if you don't know what VapourSynth is, you don't need to care, just grab the newest.

1. Load the video

2. Make sure that "MP4 Muxer" is selected as output format and both video codec and audio codec are set to "Copy".

3. Is the video displayed in the right orientation? If it is on the side or upside-down, press the button to open the configuration dialog for the output format and set Rotation to the right angle.

4. Drag the navigation slider approximately to the location where you would like to start to cut away a piece of the video, refine the position with UP and DOWN arrows (both the navigation slider and the UP and DOWN arrow keys seek to keyframes – the type of frames where cut points in case of cutting in copy mode must be placed).

5. Set marker A here.

6. Repeat Step 4 to find the suitable keyframe to place the end point of the cut.

7. Set marker B here.

8. Press "Delete".

If you get a warning that the stream is using non-IDR frames as keyframes TAKE IT VERY SERIOUSLY, don't override it and try to find a combination of start and end point which doesn't trigger this warning.

9. If you need more cuts within the video, repeat Steps 4-8 accordingly.

10. Navigate to the keyframe where you would like to start the output.

11. Set marker A here.

12. Navigate to the keyframe where you would like the video to end.

Please note: this frame doesn't need to be a keyframe, but it is not a keyframe, the real last frame in the output may be slightly different, depending on stream properties.

13. Set marker B here.

14. Save the video (Ctrl+S).

If you get errors: please don't hesitate to ask.

(edited, forgot to mention that marker B must be set before saving)

conhelio

Hello, thanks for your quick answers! Indeed I meant copy mode, without new encoding. From my limited understanding of video editing until now, is it correct that encoding mode might be simpler, but it would take considerably more time to  produce the final result, especially if you are dealing with long videos (2 hours, 900 MB mp4 file)?

I will try to go through your detailed description, but let´s be sure about the best release. I have now 2.7.6, installed this morning. Last seems to be 2.7.7 date 1. October, so I would update. Is there any difference in result doing this via the .exe file versus first downloading the zip file?

And yes, I realized there are third party "help" files.. indeed not up to date. Mostly leading you to other products (e. g. filmora).

Thanks!

eumagga0x2a

Quote from: conhelio on October 03, 2020, 04:30:20 PMFrom my limited understanding of video editing until now, is it correct that encoding mode might be simpler, but it would take considerably more time to  produce the final result, especially if you are dealing with long videos (2 hours, 900 MB mp4 file)?

It would take not just much more time and computational power but it implies also a quality loss unless using a lossless codec which means huge output size and, depending on codec, is often also very slow. But it is independent from the structure of the source video stream, i.e. cut points can be set to any frame. Applying video filters mandates re-encoding.

Quote from: conhelio on October 03, 2020, 04:30:20 PMI have now 2.7.6, installed this morning. Last seems to be 2.7.7 date 1. October, so I would update.

Yes, please do. Substantial bugs in cut point check for copy mode were discovered and fixed only after the 2.7.6 release.

QuoteIs there any difference in result doing this via the .exe file versus first downloading the zip file?

The release is a VC++ build (a native build), you can keep all of them if you want (the VC++-built release, an exe-packaged MinGW build (a cross-compiled build) and a ZIP-packaged cross-compiled build elsewhere), just never mix them in the same directory and never run them simultaneously.

conhelio

Good morning.. or day or whatever time it is in your place.
Thanks, I followed your steps with the updated version and it works. The only thing I found surprising in my test video (it is a 14 second test video, which I edited before in movie maker from Windows10), the key frames apparently are exactly every 2 seconds, precisely. Is this usual?

eumagga0x2a

The decision where to insert a keyframe depends on video encoder and its configuration. High quality software encoders like x264 for the H.264 codec use three values for that: the minimum number of frames between keyframes, the maximum number of frames between keyframes and a measure of how much a picture differs from the preceding one.

Hardware encoders often take the easy path and use just a fixed interval. 2 seconds (100 frames at 25 fps) look in general like a good compromise between seek granularity and compression rate, but if the degree of changes in the picture is not taken into account (no keyframe inserted at scene change), then it is what it is.

conhelio

Hi, now I have successfully edited (cut) some video files. Can you also explain how I could reduce the file size (compress) some files? I come up with 2 GB file sizes for a 2 hours recording (original source are zoom recordings of conference sessions). I would like to reduce size by factor of 2 or 4 to make streaming easier.
Any hints welcome!

eumagga0x2a

Please provide the text output of MediaInfo for one of such video files.

conhelio

Sorry, but I don´t know where to find that. When I open the file in Avidemux, or where do I get that Mediainfo?

eumagga0x2a

MediaInfo is a great standalone application, it is not related to Avidemux: https://mediaarea.net/en/MediaInfo

conhelio

Please find the file attached. I had difficulties to send yesterday, first said it contained contact info, and then that I had used the reply option too frequently.

eumagga0x2a

Thank you. The bitrate of mere 1448 kb/s for a H.264 video in a 4K resolution is extremely low, so the first question is whether it is acceptable for you to reduce resolution to 1920x1080 or even to 1280x720. Another question is whether the target device supports HEVC or you have to stick to H.264.

Honestly, I don't think that the bitrate can be significantly (above factor 2) reduced without quality becoming totally terrible even when going all the way down to 1280x720. HEVC would help to improve quality at low bitrates, but not all devices support it, and the codec is very heavy computationally.