Opened 2 years ago

Closed 10 days ago

Last modified 10 days ago

#5707 closed defect (fixed)

seeking with apng does not work

Reported by: shekh Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: apng seek
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

How to reproduce:

I take this file: https://upload.wikimedia.org/wikipedia/commons/1/14/Animated_PNG_example_bouncing_beach_ball.png

After initializing decoder run this pseudocode:

while(1){
  av_read_frame(ctx, &pkt);
  av_packet_unref(&pkt);
  av_seek_frame(ctx,0,0,AVSEEK_FLAG_BACKWARD);
}

av_seek_frame returns 0 (success)

I expect pkt.pts in this case to always be 0 but in fact it is:

0,
157500,
165500,
172500,
...

If I proceed to decoding picture, it is one after another (seek has no effect).

Change History (6)

comment:1 Changed 2 years ago by cehoyos

  • Keywords seek added

Isn't this issue reproducible with ffmpeg?

comment:2 follow-up: Changed 2 years ago by shekh

I dont know how to test this with ffmpeg.
I tried ffplay:
right click with mouse (seek to percentage) does not work and reports some error:

ffplay version N-79690-g78baa45 Copyright (c) 2003-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3
 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --ena
ble-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --e
nable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-lib
gsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --e
nable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-l
ibsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvids
tab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpa
ck --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-
libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 23.100 / 55. 23.100
  libavcodec     57. 38.100 / 57. 38.100
  libavformat    57. 34.103 / 57. 34.103
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 44.100 /  6. 44.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, apng, from 'e:\shift_dev\data\ab.png':B sq=    0B f=0/0
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: apng, rgba(pc), 100x100, 13.33 fps, 13.33 tbr, 100k tbn
[apng @ 04bb0b20] In-stream tag=[38][253]9[201] (0xC939FD26) len=10262462 is not
 implemented. Update your FFmpeg version to the newest one from Git. If the prob
lem still occurs, it means that your file has a feature which has not been imple
mented.
[apng @ 04bb0b20] If you want to help, upload a sample of this file to ftp://upl
oad.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-deve
l@ffmpeg.org)
[apng @ 04bb0b20] In-stream tag=[0][0][0][0] (0x00000000) len=0 is not implement
ed. Update your FFmpeg version to the newest one from Git. If the problem still
occurs, it means that your file has a feature which has not been implemented.
[apng @ 04bb0b20] If you want to help, upload a sample of this file to ftp://upl
oad.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-deve
l@ffmpeg.org)

Then this output repeats infinitely until I press esc.

comment:3 in reply to: ↑ 2 ; follow-up: Changed 2 years ago by cehoyos

Replying to shekh:

I dont know how to test this with ffmpeg.

What's wrong with ffmpeg -ss 1 -i ...?

comment:4 in reply to: ↑ 3 Changed 2 years ago by shekh

Replying to cehoyos:

What's wrong with ffmpeg -ss 1 -i ...?

It does not trigger the problem
ffmpeg -i ball.png test%02d.tga
and
ffmpeg -ss 1 -i ball.png test%02d.tga
create identical sequences of 20 frames

however
ffmpeg -ss 4.4 -i ball.png test%02d.tga
creates single (last) frame

I dont understand what 4.4 means here. The whole duration must be 20 frames/13.33fps = 1.5s.

comment:5 Changed 10 days ago by richardpl

  • Resolution set to worksforme
  • Status changed from new to closed

Seeing work fine here with mpv, You really need longer sample.

comment:6 Changed 10 days ago by cehoyos

  • Resolution changed from worksforme to fixed
  • Version changed from unspecified to git-master
Note: See TracTickets for help on using tickets.