diff --git a/mobile/lib/models/ffmpeg/ffprobe_keys.dart b/mobile/lib/models/ffmpeg/ffprobe_keys.dart index 081fe0ff7e..5eddee32c8 100644 --- a/mobile/lib/models/ffmpeg/ffprobe_keys.dart +++ b/mobile/lib/models/ffmpeg/ffprobe_keys.dart @@ -28,7 +28,7 @@ class FFProbeKeys { static const date = 'date'; static const disposition = 'disposition'; static const duration = 'duration'; - static const quickTimeLocation ="com.apple.quicktime.location.ISO6709"; + static const quickTimeLocation = "com.apple.quicktime.location.ISO6709"; static const durationMicros = 'duration_us'; static const encoder = 'encoder'; static const extraDataSize = 'extradata_size'; @@ -70,6 +70,8 @@ class FFProbeKeys { static const vendorId = 'vendor_id'; static const width = 'width'; static const xiaomiSlowMoment = 'com.xiaomi.slow_moment'; + static const sideDataList = 'side_data_list'; + static const rotation = 'rotation'; } class MediaStreamTypes { diff --git a/mobile/lib/models/ffmpeg/ffprobe_props.dart b/mobile/lib/models/ffmpeg/ffprobe_props.dart index 027d0377ee..9023f83461 100644 --- a/mobile/lib/models/ffmpeg/ffprobe_props.dart +++ b/mobile/lib/models/ffmpeg/ffprobe_props.dart @@ -20,6 +20,7 @@ class FFProbeProps { String? fps; String? codecWidth; String? codecHeight; + int? rotation; // dot separated bitrate, fps, codecWidth, codecHeight. Ignore null value String get videoInfo { @@ -137,6 +138,8 @@ class FFProbeProps { } else if (key == FFProbeKeys.codedHeight) { result.codecHeight = stream[key].toString(); parsedData[key] = result.codecHeight; + } else if (key == FFProbeKeys.sideDataList) { + result.rotation = stream[key][0][FFProbeKeys.rotation]; } } }