Opened 3 years ago

Last modified 3 years ago

#2496 open defect

seek swf file failed

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

Description

When I used ffmpeg lib in my application I met an error (av_seek_frame returned -1). And then I used ffplay to play the video, and when I seeked in ffplay, it failed again.

below is the output from ffplay
$ ffplay.exe big_buck_bunny.swf

5.56 A-V: -0.004 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0 = 0B f=0/0

ffplay version N-50025-gb8bb661 Copyright (c) 2003-2013 the FFmpeg developers

built on Feb 17 2013 02:37:45 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.103 / 54. 91.103
libavformat 54. 63.100 / 54. 63.100
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 38.100 / 3. 38.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

[swf @ 03c41800] max_analyze_duration 5000000 reached at 5008151 microseconds
[swf @ 03c41800] Estimating duration from bitrate, this may be inaccurate
Input #0, swf, from 'big_buck_bunny.swf':

Duration: 00:06:30.11, start: 0.000000, bitrate: 47 kb/s

Stream #0:0: Audio: mp3, 22050 Hz, stereo, s16p, 48 kb/s
Stream #0:1: Video: flv1, yuv420p, 640x360, 23.98 fps, 47.92 tbr, 23.96 tbn

Seek to 70% ( 0:04:33) of total duration ( 0:06:30)
big_buck_bunny.swf: error while seeking

Attachments (1)

big_buck_bunny.swf (2.2 MB) - added by hxuanyu 3 years ago.

Change History (5)

Changed 3 years ago by hxuanyu

comment:1 Changed 3 years ago by cehoyos

  • Component changed from FFplay to undetermined
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

The input sample plays for 60 seconds and contains more than 100 keyframes.

$ ffmpeg -ss 19 -i big_buck_bunny.swf out.avi
ffmpeg version N-52413-gad56535 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 23 2013 16:00:56 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 27.100 / 52. 27.100
  libavcodec     55.  6.100 / 55.  6.100
  libavformat    55.  3.100 / 55.  3.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 60.101 /  3. 60.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
[swf @ 0x2dd9780] max_analyze_duration 5000000 reached at 5008151 microseconds
[swf @ 0x2dd9780] Estimating duration from bitrate, this may be inaccurate
big_buck_bunny.swf: could not seek to position 19.000
Input #0, swf, from 'big_buck_bunny.swf':
  Duration: 00:06:30.11, start: 0.000000, bitrate: 47 kb/s
    Stream #0:0: Audio: mp3, 22050 Hz, stereo, s16p, 48 kb/s
    Stream #0:1: Video: flv1, yuv420p, 640x360, 23.98 fps, 47.92 tbr, 23.96 tbn
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf55.3.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 640x360, q=2-31, 200 kb/s, 47.92 tbn, 47.92 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 22050 Hz, stereo, fltp, 192 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (flv -> mpeg4)
  Stream #0:0 -> #0:1 (mp3 -> ac3)
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=0.0 Lsize=      10kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead inf%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

comment:2 Changed 3 years ago by hxuanyu

This swf is converted using ffmpeg command:

the original mp4 file can be seeked in ffplay, but converted swf can't

$ ffmpeg -i big_buck_bunny.mp4 big_buck_bunny.swf
ffmpeg version N-50025-gb8bb661 Copyright (c) 2000-2013 the FFmpeg developers

built on Feb 17 2013 02:37:45 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 17.101 / 52. 17.101
libavcodec 54. 91.103 / 54. 91.103
libavformat 54. 63.100 / 54. 63.100
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 38.100 / 3. 38.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'big_buck_bunny.mp4':

Metadata:

major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
creation_time : 2010-02-09 01:55:39

Duration: 00:01:00.10, start: 0.000000, bitrate: 733 kb/s

Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 22050 Hz, stereo, fltp, 65 kb/s
Metadata:

creation_time : 2010-02-09 01:55:39
handler_name : Apple Sound Media Handler

Stream #0:1(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360, 612 kb/s, 23.96 fps, 24 tbr, 600 tbn, 1200 tbc
Metadata:

creation_time : 2010-02-09 01:55:39
handler_name : Apple Video Media Handler

Stream #0:2(eng): Data: none (rtp / 0x20707472), 45 kb/s
Metadata:

creation_time : 2010-02-09 01:55:39
handler_name : hint media handler

Stream #0:3(eng): Data: none (rtp / 0x20707472), 5 kb/s
Metadata:

creation_time : 2010-02-09 01:55:39
handler_name : hint media handler

Output #0, swf, to 'big_buck_bunny.swf':

Metadata:

major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
encoder : Lavf54.63.100
Stream #0:0(eng): Video: flv1, yuv420p, 640x360, q=2-31, 200 kb/s, 90k tbn, 24 tbc
Metadata:

creation_time : 2010-02-09 01:55:39
handler_name : Apple Video Media Handler

Stream #0:1(eng): Audio: mp3, 22050 Hz, stereo, fltp
Metadata:

creation_time : 2010-02-09 01:55:39
handler_name : Apple Sound Media Handler

Stream mapping:

Stream #0:1 -> #0:0 (h264 -> flv)
Stream #0:0 -> #0:1 (aac -> libmp3lame)

Press [q] to stop, ? for help
frame= 1440 fps=624 q=31.0 Lsize= 2329kB time=00:01:00.16 bitrate= 317.2kbits/s
video:1820kB audio:470kB subtitle:0 global headers:0kB muxing overhead 1.721029%

comment:3 Changed 3 years ago by cehoyos

Another sample is attached to ticket #2692.

comment:4 Changed 3 years ago by hxuanyu

Hi,

Any update for this bug?

Thanks

Note: See TracTickets for help on using tickets.