The beginning frame is not a key frame. Please move the A marker.

Started by gtwibell, April 26, 2009, 04:54:23 PM

Previous topic - Next topic

gtwibell

I am unable to save after editing from 2.4.3 (r4533) on Mac OSX 10.5.6 because of the above error, yet I always make cuts at I frames (using the double arrow buttons to move the edit point) and the display always shows an I frame (at the moment it\'s reading Frame Type: I (00) as the start of my video). I have no filters selected and have chosen \'Copy\' for both Video and Audio content.

Any suggestions most welcome.

Many thanks - GeoffT.

LoRd_MuldeR

Not the start of your video needs to be an I-Frame (that\'s always the case), the A-Marker must be set on an I-Frame!
You asked me once, what was in Room 101. I told you that you knew the answer already.
Everyone knows it. The thing that is in Room 101 is the worst thing in the world.


MuldeR's OpenSource stuff: http://muldersoft.com/

gtwibell

Thanks for the reply. Sadly it makes no difference. I tried setting the A marker to the beginning of the file (which as you say is an I frame) and to another I frame in the file but the result is the same: \'The beginning frame is not a key frame. Please move the A marker.\'

GeoffT.

surfer

If your first frame is not an I-frame use the \"double forward arrow\" to skip to an I-frame. Move one frame back (single arrow). Click on B for B-frame. Select (menu) Edit->Cut to remove the first few frames.
Now your first frame is an I-frame.

Steve Fatula

I have the same problem, the frame IS an I frame. I can advance to a future iframe as well, and set the A marker there, same result when trying to \"copy\" a m2ts input file containing H.264 to mkv output. Simply want to change containers.

No matter what I do, the error comes up and I cannot save mkv.
Steve Fatula
Kall8 Toll Free Phone Numbers, Small Business IT Consulting

Tony Frenden

using the >> arrows, you probably keep landing on the wrong type of frame, regardless of what it shows in the preview.

I was having the same problem, but found that if i navigate manually with mouse when choosing the (A) inpoint rather than using the arrows, it lands on a frame that is usuable.

It\'ll be harder to have a precise in point, but it works everytime, and the >> arrows failed everytime.

Topdown

I had some similar issues. I was working with an MPEG video file made by a compact stills photo camera. Avidemux allowed me to export the file as an AVI but Handbrake (http://en.wikipedia.org/wiki/Handbrake) wasn\'t able to open it. So I knew something was wrong.

I then tried to save it as as an MKV but got this error:
KeyFrame error: The beginning frame is not a key frame.
Please move the A marker.


I tried moving the marker to no avail. I tried the tips posted previously here, but to no avail.

I had also tried saving it as MPEG-PS but the audio was the wrong sample rate (Hz) this led me to discovering a workaround that may help you:

(1) I saved the audio Audio/Save… (don\'t forget to add the file extension for mine it was .mp2)

(2) Using Audacity (http://en.wikipedia.org/wiki/Audacity) I loaded the audio and resampled it to 48kHz and exported it as a 48kHz .mp2 file

(3) I then loaded this resampled 48kHz file into Avidemux (Audio/Main Track/ and set \"Audio source\" to \"External mp3\" and then locate the .mp2)

(4) Having then set the audio to 48kHz Avidemux then allowed me to save the file not only as an MPEG-PS but also as MKV.

It would seem the problem I was suffering from was the sample rate of my video file\'s audio track which was 32kHz, was for some reason causing problems for Avidemux.

I had initially resampled the audio simply to comply with the requirements of the MPEG-PS format, but serendipitously, I also discovered the higher sample rate also allowed me to export as MKV! No more KeyFrame error.

Hope this helps






Avidemux 2.5.2 (r5823)
OS X snow leopard

K Hindall

Is there any way to convert a non-I-frame (a B frame?) to an I-frame?

I tried surfer\'s suggestion, but that cuts too much off the front of my clip.  I want to start on a frame between where it currently starts (an I-frame) and the next I-frame.  Is there no way to do that?

My sample rate is correct (48kHz), so I don\'t think the workaround would help. . . .

Thank you!

K

jonny_8909

Ok ! I had the exact same issue with saving various videos into MKV format. Was pretty painful for me. I found a few working solutions.
Hope this helps:

i) helpful steps by surfer worked magically, however I could only make it work if i was re-encoding the video and not using copy
ii) save the file with (copy for video and audio) as AVI container / format. Then open the newly saved AVI, and save (once again using copy for audio/video) into MKV format/container.

^^ might sound strange but it works !

K Hindall

Thanks, jonny!  I did try it, and it did work . . . sort of.

It worked on the first file I tried it on, but due to the nature of the animation itself, I couldn\'t tell if there was any loss of quality.

So I tried it on another file.  That crashed the program whenever I tried to save the final time (from the AVI container into the MPEG-PS one that I am trying to get).  So it looks like it doesn\'t always work.

But perhaps worse than that, I discovered that the process edits out frames I want to keep.  In this particular sequence, there is first one star that streaks across the screen, then three, and then five.  In the version after the AVI container save, it started with five stars.  I might as well have saved to the next I-frame in from the one I currently start with, as surfer suggested.

So I guess I may be stuck with the extra frames. . . .

I\'m just at a loss as to why I can edit exactly where I want on my DVD recorder\'s hard drive and cannot do so in what should be a more sophisticated system.  I guess I\'ll just edit there and export the exact clips I want to DVD and use iDVD or something to create the final DVD.  I imagine I\'m missing something very basic in the nature of video (as I have said, I am a complete newbie at this), but I am rather baffled.

Thank you for trying!

ON EDIT:
I may be wrong about the quality.  I was looking at the original file again, and it seems I cannot count stars.  (I could\'ve *sworn* there were fewer going across the screen at first!)  I\'ll have to try that again and see what happens with quality--it seems it shouldn\'t change.  But the crashing the program thing does indicate that this won\'t work all the time.

I remain baffled. . . .

ON SECOND EDIT:
OK, this time I am certain: quality is lost in the first step, going from MPEG to MPEG in an AVI container.

I used the opening credits of Tokyo Mew Mew.  The original is a DVD made from VHS off of TV, so there was no copy protection to worry about.  In the original file off the DVD, there is a frame that is a closeup of the heroine\'s face, followed by a frame of the solar system without star streaks, followed by a frame of the solar system with star streaks.  After saving to an AVI container, the frame of the solar system without the star streaks was missing.  I don\'t know why that should be, since \"Copy\" was used, but so it was.

I don\'t know whether the same is true for MKV files, about which I know absolutely nothing, but the approach does not work for MPEG files.

Sorry for the long post, but I wanted to make sure I nailed down the truth of the matter.

Thank you!

K

surfer

Quote from: khindallSo I tried it on another file.  That crashed the program whenever I tried to save the final time (from the AVI container into the MPEG-PS one that I am trying to get).  So it looks like it doesn\'t always work.
It might look a silly question, but it\'s a setting you forget easily (I know, I\'ve been there too): Apart from giving the file name itself another extension, like .mpg, did you also set the container format to MPEG-PS (A+V) as need to be done in the bottom-left format drop-down?

K Hindall

I did for the final save.  Of course the whole idea of jonny_8909\'s suggestion was to save it first into an AVI container and delete the unwanted frames.  That worked.  It was the final save, the one where I did do the MPEG-PS setting, that crashed it.  I tried it more than once.  I can\'t try it again because I remade the file from the original.  Oddly enough *this* time the frame I wanted to start with *was* an I-frame.  (Not sure how that happened.)

At any rate, saving it to AVI removes frames, and I don\'t want that.  I just want to remove those obnoxious unwanted frames off the front.  I tried your suggestion (at least, I think I did), but it cut off more frames than I wanted.

So I guess I\'m stuck with the unwanted frames if I edit the video in Avidemux.  So I think I\'ll just edit it on my DVD recorder, get exactly the clip I want on its hard drive, burn it to DVD, use Avidemux (sometimes with MPlayer--that\'s another odd thing that sometimes works and sometimes doesn\'t) and put it all together in iDVD.  It\'s annoying that those frames can\'t be removed on the computer, but if they can\'t, they can\'t. (I don\'t get how completely *different* frames can be between two I-frames without the second one being an I-frame, but then I am new to all this.)

K

JiN1Ne

For this problem, in fact you have to use the [A Marker always first... This problem only appear when you have to use the B] Marker.

So when using the B] Marker, that's what I do:

-When on the image 0 (beginning of the video), Click the forward single arrow just to move to 1 image forward (only if you want to start from the beginning, otherwise no need of the single arrow).
-Then use the [A Marker
-Then go to where you want to put your B] Marker, and use the B] Marker
-Then cut the part and save the video to whatever format you want.

This way you can use avidemux without frame errors problems.

JiN1Ne

The solution I posted does not work with the latest version 2.6.1, too bad. Or maybe there is a lot more options for the marker with the version 2.6 ?

No problems with the version 2.5.6 though.