javacv
javacv copied to clipboard
How to grab H264 data instead of YUV?
I want to use FFmpegFrameGrabber to capture H264 streams. But I found that the Frame returned after calling the grab() is YUV data. How can I capture H264 instead of YUV?How to config FFmpegFrameGrabber?
It sounds like you might want to call grabPacket() maybe?
Thank you. I need to read H264 data from RTP to achieve two functions. The first function is to store H264 as an mp4 file, and the second function is to decode H264 into yuv for facial recognition. I should first call grabPacket to capture H264, and then call recordPacket to store it as mp4. Then how can I decode the AVPacket object into YUV?
We'd have to update the code a bit for that, but contributions are welcome!