bytedeco/javacv

Daley in startup streaming with RTMP

Open

#862 创建于 2017年12月20日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)Java (1,583 fork)batch import
help wantedquestion

仓库指标

Star
 (6,985 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Hello, i'm using FFMPEG to capture webcam and stream it to RTMP nginx server , but i get latency in startup about 4-6 seconds then the client send a stream to server. i use FLV1 codec for video. i use this configurations:

recorder = new FFmpegFrameRecorder( "rtmp://server_ip/application_name/stream_name" , 320 , 240 , 2 );
recorder.setInterleaved(true);
recorder.setVideoBitrate(120000);
recorder.setVideoCodec(avcodec.AV_CODEC_ID_FLV1);
recorder.setFormat("flv");
recorder.setFrameRate(FRAME_RATE);
recorder.setGopSize(GOP_LENGTH_IN_FRAMES);// GOP_LENGTH_IN_FRAMES
recorder.start();

is it normal configurations or i need change the streaming protocol ?

贡献者指南