private boolean isStart = true;
public void frameRecord(String inputFile, String outputFile, int audioChannel)
throws Exception, org.bytedeco.javacv.FrameRecorder.Exception {
// 获取视频源
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(inputFile);
grabber.setOption("rtsp_transport","tcp");
grabber.setFrameRate(30);
grabber.setVideoBitrate(3000000);
// 流媒体输出地址,分辨率(长,高),是否录制音频(0:不录制/1:录制)
FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(outputFile, 1280, 720,audioChannel);
recorder.setFrameRate(30);
recorder.setVideoBitrate(3000000);
recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264); //avcodec.AV_CODEC_ID_H264 //AV_CODEC_ID_MPEG4