Opened 12 years ago

Closed 11 years ago

#1616 closed defect (fixed)

bad seek in WMV2 file

Reported by: DonMoir Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: asf wmv2 seek
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description (last modified by Carl Eugen Hoyos)

Sample file:

http://sms.pangolin.com/temp/bad_seek_wmv2.wmv (3 mb)

If you do ffplay -ss 7 bad_seek_wmv2.wmv it works correctly.

But ffplay -ss 8 bad_seek_wmv2.wmv will fail with gray frame.

For my app, I see corruption and not gray.

VLC has a bit of a problem with it but not as bad.

WMP gets it perfect.

With the following you will get a gray frame and a warning about first frame is not keyframe. The first frame is a keyframe but maybe not the one it seeked to.

ffplay -ss 8 CreaToon3.wmv
ffplay version N-43206-gf857465 Copyright (c) 2003-2012 the FFmpeg developers
  built on Aug  4 2012 16:12:33 with gcc 4.7.1 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3
 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib
 --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb
 --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame
 --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc
 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      51. 66.100 / 51. 66.100
  libavcodec     54. 49.100 / 54. 49.100
  libavformat    54. 22.100 / 54. 22.100
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3.  5.102 /  3.  5.102
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, asf, from 'CreaToon3.wmv':
  Metadata:
    title           : CreaToon 3
    artist          : ANIMANTE BALEARES S.L.
    copyright       : ANIMANTE BALEARES S.L. 2004
    WMFSDKVersion   : 9.00.00.2980
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 0
  Duration: 00:00:42.23, start: 0.000000, bitrate: 664 kb/s
    Stream #0:0(spa): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 1 channels,
s16, 20 kb/s
    Stream #0:1(spa): Video: wmv2 (WMV2 / 0x32564D57), yuv420p, 640x480, 671 kb/
s, 25 tbr, 1k tbn, 1k tbc
[asf @ 012a04a0] ignoring invalid packet_obj_size (15 116 116 310)
[asf @ 012a04a0] freeing incomplete packet size 310, new 1580
1344327525.2[wmv2 @ 012a7060] 2 warning: '''first frame is no keyframe'''
Frame changed from size:0x0 to size:640x480q=    0B f=0/0
  29.51 A-V:  0.186 fd= 163 aq=    5KB vq=   83KB sq=    0B f=0/0

Change History (5)

comment:1 by Carl Eugen Hoyos, 12 years ago

Description: modified (diff)
Keywords: asf wmv2 seek added
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Please remember to only report problems for ffplay if they are not reproducible with ffmpeg (and that means that whenever a ticket for ffplay is reported, some implicit or explicit reason is needed why the ticket is not reported for ffmpeg). The two reasons are that bugs are much more difficult to reproduce with ffplay and that ffplay depends on an external library that is known to contain bugs.

$ ffmpeg -ss 8 -i bad_seek_wmv2.wmv out.png
ffmpeg version N-43291-gcf753d5 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug  7 2012 07:51:32 with gcc 4.3.2 (GCC)
  configuration: --cc=/usr/local/gcc-4.3.2/bin/gcc --enable-gpl --enable-libopenjpeg --enable-libvorbis --enable-libspeex --enable-libmp3lame --enable-libtheora --extra-ldflags=-lm --enable-libvpx --enable-libxavs --enable-x11grab --enable-libass --enable-nonfree --enable-libfaac --enable-libopus --enable-libfdk-aac
  libavutil      51. 66.101 / 51. 66.101
  libavcodec     54. 50.100 / 54. 50.100
  libavformat    54. 22.101 / 54. 22.101
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3.  5.102 /  3.  5.102
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Guessed Channel Layout for  Input Stream #0.0 : mono
Input #0, asf, from 'bad_seek_wmv2.wmv':
  Metadata:
    title           : CreaToon 3
    artist          : ANIMANTE BALEARES S.L.
    copyright       : ANIMANTE BALEARES S.L. 2004
    WMFSDKVersion   : 9.00.00.2980
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 0
  Duration: 00:00:42.23, start: 0.000000, bitrate: 664 kb/s
    Stream #0:0(spa): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, s16, 20 kb/s
    Stream #0:1(spa): Video: wmv2 (WMV2 / 0x32564D57), yuv420p, 640x480, 671 kb/s, 25 tbr, 1k tbn, 1k tbc
Output #0, image2, to 'out.png':
  Metadata:
    title           : CreaToon 3
    artist          : ANIMANTE BALEARES S.L.
    copyright       : ANIMANTE BALEARES S.L. 2004
    WMFSDKVersion   : 9.00.00.2980
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 0
    encoder         : Lavf54.22.101
    Stream #0:0(spa): Video: png, rgb24, 640x480, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:1 -> #0:0 (wmv2 -> png)
Press [q] to stop, [?] for help
[asf @ 0x9115500] ignoring invalid packet_obj_size (15 116 116 310)
[asf @ 0x9115500] freeing incomplete packet size 310, new 1580
[wmv2 @ 0x911c7c0] warning: first frame is no keyframe
[image2 @ 0x910f960] Could not get frame filename number 2 from pattern 'out.png'
av_interleaved_write_frame(): Invalid argument

comment:2 by DonMoir, 12 years ago

Understood, but keep in mind that I generally do not report any ffplay problem and it's only after I have tested elsewhere that I report anything at all. The only way I actually become aware of a problem is thru my own app and never actually use ffplay for anything except to show you the problem.

To me and for the most part, it just seems easier to show you the problem using ffplay but I will use ffmpeg if you think that is easier for you.

comment:3 by DonMoir, 12 years ago

In my own app, I only see a problem when seeking near 18 seconds. It's like a bad index entry is being added. I can seek somewhat before 18 seconds and somewhat after and it's all good. Just the time around when the plane is visible seems to be a problem for me. So around 17 to 21 seconds.

Here's an image of what I see. It should be all blue sky around the plane but there are yellow artifacts from previous frame.

http://sms.pangolin.com/temp/bad_seek_wmv2_at_18_sec.png

Those artifacts come from a forward frame but it doesn't matter. Junk most likely cause of a bad index entry. I was seeking back and forth on it, but always around time 17 to 21 seconds, I see the artifacts from a previous state.

Last edited 12 years ago by DonMoir (previous) (diff)

comment:5 by Michael Niedermayer, 11 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.