Opened 5 years ago

Last modified 4 years ago

#8089 open defect

Hangs process ffmpeg.exe

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

Description

From the documentation:
rw_timeout
"Maximum time to wait for (network) read/write operations to complete, in microseconds."

I use ffmpeg in a batch file with multi-process launch. In fact, it happens that after work, the ffmpeg.exe process freezes and is not unloaded from memory. Please add to the "rw_timeout" command the forced closure of the ffmpeg.exe process after processing.

Change History (10)

comment:1 by Carl Eugen Hoyos, 5 years ago

Component: ffmpegundetermined
Resolution: needs_more_info
Status: newclosed

Please reopen this ticket if you can explain how to reproduce.

comment:2 by Aliaksandr, 5 years ago

Component: undeterminedffmpeg
Resolution: needs_more_info
Status: closedreopened

I need to collect "JPEG" from each working stream.

In the file "in.txt" have the following streams:
http://91.231.233.161:8080/udp/239.195.33.155:1234
http://91.231.233.161:8080/udp/239.195.32.32:1234
http://91.231.233.161:8080/udp/239.195.33.163:1234

Of these three multicast, work only 224.0.90.2:1234 , the rest are not working.
Process ffmpeg.exe hangs on multicast 224.0.90.65:1234 and 224.0.90.224:1234
Team "rw_timeout" does not help to close the hung processes ffmpeg.exe and is not unloaded from memory.
Please add to the "rw_timeout" command the forced closure of the ffmpeg.exe process after timeout (in microseconds).

Sample CMD code to reproduce the hang of the process ffmpeg.exe :

SetLocal EnableExtensions EnableDelayedExpansion

set sSourceFile=in.txt
set sDestFile=out.txt

if "%~1"=="" (
    2>NUL del "%sDestFile%"
) else (
    set host=%~2
    set /a COUNT+=1
    ffmpeg.exe -rw_timeout 7000000 -ss 00:00:01 -i !host! -f image2 -vf scale=720:576 -vframes 1 "!COUNT!.jpeg"
    exit /b
)

if defined sSourceFile (
    if exist "%sSourceFile%" (
        for /f "usebackq delims=" %%i in ("%sSourceFile%") do (
            set /a n+=1
            call start "" /min cmd.exe /c ""%~fs0" %%n%% "%%~i""
            call echo Launched process # %%n%%
            pathping -h 1 -p 500 -q 1 -w 1 127.0.0.1>nul
        )
    ) else (
        echo Can't find source file [%sSourceFile%].
        exit /b 2
    )
) else (
    echo Usage: %~nx0 ^<Source file^>
    exit /b 1
)
exit
Last edited 4 years ago by Aliaksandr (previous) (diff)

comment:3 by Carl Eugen Hoyos, 5 years ago

Component: ffmpegundetermined

Please provide the command line together with the complete, uncut console output for the hanging ffmpeg command to make this a valid ticket.

in reply to:  3 comment:4 by Aliaksandr, 5 years ago

Component: undeterminedffmpeg

Full console output for hanging and not hanging ffmpeg.exe

  1. Hangin process ffmpeg.exe (after minutes more of waiting, the process ffmpeg.exe remained in the same form):
C:\Users\xxxxx\xxxxx>if "1" == "" (del "out.txt" 2>NUL )  else (
set host=http://91.231.233.161:8080/udp/239.195.33.163:1234
 set /a COUNT+=1
 ffmpeg.exe -rw_timeout 7000000 -ss 00:00:01 -i !host! -f image2 -vf scale=720:576 -vframes 1 "!COUNT!.jpeg"
 exit /b
)
ffmpeg version N-94575-gcff309097a Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190807
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 33.100 / 56. 33.100
  libavcodec     58. 55.100 / 58. 55.100
  libavformat    58. 31.101 / 58. 31.101
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 58.100 /  7. 58.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
  1. Not hangin process ffmpeg.exe:
C:\Users\xxxxx\xxxxx>if "2" == "" (del "out.txt" 2>NUL )  else (
set host=http://91.231.233.161:8080/udp/239.195.32.32:1234
 set /a COUNT+=1
 ffmpeg.exe -rw_timeout 7000000 -ss 00:00:01 -i !host! -f image2 -vf scale=720:576 -vframes 1 "!COUNT!.jpeg"
 exit /b
)
ffmpeg version N-94575-gcff309097a Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190807
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 33.100 / 56. 33.100
  libavcodec     58. 55.100 / 58. 55.100
  libavformat    58. 31.101 / 58. 31.101
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 58.100 /  7. 58.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] SPS unavailable in decode_picture_timing
[h264 @ 00000228d8441600] non-existing PPS 0 referenced
[h264 @ 00000228d8441600] decode_slice_header error
[h264 @ 00000228d8441600] no frame!
[h264 @ 00000228d8441600] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 00000228d8441600] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 00000228d8441600] reference picture missing during reorder
[h264 @ 00000228d8441600] Missing reference picture, default is 65437
[h264 @ 00000228d8441600] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 00000228d8441600] Increasing reorder buffer to 2
http://31.148.16.31:8080/udp/224.0.90.2:1234: could not seek to position 935.477
Input #0, mpegts, from 'http://31.148.16.31:8080/udp/224.0.90.2:1234':
  Duration: N/A, start: 934.477456, bitrate: N/A
  Program 102
    Stream #0:0[0x1f41]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 16:11 DAR 20:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1f42](rus): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
File '1.jpeg' already exists.

Please add to the "rw_timeout" command the forced closure of the ffmpeg.exe process after timeout (in microseconds), to avoid future hangs of the ffmpeg process.exe in other conditions.

Last edited 4 years ago by Aliaksandr (previous) (diff)

comment:5 by Aliaksandr, 5 years ago

Version: unspecified4.2

comment:6 by Carl Eugen Hoyos, 5 years ago

Component: ffmpegundetermined
Version: 4.2git-master

comment:7 by Aliaksandr, 5 years ago

Status: reopenedopen

comment:8 by Aliaksandr, 5 years ago

Priority: normalimportant

comment:9 by Aliaksandr, 4 years ago

Priority: importantcritical

comment:10 by Carl Eugen Hoyos, 4 years ago

Priority: criticalnormal
Note: See TracTickets for help on using tickets.