#2388 closed defect (invalid)
ape: fail to seek
| Reported by: | ami_stuff | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | undetermined |
| Version: | git-master | Keywords: | ape |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
seeking does not work with attached file
(the same problem with ffplay)
http://www.datafilehost.com/download-9e8039cc.html
C:\>ffmpeg -ss 15 -i test_2.ape out.wav
ffmpeg version N-51106-g17c1881 Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 19 2013 13:49:37 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enabl
e-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 19.101 / 52. 19.101
libavcodec 55. 1.100 / 55. 1.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 47.104 / 3. 47.104
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, ape, from 'test_2.ape':
Duration: 00:00:30.01, start: 0.000000, bitrate: 818 kb/s
Stream #0:0: Audio: ape (APE / 0x20455041), 44100 Hz, stereo, s16p
Output #0, wav, to 'out.wav':
Metadata:
ISFT : Lavf55.0.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16
, 1411 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (ape -> pcm_s16le)
Press [q] to stop, [?] for help
[output stream 0:0 @ 026a9a60] 100 buffers queued in output stream 0:0, somethin
g may be wrong.
size= 5171kB time=00:00:15.01 bitrate=2821.1kbits/s
video:0kB audio:5170kB subtitle:0 global headers:0kB muxing overhead 0.001511%
}}}cker.
Change History (4)
follow-up: 3 comment:1 by , 13 years ago
comment:2 by , 13 years ago
| Keywords: | ape added |
|---|---|
| Version: | unspecified → git-master |
Isn't the current behaviour expected? For video, seeking is also only possible to key frames and the following command line should work or doesn't it?
$ ffmpeg -i test_2.ape -ss 15 out.wav
comment:3 by , 13 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Replying to jamal:
It works, but the file has only two frames (It's compressed with the Insane profile), and seeking currently only jumps from frame to frame.
The second frame starts at 27 seconds, so -ss 27 or above will seek to it, whereas anything lower will just go back to the start of the first frame.
Ok, thanks for the explanation.
Isn't the current behaviour expected? For video, seeking is also only possible to key frames and the following command line should work or doesn't it?
$ ffmpeg -i test_2.ape -ss 15 out.wav
You're right (I didn't know that this file have only two frames), ticket closed.
comment:4 by , 13 years ago
I am able to seek to any real time position on the test_2.ape file but it's slow. The bottleneck is in do_apply_filter of apedec.c when it calls:
res = ctx->dsp.scalarproduct_and_madd_int16(f->coeffs, f->delay - order,
f->adaptcoeffs - order,order, APESIGN(*data));
APESIGN(*data) is always either -1, 0, or +1, so it seems it could be optimized on that and maybe table driven. I would have to think that it's been looked at in that regard but don't know. Not sure if it's worth the effort but something to think about.



It works, but the file has only two frames (It's compressed with the Insane profile), and seeking currently only jumps from frame to frame.
The second frame starts at 27 seconds, so -ss 27 or above will seek to it, whereas anything lower will just go back to the start of the first frame.