bytedeco/javacv

FFmpegFrameGrabber immediately stop in docker

Open

#1,824 opened on Jun 9, 2022

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Java (1,583 forks)batch import
help wantedquestion

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Description of the problem : I'm using FFmpegFrameGrabber to pull rtsp stream and grab image. But when i run it in docker on Linux server (32core), start will block when run more than 10 threads. Then i try run java -jar on server , it works more than 60 threads. what's the reason ? In docker , i can't even see ffmpeg log. this is my code: avutil.av_log_set_level(avutil.AV_LOG_INFO); FFmpegLogCallback.set(); FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(streamUrl); grabber.setOption("rtsp_transport", "tcp"); grabber.setOption("rtsp_flags", "prefer_tcp"); grabber.startUnsafe(false);

Additional notes: docker image is centos:7.9

Contributor guide