#5427 closed defect (invalid)

ffmpeg hangs when using libx265 to encode a low-bitrate HLS output

Reported by: otiteb Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: libx265
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

I'm using ffmpeg to produce HLS ABR profiles of a 360 degree video (a sample video from Samsung/Oculus?). First tried with h.264 and all worked fine, but when switching to h.265, the ffmpeg process in charge of generating the lowest bitrate goes to zero CPU usage within seconds and never finishes

How to reproduce:

Input file: the one from Oculus Mobile SDK samples "[Samsung] 360 video demo.mp4" (i can try to upload if needed)

% ffmpeg -i /home/victor/Documents/usr/YBVR/Videos/Oculus360/Samsung360Mono.mp4 -y -vcodec libx265 -acodec libfdk_aac -threads 0 -map 0 -flags -global_header -f segment -segment_list /home/victor/Documents/usr/YBVR/Videos/Oculus360/HLSOutputHEVC/Samsung360Mono.mp4_100.m3u8 -segment_time 10 -segment_format mpeg_ts -b:v 100k /home/victor/Documents/usr/YBVR/Videos/Oculus360/Samsung360Mono.mp4_100_%05d.ts

ffmpeg version N-79222-gc9ad357 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
  configuration: --prefix=/home/victor/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/victor/ffmpeg_build/include --extra-ldflags=-L/home/victor/ffmpeg_build/lib --bindir=/home/

Note: i've tried now with several different profiles, here's a summary:
100k - stops at frame 60
200k - stops at frame 2691
500k onwards - completes HLS encode

I'll add the logs from the 100k and 200k processes, where the only difference with the above syntax was that i added debug logging.

Let me know if there is more info needed

Attachments (3)

logHEVC_100.log (21.1 KB) - added by otiteb 19 months ago.
Logs for the 100k process, froze in frame 61
logHEVC_200.log (968.5 KB) - added by otiteb 19 months ago.
Log from the 200k process. Froze at frame 2500+
gdb-output1.log (13.4 KB) - added by otiteb 19 months ago.
Output of gdp for the 100k ffmpeg process, with all steps recommended in the reporting bug guide

Download all attachments as: .zip

Change History (9)

Changed 19 months ago by otiteb

Logs for the 100k process, froze in frame 61

Changed 19 months ago by otiteb

Log from the 200k process. Froze at frame 2500+

comment:1 Changed 19 months ago by otiteb

  • Component changed from undetermined to ffmpeg

comment:2 Changed 19 months ago by otiteb

  • Version changed from unspecified to git-master

comment:3 Changed 19 months ago by cehoyos

  • Component changed from ffmpeg to undetermined

Is this only reproducible with hls output or also with the mpegts or the null muxer?

Please provide a backtrace to make this a valid ticket.

comment:4 Changed 19 months ago by otiteb

Hi

It was reproducible with both mpegts and null muxer

As for backtrace, i'm trying to get that.... for some reason i can't find ffmpeg_g among my binaries... trying to sort that out, will come back when i have news (i might have to rebuild or something like that)

Changed 19 months ago by otiteb

Output of gdp for the 100k ffmpeg process, with all steps recommended in the reporting bug guide

comment:5 Changed 19 months ago by otiteb

Ok, found ffmpeg_g :) , ran the bt and other steps recommended in the guide. I've attached the entire gdb output

i had to give a "continue" order to ffmpeg_g after it hung in frame 60 in order to be able to get bt (else gdb would not respond)

comment:6 Changed 19 months ago by cehoyos

  • Keywords HLS removed
  • Resolution set to invalid
  • Status changed from new to closed

(Didn't I suggest a slightly different command line?)

The process hangs in a routine within libx265, nothing we can do.
Note that your issue may indicate a hardware defect or an issue with your OS.

Note: See TracTickets for help on using tickets.