Opened 6 years ago

Closed 6 years ago

#5898 closed defect (worksforme)

ffmpeg hang while converting live stream to hls

Reported by: mahmut zeki Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hi guys i am just trying to restream a live stream as hls
and my batch file just restarts ffmpeg if my source stream goes down as you see
but ffmpeg doesnt give an error doesnt crash does not exit process
it just hangs,stucks because of that my live stream stops and i have to restart it every half hour and not sure what is the reason

SETLOCAL
set bitrate=1200k
:loop

ffmpeg -i "http://x.com:8000/live/live.ts" -i logo.png -filter_complex "overlay=main_w-overlay_w-69:50,fps=30" -strict -2 -vcodec libx264 -preset veryfast -maxrate %bitrate% -minrate %bitrate% -minrate %bitrate% -r 30 -g 60 -c:a aac -b:a 128k -ar 44100 -f segment -hide_banner -loglevel panic -hls_flags delete_segments -segment_list "C:\nginx\html\hls\x.m3u8" -segment_time 5 -segment_list_size 5 -segment_list_flags +live -segment_list_entry_prefix "../ts/" "C:\nginx\html\ts\x-%%3d.ts" > NUL 2>&1 < NUL 

goto loop

i have no idea how can i fix it, as i see it just stucks at writing last .ts file and freezes

Attachments (1)

photo_2016-10-19_12-33-39.jpg (91.6 KB ) - added by mahmut zeki 6 years ago.
last view at freeze

Download all attachments as: .zip

Change History (2)

by mahmut zeki, 6 years ago

last view at freeze

comment:1 by Carl Eugen Hoyos, 6 years ago

Component: ffmpegundetermined
Keywords: ffmpeg hls removed
Priority: importantnormal
Resolution: worksforme
Status: newclosed
$ ffmpeg -i "http://x.com:8000/live/live.ts" -i logo.png
ffmpeg version N-82041-gd5082a2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 32.100 / 55. 32.100
  libavcodec     57. 63.103 / 57. 63.103
  libavformat    57. 52.100 / 57. 52.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 64.100 /  6. 64.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc    54.  0.100 / 54.  0.100
http://x.com:8000/live/live.ts: Connection timed out
Note: See TracTickets for help on using tickets.