[FFmpeg-trac] #6852(ffmpeg:new): Encoding process gets stuck and cpu load goes to 100% on Linux (ffmpeg version 2.8.13)

FFmpeg trac at avcodec.org
Wed Nov 22 16:33:03 EET 2017


#6852: Encoding process gets stuck and cpu load goes to 100% on Linux (ffmpeg
version 2.8.13)
-------------------------------------+-------------------------------------
             Reporter:  fcarvalho    |                     Type:  defect
               Status:  new          |                 Priority:  important
            Component:  ffmpeg       |                  Version:  2.8.11
             Keywords:  ffmpeg       |               Blocked By:
  encoding mp4 process stuck         |  Reproduced by developer:  1
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 I am having issues with ffmpeg version 2.8.13 while trying to encode a
 ulaw to mp4. For more than 95% of the files it works fine, but some of the
 encoding process simply get stuck and the cpu load goes up to 100% until i
 kill the process.

 Details:
 - Command line: /bin/ffmpeg -f mulaw -ar 8000 -y -i
 /home/recording_outbound_394485.ulaw -strict -2
 /home/recording_outbound_394485.mp4
 - I am running on CentOS Linux release 7.3.1611 (Core)
 - On version 2.8.11 and 2.8.13 the process gets stuck with 100% cpu load
 - On version 2.5.4 the same files that cause the ffmpeg encoding process
 to get stuck work as expected in a couple of seconds.
 - On windows version 2.2.2 it works too and the file is encoded to mp4 as
 expected.


 Command ran with valgrind:
  valgrind /bin/ffmpeg -f mulaw -ar 8000 -y -i
 /home/recording_outbound_394485.ulaw -strict -2
 /home/recording_outbound_394485.mp4
 ==48708== Memcheck, a memory error detector
 ==48708== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
 ==48708== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright
 info
 ==48708== Command: /bin/ffmpeg -f mulaw -ar 8000 -y -i
 /home/recording_outbound_394485.ulaw -strict -2
 /home/recording_outbound_394485.mp4
 ==48708==
 ffmpeg version 2.8.13 Copyright (c) 2000-2017 the FFmpeg developers
   built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
   configuration: --prefix=/usr --bindir=/usr/bin
 --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg
 --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2
 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-
 strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64
 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --enable-libopencore-amrnb
 --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3
 --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa
 --enable-libass --enable-libcdio --enable-libdc1394 --disable-indev=jack
 --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal
 --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-
 libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
 --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265
 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample
 --enable-postproc --enable-pthreads --disable-static --enable-shared
 --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64
 --enable-runtime-cpudetect
   libavutil      54. 31.100 / 54. 31.100
   libavcodec     56. 60.100 / 56. 60.100
   libavformat    56. 40.101 / 56. 40.101
   libavdevice    56.  4.100 / 56.  4.100
   libavfilter     5. 40.101 /  5. 40.101
   libavresample   2.  1.  0 /  2.  1.  0
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  2.101 /  1.  2.101
   libpostproc    53.  3.100 / 53.  3.100
 [mulaw @ 0x162de840] Estimating duration from bitrate, this may be
 inaccurate
 Guessed Channel Layout for  Input Stream #0.0 : mono
 Input #0, mulaw, from '/home/recording_outbound_394485.ulaw':
   Duration: 00:04:17.12, bitrate: 64 kb/s
     Stream #0:0: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s
 [aac @ 0x163093c0] Too many bits per frame requested, clamping to max
 Output #0, mp4, to '/home/recording_outbound_394485.mp4':
   Metadata:
     encoder         : Lavf56.40.101
     Stream #0:0: Audio: aac ([64][0][0][0] / 0x0040), 8000 Hz, mono, fltp,
 48 kb/s
     Metadata:
       encoder         : Lavc56.60.100 aac
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_mulaw (native) -> aac (native))
 Press [q] to stop, [?] for help
 size=     322kB time=00:01:04.51 bitrate=  40.9kbits/s

  ===>> And it gets stuck <<===

 Unfortunatelly i can't attach the audio file (ulaw) due to client's
 privacy.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6852>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list