[FFmpeg-user] rotation of video from android_camera

Juha Heinanen jh at tutpro.com
Wed Apr 29 16:59:20 EEST 2020


I tried by replacing ctx->sensor_orientation with several constants,
e.g., 0.0, 90.0, 180.0:

static int add_display_matrix(AVFormatContext *avctx, AVStream *st)
{
    AndroidCameraCtx *ctx = avctx->priv_data;
    uint8_t *side_data;
    int32_t display_matrix[9];

    av_display_rotation_set(display_matrix, ctx->sensor_orientation);
...

There was no change: video from android_camera was always rotated
clockwise 90 degrees.  Any hints on how to figure out why no rotation
takes place?

-- Juha


More information about the ffmpeg-user mailing list