Page MenuHomePhabricator

[ios] Implement transcodeVideo() function on iOS
ClosedPublic

Authored by angelika on Thu, Mar 20, 4:46 AM.
Tags
None
Referenced Files
F5092667: D14479.id47555.diff
Sun, Mar 30, 10:27 AM
F5088474: D14479.diff
Sat, Mar 29, 11:45 PM
F5085041: D14479.id47555.diff
Sat, Mar 29, 3:30 PM
Unknown Object (File)
Sat, Mar 29, 7:43 AM
Unknown Object (File)
Fri, Mar 28, 9:50 AM
Unknown Object (File)
Thu, Mar 27, 12:57 PM
Unknown Object (File)
Wed, Mar 26, 10:11 AM
Unknown Object (File)
Wed, Mar 26, 10:07 AM
Subscribers

Details

Summary

https://linear.app/comm/issue/ENG-10314/migrate-comm-app-to-use-new-media-module

Changes:

  • on the native side we check progress every 200ms and send an event to the js side. The JS side then calls the callback with the progress
  • we can specify the profile and bitrate, we can't specify fps though
  • width and height is mandatory to keep it simple (ios requires it)
  • I'm returning some basic stats (speed, size and duration) but some are missing compared to ffmpeg implementation because I don't see much sense in collecting them. However I can add them if necessary (should be easy on Android, more complicated on iOS)

I'm using AVWriter instead of AVAssetExportSession. Using AVWriter is more complicated and messy but allows for more options.

Depends on D14478

Test Plan

Send some videos on some devices and verify they're transcoded correctly

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

angelika held this revision as a draft.
angelika edited the summary of this revision. (Show Details)
native/expo-modules/comm-expo-package/ios/MediaModule.swift
193

This is -movflags +faststart from ffmpeg

This revision is now accepted and ready to land.Fri, Mar 21, 8:52 AM

Fix rotation issue on android video