bytedeco/javacv

Daley in startup streaming with RTMP

Open

#862 opened on Dec 20, 2017

View on GitHub
 (3 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

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 ?

Contributor guide