Opened 4 years ago

Closed 3 years ago

#7076 closed defect (fixed)

Opus encoder hangs with some input files

Reported by: arucard Owned by:
Priority: important Component: undetermined
Version: git-master Keywords: opus deadlock
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug

When I use the Opus encoder to transcode audio to Opus, it will sometimes end up in an infinite loop with the message Trying to remove 960 samples, but the queue is empty. The reproduction is below and the output is in the attached log file.

For the reproduction I've provided an mp4 audio file though it seems that this could occur with any input format. It does not seem to occur with other output formats. I tested this with the same input file, transcoding to flac and vorbis, both of which succeed.

How to reproduce

./ffmpeg -v 9 -loglevel 99 -report -i ../hangs.mp4 -strict -2 hangs.opus
# requires 2x Ctrl+C to kill

./ffmpeg -version
ffmpeg version N-90271-g3386be16d5 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Debian 7.3.0-6)
configuration: --cc=/usr/bin/gcc-7
libavutil      56.  8.100 / 56.  8.100
libavcodec     58. 14.100 / 58. 14.100
libavformat    58. 10.100 / 58. 10.100
libavdevice    58.  2.100 / 58.  2.100
libavfilter     7. 12.100 /  7. 12.100
libswscale      5.  0.102 /  5.  0.102
libswresample   3.  0.101 /  3.  0.101

This ffmpeg binary was built from master at commit 3386be16d5131961f73c4227e9ddde4e3a5e39e3.

Additional Information

This seems to have been reported before for other codecs, including libopus. This ticket should be about the native Opus encoder in ffmpeg, which does not seem to be reported yet. Most of these earlier reports can be found with this search:
https://trac.ffmpeg.org/search?q=+%22Trying+to+remove%22+samples+empty

Attachments (2)

ffmpeg-20180309-074306.log (543.0 KB ) - added by arucard 4 years ago.
Reproduction log
hangs.mp4 (4.8 KB ) - added by arucard 4 years ago.
Reproduction input file

Download all attachments as: .zip

Change History (6)

by arucard, 4 years ago

Attachment: ffmpeg-20180309-074306.log added

Reproduction log

by arucard, 4 years ago

Attachment: hangs.mp4 added

Reproduction input file

comment:1 by Carl Eugen Hoyos, 4 years ago

Keywords: opus deadlock added
Priority: normalimportant
Version: unspecifiedgit-master

comment:2 by Carl Eugen Hoyos, 3 years ago

Reproduced by developer: set

comment:3 by Elon Musk, 3 years ago

Resolution: fixed
Status: newclosed

comment:4 by Elon Musk, 3 years ago

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