Is it possible to render frames in Exoplayer?

Viewed 284

I am pulling h264 and AAC frames and at the moment I am feeding them to MediaCodec, decoding and rendering them myself, but the code is getting too complicated and I need to cover all cases. I was thinking if it's possible to set up an Exoplayer instance and feed them as a source.

I can only find that it supports normal files and streams, but not separate frames? Do I need to mux the frames myself, and if so is there an easy way to do it?

1 Answers

If you mean that you are extracting frames from a video file or a live stream, and then want to work on them individually or display them individually, you may find that OpenCV would suit your use case.

You can fairly simply open a stream or file, go frame by frame and do what you want with the resulting decoded bitmap.

This answer has a Python and Android example that might be useful: https://stackoverflow.com/a/58921325/334402

Related