Author Topic: Missing frames at end of video.  (Read 929 times)

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1830
Re: Missing frames at end of video.
« Reply #15 on: December 27, 2017, 08:46:54 PM »
It was perfectly fine to start with zero – this is also the way frames are numbered in Avidemux. Meanwhile nightlies containing the fix have been uploaded, you should use them rather than the 2.7.0 release which is really getting long in the tooth.

The issue with last (nb * ref) frames not shown is much more complicated and would likely take more time to fix.

fish

  • Jr. Member
  • **
  • Posts: 73
Re: Missing frames at end of video.
« Reply #16 on: December 29, 2017, 01:17:22 PM »
I was wondering how Avidemux handled frames because when I load the sample video, the time indicator in Avidemux shows 80ms/2 frames, even though the viewer displays the first frame. So the timer in this version, when working in 25fps is 80ms/2 frames out. According to the time indicator I should be seeing the 3rd frame in the viewer. The timing display error goes right to the end of the video.
Do you have a link to the nightly you would recomend, I have only used the general release versions up to now. I think I have another issue that I would like opinions on, also concerning a 2 frame discrepancy but I will have to find a way of presenting it to make it as easy to explain as I can. Maybe the latest version will have already fixed it.
« Last Edit: December 29, 2017, 01:19:47 PM by fish »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 5865
Re: Missing frames at end of video.
« Reply #17 on: December 29, 2017, 01:48:43 PM »
http://avidemux.org/nightly/ last is 27 December 2017 win-32 or -64 bit

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1830
Re: Missing frames at end of video.
« Reply #18 on: December 29, 2017, 05:34:49 PM »
I was wondering how Avidemux handled frames because when I load the sample video, the time indicator in Avidemux shows 80ms/2 frames, even though the viewer displays the first frame. So the timer in this version, when working in 25fps is 80ms/2 frames out. According to the time indicator I should be seeing the 3rd frame in the viewer. The timing display error goes right to the end of the video.

This is not an error. Due to the presence of B-frames the PTS (presentation time stamp) of the first frame is not zero. Avidemux uses uint64_t as data type for PTS and DTS (decode time stamp). It can't go negative. To display the second frame which is a B-frame, the decoder must have decoded 2 frames (nb of ref frames = 2) beforehand.

Some other players use signed long long as data type for time stamps, so DTS can go negative, allowing PTS of the first frame becoming zero despite B-frames in the video.

fish

  • Jr. Member
  • **
  • Posts: 73
Re: Missing frames at end of video.
« Reply #19 on: December 30, 2017, 09:04:57 AM »
Thanks for the link. The explanation mostly went straight over my head but from a pragmatic point of view, it's good to know that the timer is working as intended.

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1830
Re: Missing frames at end of video.
« Reply #20 on: January 06, 2018, 08:43:01 PM »
The issue with last (nb * ref) frames not shown is much more complicated and would likely take more time to fix.

Done, but please wait for nightlies built on Jan. 6 and later. Builds from Jan. 5 are missing a patch which restores the ability to load images without an already loaded video.