Author Topic: AVI turns to MKV in copy mode  (Read 946 times)

HMR

  • Newbie
  • *
  • Posts: 1
AVI turns to MKV in copy mode
« on: January 06, 2018, 03:10:25 PM »
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

  • Hero Member
  • *****
  • Posts: 622
Re: AVI turns to MKV in copy mode
« Reply #1 on: January 06, 2018, 05:47:54 PM »
I can only save to .mkv format
What do you mean ?

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1955
Re: AVI turns to MKV in copy mode
« Reply #2 on: January 06, 2018, 09:00:28 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.

Quote
Is 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.

Quote
I 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

  • Newbie
  • *
  • Posts: 12
Re: AVI turns to MKV in copy mode
« Reply #3 on: January 28, 2018, 10:28:56 PM »
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

  • Hero Member
  • *****
  • Posts: 1955
Re: AVI turns to MKV in copy mode
« Reply #4 on: January 28, 2018, 11:50:27 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?

Quote
Why should we be so gung-ho on x264

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

Quote
when 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

  • Jr. Member
  • **
  • Posts: 93
Re: AVI turns to MKV in copy mode
« Reply #5 on: January 29, 2018, 01:32:14 AM »
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.
« Last Edit: January 29, 2018, 01:49:33 AM by dosdan »

GeoSlv

  • Newbie
  • *
  • Posts: 12
Re: AVI turns to MKV in copy mode
« Reply #6 on: January 29, 2018, 01:44:43 AM »
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.
« Last Edit: January 29, 2018, 01:58:44 AM by GeoSlv »

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1955
Re: AVI turns to MKV in copy mode
« Reply #7 on: January 29, 2018, 01:58:56 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

  • Hero Member
  • *****
  • Posts: 1955
Re: AVI turns to MKV in copy mode
« Reply #8 on: January 29, 2018, 02:13:10 AM »
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.

Quote
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?

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

  • Newbie
  • *
  • Posts: 12
Re: AVI turns to MKV in copy mode
« Reply #9 on: January 29, 2018, 02:26:30 AM »
"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

  • Hero Member
  • *****
  • Posts: 1955
Re: AVI turns to MKV in copy mode
« Reply #10 on: January 29, 2018, 02:36:41 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.

Quote
As 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

  • Newbie
  • *
  • Posts: 12
Re: AVI turns to MKV in copy mode
« Reply #11 on: January 29, 2018, 05:47:41 AM »
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.
« Last Edit: January 29, 2018, 05:50:56 AM by GeoSlv »

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1955
Re: AVI turns to MKV in copy mode
« Reply #12 on: January 30, 2018, 01:05:16 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.

Quote
I don't use nightlies

Well, this significantly impairs your experience with the application.