bytedeco/javacv

FFmpegFrameRecorder encoding problem frame

Open

#2,269 opened on 2024年8月8日

GitHub で見る
 (5 comments) (0 reactions) (0 assignees)Java (1,583 forks)batch import
help wantedquestion

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

Hello what is the format to encode a frame i use the otaliastudios camera preview plugin for android i get the frame in the addFrameProcessor function the format of the frame is : 17

i get the bitmapbytes : final byte[] mdata = frame.getData();

and i put it directly the buffer ((ByteBuffer)yuvImage.image[0].position(0)).put(mdata);

but the video is black

i set the recorder with this parameters recorder.setFormat("mp4"); recorder.setVideoCodecName("libopenh264");

i tried also to change recorder.setPixelFormat();

thanks for your help

コントリビューターガイド