AES encrypted Video Playing Functionality with Kotlin/Java and Flutter

Job ID: 37006848

Budget: $30 – $250 USD

Hi,

I want to create video playing functionality for downloaded AES-encrypted MP4 video in my existing Flutter mobile app.

I want to decrypt this video in chunks on the go as and when the user requests to play the video. Video size is 500MB - 1GB and it should be smooth and instant.

Current Setup:
1. User first selects the encrypted video file from the device library.
2. Entire video is first decrypted and written to a cached mp4 file.
3. Using https://pub.dev/packages/video_player player to play the MP4 file
Issue: It is taking approx 1 min to decrypt large video files.

Expected Setup:
1. Write the decryption logic in the native language i.e. Kotlin/Java
2. Play the encrypted in ExoPlayer
3. Additionally, If you can connect it with Flutter then it would be great (optional step)
Goal - File should be immediately played (<5 secs decrypting time) in the app.

Video file details:
1. Encrypted video file: https://drive.google.com/file/d/1ANlIMC--XwEMSZH5P9iwHCtncEYsVbsC/view?usp=sharing
2. Key (hex format) : d9d20f4c7caa721f9aa489a584846a082bbb92e496c729574540aefc54013615
3. IV (hex format) ce2b67cfe30e4b9bd12026ece98ea470
4. Encryption method: AES 256 CBC method

The end Goal is to make the downloaded encrypted video instantly playable. If you have expertise in aes encrypted video and native languages and can help me achieve this, please reach out!