News:

--

Main Menu

AVI turns to MKV in copy mode

Started by HMR, January 06, 2018, 03:10:25 PM

Previous topic - Next topic

HMR

Hello everyone,
I suspect my question is lame but I'll still ask since my video formats knowledge is lame too.
I try to cut a piece from AVI file.
Use A/B markers, COPY option for both video and audio, save as.
But, I can only save to .mkv format, and get MKV file as a result.
Is it "uncompressed cut"? I don't want my videos to be re-encoded, just want a clear copy, with NO compression.
I thought output file format has to be same, in such case. AVI to AVI, MKV to MKV etc.
But this format difference at the end confuses me.
Some help/explanation would really help.
Thanks!!!

zakk


eumagga0x2a

Quote from: HMR on January 06, 2018, 03:10:25 PM
I can only save to .mkv format, and get MKV file as a result.

Sure you can change the default output container to something else, but MKV is just the best choice. MP4 is actually even better for some purposes (exact timing while MKV is limited to 1 millisecond accuracy), but much less flexible.

QuoteIs it "uncompressed cut"? I don't want my videos to be re-encoded, just want a clear copy, with NO compression.

Most likely your videos are already compressed, otherwise they would easily occupy hundreds of gigabytes worth of disk space. Leaving the video and audio codec at the default setting "copy" means that compressed video and audio frames will be written to the output container without being first decoded and then reencoded – exactly as you wish.

QuoteI thought output file format has to be same, in such case. AVI to AVI, MKV to MKV etc.

No, not at all. A container is just a structure to explain where the actual frames are stored. However, some containers impose limitations on codecs used to compress audio and video as well as on other features (e.g. MKV allows to store subtitles and supports also chapters, and the chapters may overlap if needed). AVI is a legacy container whose shortcomings make it incompatible with modern codecs. Avoid saving video as AVI as good as you can.

GeoSlv

I also have avi editors in Windows so dropping avi support is a big letdown. Go to filehippo and get older versions. I haven't checked v.6.
Why should we be so gung-ho on x264 when it has so fewer editing capabilities, like no cutting between key frames. Is that "I frame"? Is that called Index?

eumagga0x2a

Quote from: GeoSlv on January 28, 2018, 10:28:56 PM
I also have avi editors in Windows so dropping avi support is a big letdown.

No one plans to drop AVI support in Avidemux. What gives you that idea?

QuoteWhy should we be so gung-ho on x264

Excellent visual quality at high compression rates. But HEVC is even better.

Quotewhen it has so fewer editing capabilities, like no cutting between key frames.

No codec in the world allows to place the entry point in copy mode not at a keyframe (more precisely, not at an IDR frame) without more or less severe video corruption. The exit point may be at a P-frame as far as no previous B-frame uses a later frame as reference. Success is guaranteed only when cutting at an IDR frame (also called keyframe or I-frame = intra coded frame). This limitation is pure maths, not an evil conspiracy :-)

dosdan

#5
Quote from: eumagga0x2a on January 28, 2018, 11:50:27 PM
The exit point may be at a P-frame as far as no previous B-frame uses a later frame as reference.

Probably just an English usage problem, as I know it's not your native language. But I want to be clear here. Do you mean:

   The exit point may be at a P-frame as long as no previous B-frame uses a later frame as reference.

If so, how could you tell if the chosen "B"/End-point was suitable? That is, how would you know that no previous B-frame references a frame after the selected P-frame? Could you please illustrate this with simple IDR/I-frame, B-frame, P-frame sequence diagrams showing suitable & unsuitable sequences for Copy mode?


Dan.

GeoSlv

#6
Quote from: dosdan on January 29, 2018, 01:32:14 AM
Quote from: eumagga0x2a on January 28, 2018, 11:50:27 PM
No codec in the world allows to place the entry point in copy mode not at a keyframe
Avidemux doesn't allow that cutting in ANY mode, right? Is there something that does?

"No one plans to drop AVI support in Avidemux. What gives you that idea?"
That's what HMR said. Maybe I'm missing something. I'm new to 2.7. Your output formats.

I'd like to be sure what Index means in these files.

eumagga0x2a

Quote from: GeoSlv on January 29, 2018, 01:44:43 AM
Avidemux doesn't allow that cutting in ANY mode, right?

Wrong. The frame type matters only in copy mode.

Quote"No one plans to drop AVI support in Avidemux. What gives you that idea?"
That's what HMR said.

HMR seems to be not familiar with the basic use of the application. This explains his incorrect statement.

eumagga0x2a

Quote from: dosdan on January 29, 2018, 01:32:14 AM
Quote from: eumagga0x2a on January 28, 2018, 11:50:27 PM
The exit point may be at a P-frame as far as no previous B-frame uses a later frame as reference.

Probably just an English usage problem, as I know it's not your native language. But I want to be clear here. Do you mean:

   The exit point may be at a P-frame as long as no previous B-frame uses a later frame as reference.

Oh yes, thanks.

QuoteIf so, how could you tell if the chosen "B"/End-point was suitable? That is, how would you know that no previous B-frame references a frame after the selected P-frame?

This B-frame would arrive after all its references in the stream. In copy mode, it would be dropped, I guess. To be sure, both start and end point should be at I-frames.


GeoSlv

"Wrong. The frame type matters only in copy mode."
2.5 always said that to avoid a crash we should only use I-frames. If 2.7 can handle any edit point now I will have to try that and it would be appreciated.
I've looked in past years for useful mp4 editors and it is a wilderness.
As for saving avi copy, is it just up to HMR to choose "avi mux" and then type .avi?

eumagga0x2a

Quote from: GeoSlv on January 29, 2018, 02:26:30 AM
If 2.7 can handle any edit point now I will have to try that and it would be appreciated.

For better experience, please use the most current nightly as the 2.7.0 release is getting very old.

QuoteAs for saving avi copy, is it just up to HMR to choose "avi mux" and then type .avi?

Just choose AVI as container. One caveat: if the source .avi contains video encoded with h264 or h265 (HEVC), do not, really do not use AVI as target container unless the video contains no B-frames (the reason: AVI doesn't store presentation time stamps, essential for correct and fast frame reordering).

GeoSlv

#11
The output choice is AVI Muxer, which we have to guess means container.
If I recall right, 2.7 when first installed had the default output as mkv.
I don't use nightlies, so I'm taking it that it can work from between I-frames. Now if there was Smart Copy you could copy that way too. That's what I mean about avi.

eumagga0x2a

Quote from: GeoSlv on January 29, 2018, 05:47:41 AM
If I recall right, 2.7 when first installed had the default output as mkv.

This is correct, the default has been changed to reflect the propagation of modern codecs which are not compatible with AVI.

QuoteI don't use nightlies

Well, this significantly impairs your experience with the application.

HMR

Better late than never.
Found this topic and was very surprised I didn't thank eumagga0x2a for such a clear and detailed reply he gave to my question.
Thanks!!!!!  :)