I use ffmpeg to decode flv frame to yuv420p.But I don’t know how to display it on android
help me please!!
I use ffmpeg to decode flv frame to yuv420p.But I don’t know how to
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I recently published some code we were using for FFMPEG on Android:
https://github.com/churnlabs/android-ffmpeg-sample/blob/master/jni/native.c
That first function, fill_bitmap(), fills an Android bitmap with the contents of an AVFrame buffer.
Not the most efficient way to do it, but it’s working code. The Android bitmap is an ARGB_8888 and I just set the alpha to zero. Seemed like the best match for the formats the sws_scale() contexts supported.