Opened 9 months ago

Closed 3 days 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 9 months ago.
Reproduction log
hangs.mp4 (4.8 KB) - added by arucard 9 months ago.
Reproduction input file

Download all attachments as: .zip

Change History (6)

Changed 9 months ago by arucard

Reproduction log

Changed 9 months ago by arucard

Reproduction input file

comment:1 Changed 9 months ago by cehoyos

  • Keywords opus deadlock added
  • Priority changed from normal to important
  • Version changed from unspecified to git-master

comment:2 Changed 8 months ago by cehoyos

  • Reproduced by developer set

comment:3 Changed 3 days ago by richardpl

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

comment:4 Changed 3 days ago by richardpl

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.