Slide 1

Slide 1 text

V I D E O P R O C E S S I N G O N A N D R O I D N A M R ATA B A N D E K A R

Slide 2

Slide 2 text

W H O A M I • OANDA • raywenderlich.com • Ginger!

Slide 3

Slide 3 text

V I D E O P R O C E S S I N G I N T R O D U C T I O N T O

Slide 4

Slide 4 text

M O B I L E A P P S P O P U L A R U S E I N

Slide 5

Slide 5 text

C O M M O N F E AT U R E S • Special video effects • Merging videos • Cropping and trimming

Slide 6

Slide 6 text

M Y S E C O N D J O B !

Slide 7

Slide 7 text

W E AT H E R G I F

Slide 8

Slide 8 text

F E AT U R E L I S T ?

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

I O S W E AT H E R G I F

Slide 11

Slide 11 text

V I D E O E D I T I N G O N D E V I C E

Slide 12

Slide 12 text

A N D R O I D S U P P O R T • MediaCodec • MediaExtractor • MediaMuxer

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

W H AT N E X T ?

Slide 15

Slide 15 text

F F M P E G

Slide 16

Slide 16 text

W H Y F F M P E G ? • Swiss Army Knife for video • Filters • Subtitles

Slide 17

Slide 17 text

F F M P E G O N A N D R O I D • Executable binary • Shared object library

Slide 18

Slide 18 text

F F M P E G E X E C U TA B L E B U I L D I N G T H E

Slide 19

Slide 19 text

D E P E N D E N C I E S • autoconf • automake • libtool

Slide 20

Slide 20 text

G E T T I N G S TA R T E D Step 1: Download and unpack NDK

Slide 21

Slide 21 text

G E T T I N G S TA R T E D Step 2: Download FFmpeg source code https://github.com/FFmpeg/FFmpeg

Slide 22

Slide 22 text

G E T T I N G S TA R T E D Step 3: Download sources for other libraries like yasm and libvpx

Slide 23

Slide 23 text

G E T T I N G S TA R T E D Step 4: Put FFmpeg and other libraries under ndk/sources

Slide 24

Slide 24 text

C O N F I G U R I N G …

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

C O N F I G U R I N G

Slide 27

Slide 27 text

C O N F I G U R I N G

Slide 28

Slide 28 text

C O N F I G U R I N G

Slide 29

Slide 29 text

C O N F I G U R I N G

Slide 30

Slide 30 text

C O M P I L I N G

Slide 31

Slide 31 text

F F M P E G E X E C U TA B L E I N Y O U R A N D R O I D P R O J E C T

Slide 32

Slide 32 text

C H A N G E P E R M I S S I O N S

Slide 33

Slide 33 text

P R O C E S S B U I L D E R

Slide 34

Slide 34 text

F I LT E R C H A I N I N G

Slide 35

Slide 35 text

P E R F O R M A N C E

Slide 36

Slide 36 text

S H A R E D O B J E C T L I B R A RY B U I L D I N G F F M P E G A S A

Slide 37

Slide 37 text

S E T U P F O R F F M P E G . S O Step 1: JNI project same folder as NDK

Slide 38

Slide 38 text

S E T U P F O R F F M P E G . S O Step 2: Android.mk file

Slide 39

Slide 39 text

S E T U P F O R F F M P E G . S O Step 3: Application.mk file

Slide 40

Slide 40 text

S E T U P F O R F F M P E G . S O Step 4: Place native code in app/jni

Slide 41

Slide 41 text

N D K M A G I C

Slide 42

Slide 42 text

L O A D S H A R E D L I B R A RY

Slide 43

Slide 43 text

W E AT H E R G I F D E M O

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

L I C E N S I N G

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

L I C E N S E C O M P L I A N C E

Slide 48

Slide 48 text

L I C E N S E C O M P L I A N C E • Dynamic linking • FFmpeg source • Configure script

Slide 49

Slide 49 text

L I C E N S E C O M P L I A N C E

Slide 50

Slide 50 text

L I C E N S E C O M P L I A N C E

Slide 51

Slide 51 text

F F M P E G P R O S • Modular • Support for codecs • Versatile • Well documented

Slide 52

Slide 52 text

F F M P E G C H A L L E N G E S • Licensing • Slow • Large

Slide 53

Slide 53 text

M P 4 PA R S E R

Slide 54

Slide 54 text

M P 4 PA R S E R F E AT U R E S • Concatenation • Trimming • Muxing • Demuxing

Slide 55

Slide 55 text

M P 4 PA R S E R U S A G E

Slide 56

Slide 56 text

M P 4 PA R S E R D E M O

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

M P 4 PA R S E R P R O S • Java library • Fast • Clean API

Slide 59

Slide 59 text

M P 4 PA R S E R C H A L L E N G E S • Limited functionality • No encoding and decoding • Concatenates only if inputs have same format

Slide 60

Slide 60 text

R E S O U R C E S • https://github.com/guardianproject/android- ffmpeg • https://github.com/Yelp/ffmpeg-android • https://github.com/inFullMobile/videokit- ffmpeg-android • https://www.ffmpeg.org/legal.html • https://github.com/sannies/mp4parser • https://github.com/TeamWanari/RxMp4Parser

Slide 61

Slide 61 text

O A N D A I S H I R I N G ! jobs.oanda.com

Slide 62

Slide 62 text

T H A N K Y O U ! Q U E S T I O N S ? @ n a m r a t a C o d e s https://github.com/namrata-b/talks/