Bug FS#76: Failure on last capture

#76 - Failure while capturing last frame

E.T.A.: Fixed in SVN, will be in 1.11. Should fix this automatically and include a fallback workaround much simpler than the current one.

This is one of the most annoying and well known bugs in the script.

Reported by various people and noticied by myself too.

  • Seen specially with WMVs but also seen on MOV (SVQ3 at least) and AVIs (reportedly)
  • Theory #1: Length is detected incorrectly. Confirmed.
  • Theory #2: Appointed by Dougn Redhammer
    WMVs authored in macs are more prone to this error. His samples confirmed to have been edited in Macs seemed to verify this.

Using the -t or -E and -O MIN_LENGTH_FOR_END_OFFSET hack works so the reported length is definitely the problem.
This is a less than desirable solution though.

OS/player versions differences

Upon further investigation I found very different results with the same file, in at least once case, when probed on different OSes.

File: Coral_Reef_Adventure_1080.wmv

On Debian Sid, Linux amd64 (@ 2010-02-25):

  • FFmpeg (two versions): 01:45.42
  • Mplayer (SVN-r30534): 01:45.43
  • δ: 0.01s

On FreeBSD 8.0-RELEASE, i386:

  • FFmpeg (0.5): 01:41.29
  • Mplayer (1.0rc2-4.2.1): 01:49.00
  • δ: 7.71s (!)
  • FFmpeg Linux vs FFmpeg FreeBSD δ: 4.13s (??)
  • Mplayer Linux vs Mplayer FreeBSD δ: 3.57s (??)

By trial and error, I was able to capture up to 1m44s.48

Version information:

  • FFmpeg Linux #1 1):
    $ ffmpeg -version
    FFmpeg SVN-r21686
    libavutil     50. 9. 0 / 50. 9. 0
    libavcodec    52.52. 0 / 52.52. 0
    libavformat   52.51. 0 / 52.51. 0
    libavdevice   52. 2. 0 / 52. 2. 0
    libavfilter    1.17. 0 /  1.17. 0
    libswscale     0.10. 0 /  0.10. 0
    libpostproc   51. 2. 0 / 51. 2. 0
  • FFmpeg Linux #2 2):
    $ ffmpeg -version
    ffmpeg      SVN-rUNKNOWN
    libavutil   3211264
    libavcodec  3345152
    libavformat 3278080
  • Mplayer Linux 3):
    $ mplayer 2>&1 | head -n1
    MPlayer SVN-r30534 (C) 2000-2009 MPlayer Team
  • FFmpeg FreeBSD 4):
    $ ffmpeg -version
    FFmpeg 0.5
    libavutil     49.15. 0 / 49.15. 0
    libavcodec    52.20. 0 / 52.20. 0
    libavformat   52.31. 0 / 52.31. 0
    libavdevice   52. 1. 0 / 52. 1. 0
    libavfilter    0. 4. 0 /  0. 4. 0
    libswscale     0. 7. 1 /  0. 7. 1
    libpostproc   51. 2. 0 / 51. 2. 0
  • Mplayer FreeBSD 5):
    $ mplayer 2>&1 | head -n1
    MPlayer 1.0rc2-4.2.1 (C) 2000-2007 MPlayer Team
1)
Debian Sid binary, deb version 5:0.5+svn20100208-0.1
2)
Debian Etch source, deb version 0.cvs20060823
3)
Debian Sid binary, deb version 1:1.0.rc2svn20100211-0.0
4)
8.0-CURRENT Package, pkg version 0.5,1
5)
8.0-CURRENT Package, pkg version 0.99.11_14
All dates/times in this page are UTC.