Opened 11 years ago
Closed 11 years ago
#5117 closed defect (fixed)
Seeking performance regression
| Reported by: | Carl Eugen Hoyos | Owned by: | |
|---|---|---|---|
| Priority: | important | Component: | avformat |
| Version: | git-master | Keywords: | aac seek regression |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
http://thread.gmane.org/gmane.comp.video.ffmpeg.user/60315
Seeking in a very large aac file with FFplay (and MPlayer) takes longer since 7f5af80ba42bbd82da53dfd95236e9d47159a96a
$ ffmpeg -f lavfi -i "sine=frequency=800:duration=7200" -c:a aac -b:a 320k test.aac
Trying to seek in this file with Page-Up takes significantly longer than before.
$ ffplay test.aac
ffplay version N-77567-g29e6606 Copyright (c) 2003-2015 the FFmpeg developers
built with gcc 4.7 (SUSE Linux)
configuration: --enable-gpl
libavutil 55. 11.100 / 55. 11.100
libavcodec 57. 20.100 / 57. 20.100
libavformat 57. 21.100 / 57. 21.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 22.100 / 6. 22.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[aac @ 0x7ff9b0000920] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'test.aac':
Duration: 02:04:19.00, bitrate: 144 kb/s
Stream #0:0: Audio: aac (LC), 44100 Hz, mono, fltp, 144 kb/s
761.17 M-A: 0.000 fd= 0 aq= 13KB vq= 0KB sq= 0B f=0/0
In addition, the seek is very imprecise, I quit immediately after the seek that should have been to 600 seconds.
The performance regression is also reproducible with FFmpeg:
$ time ./ffmpeg -ss 1:45:00 -i test.aac -f null -
ffmpeg version N-76321-g856b19d Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.7 (SUSE Linux)
configuration:
libavutil 55. 4.100 / 55. 4.100
libavcodec 57. 11.100 / 57. 11.100
libavformat 57. 11.100 / 57. 11.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 14.100 / 6. 14.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
[aac @ 0x23ec3e0] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'test.aac':
Duration: 02:04:19.00, bitrate: 144 kb/s
Stream #0:0: Audio: aac (LC), 44100 Hz, mono, fltp, 150 kb/s
Output #0, null, to 'pipe:':
Metadata:
encoder : Lavf57.11.100
Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
Metadata:
encoder : Lavc57.11.100 pcm_s16le
Stream mapping:
Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
size=N/A time=00:15:00.04 bitrate=N/A
video:0kB audio:77523kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
real 0m1.242s
user 0m1.219s
sys 0m0.022s
$ time ./ffmpeg -ss 1:45:00 -i test.aac -f null -
ffmpeg version N-76323-g7f5af80 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.7 (SUSE Linux)
configuration:
libavutil 55. 4.100 / 55. 4.100
libavcodec 57. 12.100 / 57. 12.100
libavformat 57. 11.100 / 57. 11.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 14.100 / 6. 14.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
[aac @ 0x24993e0] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'test.aac':
Duration: 02:04:19.00, bitrate: 144 kb/s
Stream #0:0: Audio: aac (LC), 44100 Hz, mono, fltp, 4 kb/s
Output #0, null, to 'pipe:':
Metadata:
encoder : Lavf57.11.100
Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
Metadata:
encoder : Lavc57.12.100 pcm_s16le
Stream mapping:
Stream #0:0 -> #0:0 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
size=N/A time=00:15:00.04 bitrate=N/A
video:0kB audio:77523kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
real 0m1.361s
user 0m1.339s
sys 0m0.022s
Attachments (1)
Change History (4)
by , 11 years ago
| Attachment: | 0001-avcodec-utils-fix-AVPacket-lifetime-in-seek_frame_ge.patch added |
|---|
comment:1 by , 11 years ago
comment:3 by , 11 years ago
| Component: | undetermined → avformat |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
Fixed by Hendrik in b966a403dd80604bb7dbb9ee6ec331ade0e84953
Note:
See TracTickets
for help on using tickets.



Can you give the attached patch a try?