bilibili / ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
GNU General Public License v2.0
32.55k stars 8.13k forks source link

Flipping the media stream vertically (or applying any kind of rotation) #5532

Open sarimmehdi opened 1 year ago

sarimmehdi commented 1 year ago

Hello. Is there a way to flip the incoming stream vertically? I tried the following:

ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec-auto-rotate", 1);

But that doesn't seem to do anything. Actually, we are streaming video directly from a camera (via an IP address) and the camera can only be mounted upside down. We only want the camera stream to be drawn upside down (flipped vertically). Flipping the surface view or canvas is out of the question since we have other bitmaps that are also drawn and we don't want them to be affected.