Opened 11 years ago
Closed 11 years ago
#2625 closed defect (fixed)
Transcoding file to aac results in process stuck
Reported by: | Luca Carlon | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avcodec |
Version: | 1.2.1 | Keywords: | aac regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
The ffmpeg transcoding procedure results stuck when trying to transcode a mjpeg/pcm_s16le file to h264/aac. This is what I see after many hours of transcoding:
host-001:No backup luca$ ffmpeg -i DSCN0468.AVI -vcodec libx264 -vprofile high -preset veryslow -crf 22 -acodec aac -strict -2 DSCN0468_transcoded_mac.mp4 -threads 0 ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers built on May 20 2013 05:41:01 with Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libfreetype --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid libavutil 52. 18.100 / 52. 18.100 libavcodec 54. 92.100 / 54. 92.100 libavformat 54. 63.104 / 54. 63.104 libavdevice 54. 3.103 / 54. 3.103 libavfilter 3. 42.103 / 3. 42.103 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 Trailing options were found on the commandline. [avi @ 0x7fc281029c00] non-interleaved AVI Guessed Channel Layout for Input Stream #0.1 : mono Input #0, avi, from 'DSCN0468.AVI': Metadata: encoder : maker : NIKON model : COOLPIX S5100 creation_time : 2012-04-14 15:58:41 Duration: 00:22:46.26, start: 0.000000, bitrate: 22618 kb/s Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 1280x720, 29.97 tbr, 29.97 tbn, 29.97 tbc Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16, 352 kb/s File 'DSCN0468_transcoded_mac.mp4' already exists. Overwrite ? [y/N] y using cpu capabilities: none! [libx264 @ 0x7fc281031800] profile High, level 5.0 [libx264 @ 0x7fc281031800] 264 - core 129 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to 'DSCN0468_transcoded_mac.mp4': Metadata: model : COOLPIX S5100 maker : NIKON encoder : Lavf54.63.104 Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuvj420p, 1280x720, q=-1--1, 30k tbn, 29.97 tbc Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 22050 Hz, mono, fltp, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (mjpeg -> libx264) Stream #0:1 -> #0:1 (pcm_s16le -> aac) Press [q] to stop, [?] for help frame= 616 fps=0.6 q=28.0 size= 8205kB time=00:00:20.43 bitrate=3289.5kbits/s
Everything is still at this point, and the output file size does not increase anymore. Also, -threads 0 commonly uses 4 cores here, resulting in approx 400% of CPU usage. When this point is reached, ffmpeg CPU usage is down to 100% and seems not to end.
I tried to transcode to ac3 and it seemed to go over that point.
Then I tried to produce a sample containing only 30 seconds of audio and transcode to aac. The result is:
host-001:No backup luca$ ffmpeg -v 9 -loglevel 99 -i sample.avi -acodec aac -strict -2 out_audio.mp4 -report ffmpeg started on 2013-06-02 at 14:50:21 Report written to "ffmpeg-20130602-145021.log" ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers built on May 20 2013 05:41:01 with Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libfreetype --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid libavutil 52. 18.100 / 52. 18.100 libavcodec 54. 92.100 / 54. 92.100 libavformat 54. 63.104 / 54. 63.104 libavdevice 54. 3.103 / 54. 3.103 libavfilter 3. 42.103 / 3. 42.103 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 Splitting the commandline. Reading option '-v' ... matched as option 'v' (set libav* logging level) with argument '9'. Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument '99'. Reading option '-i' ... matched as input file with argument 'sample.avi'. Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'aac'. Reading option '-strict' ... matched as AVOption 'strict' with argument '-2'. Reading option 'out_audio.mp4' ... matched as output file. Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'. Finished splitting the commandline. Parsing a group of options: global . Applying option v (set libav* logging level) with argument 9. Applying option report (generate a report) with argument 1. Successfully parsed a group of options. Parsing a group of options: input file sample.avi. Successfully parsed a group of options. Opening an input file: sample.avi. [avi @ 0x7fd45a02de00] Format avi probed with size=2048 and score=100 [avi @ 0x7fd459c12700] use odml:1 [avi @ 0x7fd45a02de00] File position before avformat_find_stream_info() is 5652 [avi @ 0x7fd45a02de00] parser not found for codec pcm_s16le, packets or times may be invalid. Last message repeated 1 times [avi @ 0x7fd45a02de00] All info found [avi @ 0x7fd45a02de00] Estimating duration from bitrate, this may be inaccurate [avi @ 0x7fd45a02de00] File position after avformat_find_stream_info() is 7164 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, avi, from 'sample.avi': Metadata: encoder : Lavf54.63.104 Duration: 00:00:30.65, start: 0.000000, bitrate: 352 kb/s Stream #0:0, 1, 1/22050: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16, 352 kb/s Successfully opened the file. Parsing a group of options: output file out_audio.mp4. Applying option acodec (force audio codec ('copy' to copy stream)) with argument aac. Successfully parsed a group of options. Opening an output file: out_audio.mp4. File 'out_audio.mp4' already exists. Overwrite ? [y/N] y Successfully opened the file. [abuffer @ 0x7fd459c122e0] Setting entry with key 'time_base' to value '1/22050' [abuffer @ 0x7fd459c122e0] Setting entry with key 'sample_rate' to value '22050' [abuffer @ 0x7fd459c122e0] Setting entry with key 'sample_fmt' to value 's16' [abuffer @ 0x7fd459c122e0] Setting entry with key 'channel_layout' to value '0x4' [graph 0 input from stream 0:0 @ 0x7fd459c13480] tb:1/22050 samplefmt:s16 samplerate:22050 chlayout:0x4 [aformat @ 0x7fd459c13940] Setting entry with key 'sample_fmts' to value 'fltp' [aformat @ 0x7fd459c13940] Setting entry with key 'sample_rates' to value '96000,88200,64000,48000,44100,32000,24000,22050,16000,12000,11025,8000,7350' [audio format for output stream 0:0 @ 0x7fd459c139a0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:0' [auto-inserted resampler 0 @ 0x7fd459c13f00] ch:1 chl:mono fmt:s16 r:22050Hz -> ch:1 chl:mono fmt:fltp r:22050Hz Output #0, mp4, to 'out_audio.mp4': Metadata: encoder : Lavf54.63.104 Stream #0:0, 0, 1/22050: Audio: aac ([64][0][0][0] / 0x0040), 22050 Hz, mono, fltp, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_s16le -> aac) Press [q] to stop, [?] for help
No more output.
I'll provide shortly the sample.avi on the upload.ffmpeg.org server with the name aac_stuck_transcoding.avi.
My system is Mac OS X 10.8.3. ffmpeg was built using macports.
Change History (2)
comment:2 by , 11 years ago
Component: | undetermined → avcodec |
---|---|
Keywords: | aac regression added |
Priority: | normal → important |
Reproduced by developer: | set |
Resolution: | → fixed |
Status: | new → closed |
Version: | unspecified → 1.2.1 |
Regression since c065255 / dc7e7d4 - fixed in current git head and origin/release/1.2, thank you for the report!
Sample file fit as attachment, so I uploaded here. Is it possible to destroy it as soon as it is not needed anymore?