Author Topic: [Bug Report/2.6.4] Incorrect frame detection/Frame loss during convertion/remux  (Read 3897 times)

Kein

  • Newbie
  • *
  • Posts: 45
I'm surprised no one reported this issue yet. For some weird reason Avidemux  incorrectly detects the amount of frames on MKV container (direct open or avsproxy; I did not test other containers) and thus processes them wrong as well.

For example, I've cut a small chunk of a movie (1-2 seconds) with direct copy mode. Now I want to remux it into MP4 or convert into avi (xvid). Original MKV snippet contains 15 frames, but after any operations (mentioned earlier) with it in AVD264 - it for some reason loses 3 last frames. Be it conversion/encoding or just remuxing. This makes no sense to me. I tried to extract the raw video stream from original snippet and then mux it into mp4 manually - everything is fine, all 15 frame are here. But doing this with AVD26 always result in frame loss.

AVD255 works correctly for remuxing (direct copy mode) with the same parameters from the same original file, it only "loses" (not actual loss, all 15 frames is here, it just last 1-2 being replaced by the frame before them for no apparent reason even though frames ARE different) frames when being encoded with actual encoder, Xvid or x264.

Why is that so? I never expected avidemux to be super-precise, "all-in-one" monsters usually lack on this field, but this is some heavy loss.
« Last Edit: July 26, 2013, 05:42:58 PM by Kein »

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10971
Does a nightly behave the same ?
I remember fixing the last B frames being dropped, but dont know it it made it to 2.6.4

tuxutat

  • Newbie
  • *
  • Posts: 14
I've just tried this with a random mp4 using nightly build 8839, and indeed, everytime I simply re-save the file (in video/audio copy mode), the last 2 frames are lost. If I open the resulting file and re-save that, another 2 frames are lost. This is the same for the different muxers (mp4, mp4v2, mkv).

Kein

  • Newbie
  • *
  • Posts: 45
Any news?

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10971
I tried mkv, copy/copy => all the frames are there
Maybe the problem is triggered by codec/fps values
Could you share a small sample that exhibits the problem ?

tuxutat

  • Newbie
  • *
  • Posts: 14
Alright, here's a small sample from a Vimeo video. I cut it, leaving one I-frame at a scene change at the end. Save it in copy mode, and that last image of the glasses is gone (usually 2 frames are lost). Re-save that again and another 2 frames are lost etc.

http://www.putlocker.com/file/3C71D0F425A7F2BB

You can't check this with Avidemux though, the last I-frame is inaccessible with it (but it can be seen with a video player). The problem definitely seems to lie in the video timeline already. It looks like for some videos, the last few frames aren't loaded when opening the video.

If I save the video as a mkv and leave a keyframe at the end, the video is safe from further frame loss, as long as those conditions remain true (mkv, I-frame at the end). Here's a sample:

http://www.putlocker.com/file/E46B5F3651026EFE

There is another phenomenon that is probably connected: The last I-frame is reachable in this video, but only via the "next keyframe" and "end of video" button. You can't reach it via the "next frame" button.

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10971
confirmed

Kein

  • Newbie
  • *
  • Posts: 45

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10971
I think i fixed it

Kein

  • Newbie
  • *
  • Posts: 45
Where?

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10971
2.6.6 ?

Kein

  • Newbie
  • *
  • Posts: 45
Checked, issue still there.