Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Video Editing on Android - Yelp Engineering

Video Editing on Android - Yelp Engineering

The Android framework makes it easy to play videos. But did you know you your app can support editing videos as well? With fairly simple setup it’s possible to apply filters, perform transformations and color adjustments, add subtitles, and even paint over videos!

In this talk you’ll learn how to create videos directly within your app. We’ll start by building a few video editing libraries, incorporate them into the app build, and finally we’ll look at how to implement video trimming as an example application. Look forward to unleashing your users’ creative powers!

Avatar for MSiddeek

MSiddeek

April 13, 2018

More Decks by MSiddeek

Other Decks in Programming

Transcript

  1. ?

  2. Universal Apk armeabi-v7a Most common x86 All Intel devices arm64-v8a

    Can run armeabi-v7a armeabi x86_64 mips, mips64
  3. Universal Apk armeabi-v7a Most common x86 All Intel devices arm64-v8a

    Can run armeabi-v7a armeabi API Level < 19 x86_64 mips, mips64
  4. Universal Apk armeabi-v7a Most common x86 All Intel devices arm64-v8a

    Can run armeabi-v7a armeabi API Level < 19 x86_64 No Android devices mips, mips64 No Android devices
  5. Universal Apk armeabi-v7a Most common x86 All Intel devices arm64-v8a

    Can run armeabi-v7a armeabi API Level < 19 x86_64 No Android devices mips, mips64 No Android devices WWFD?
  6. Universal Apk armeabi-v7a Most common x86 All Intel devices arm64-v8a

    Can run armeabi-v7a armeabi API Level < 19 x86_64 No Android devices mips, mips64 No Android devices
  7. Universal Apk Option #1 armeabi-v7a Most common x86 All Intel

    devices arm64-v8a Can run armeabi-v7a armeabi API Level < 19 x86_64 No Android devices mips, mips64 No Android devices
  8. ABI Split android { splits { abi { enable true

    reset() include "x86", "armeabi-v7a" universalApk false } } }
  9. android { splits { abi { enable true reset() include

    "x86", "armeabi-v7a" universalApk false } } } ABI Split WWGD?
  10. android { splits { abi { enable true reset() include

    "x86", "armeabi-v7a" universalApk false } } } ABI Split
  11. android { splits { abi { enable true reset() include

    "x86", "armeabi-v7a" universalApk false } } } ABI Split
  12. ABI Split android { splits { abi { enable true

    reset() include "x86", "armeabi-v7a" universalApk false } } } Option #2
  13. Universal Apk armeabi-v7a Most common x86 All Intel devices arm64-v8a

    Can run armeabi-v7a armeabi API Level < 19 x86_64 No Android devices mips, mips64 No Android devices
  14. sync sync sync diff diff diff diff diff // ”freeze”

    the display TextureView ImageView // copy Bitmap
  15. sync sync sync diff diff diff diff diff // ”freeze”

    the display // ”uncover” display TextureView ImageView
  16. sync sync sync diff diff diff diff diff // ”freeze”

    the display // ”uncover” display Option #1 TextureView ImageView
  17. Runtime.getRuntime().exec( "ffmpeg –i " + inputFile + " -ss "

    + startTime + " –to " + endTime + " –y " + outputFile ).waitFor();
  18. final Process process = Runtime.getRuntime().exec( "ffmpeg –i " + inputFile

    + " -ss " + startTime + " –to " + endTime + " –y " + outputFile ); process.getInputStream(); // stdout process.getErrorStream(); // stderr process.getOutputStream(); // stdin process.waitFor();
  19. final Process process = Runtime.getRuntime().exec( "ffmpeg –i " + inputFile

    + " -ss " + startTime + " –to " + endTime + " –y " + outputFile ); process.getInputStream(); // stdout process.getErrorStream(); // stderr process.getOutputStream(); // stdin process.waitFor();
  20. final Process process = Runtime.getRuntime().exec( "ffmpeg –i " + inputFile

    + " -ss " + startTime + " –to " + endTime + " –y " + outputFile ); process.getInputStream(); // stdout process.getErrorStream(); // stderr process.getOutputStream(); // stdin process.waitFor();
  21. CPU