SlideShare a Scribd company logo
1
Yossi Cohen
FFMPEG
for
Android
2
The Problem
There are many FFMPEG for Android
Scripts. Most of them doesn’t work duo to:
Frequent changes in FFMPEG Code
Changes in Android Tool chain
3
Compilation instructions
Download the latest NDK 32bit version
there are problems when compiling on
NDK-64bit
Install the NDK on $Home/ (or change the
NDK address in the script)
Make sure you have root access to change
and create in the new directories there
might be a need to chmod 777 some of the
new directories manually
4
Run the bottom script on this page saving it to
ffmpeg4android.sh push it to device sdcard and
chmod it to run enabled (described below). It is
recommended to unmark the git clone line of the
FFMPEG
From the bin directory push the ffmpeg to the /data
folder on the phone: adb push fmpeg /data/ffmpeg
Change ffmpeg permissions to run permissions
using: adb shell, cd /data, chmod 775 ffmpeg
Test ffmpeg on an Android local media file
5
Instructions
 1) Download the latest NDK 32bit version there are
problems when compiling on NDK-64bit
 2) Install it on $Home/ (or change the script below)
 3) Make sure you have root access to change and create
in the new directories there might be a need to chmod 777
some of the new directories manually
 4) Run the script below by saving it to ffmpeg4android.sh
push it to device sdcard and chmod it to run enabled
(described below)
 5) From the bin directory push the ffmpeg to the /data
folder on the phone: adb push fmpeg /data/ffmpeg
 6) Change ffmpeg permissions to run permissions using:
adb shell, cd /data, chmod 775 ffmpeg
 7) run ffmpeg on a local file
6
Script
#!/bin/bash
echo ""
echo " ********** FFmpeg Android Build ********** "
echo ""
NDK=$HOME/android-ndk-r8d
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
PLATFORM=$NDK/platforms/android-14/arch-arm
PREFIX=$HOME/FFmpeg.Binaries.Android
FFMPEG_BASE=$HOME/FFmpeg.Build
if [ -d "$FFMPEG_BASE" ]; then
rm -v -r -f $FFMPEG_BASE
fi
if [ -d "$PREFIX" ]; then
rm -v -r -f $PREFIX
fi
mkdir $FFMPEG_BASE
mkdir $PREFIX
# x264 Installation
echo ""
echo " ********** libx264 Installation ********** "
echo ""
cd $FFMPEG_BASE
git clone --depth 1 git://git.videolan.org/x264
cd $FFMPEG_BASE/x264
./configure --prefix=$PREFIX 
--enable-static 
--enable-pic 
--disable-asm 
--disable-cli 
--host=arm-linux 
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- 
--sysroot=$PLATFORM
make
sudo make install
sudo ldconfig
7
Script-2
#FFmpeg Installation
echo ""
echo " ********** FFmpeg (Android) Installation ********** "
echo ""
cd $FFMPEG_BASE
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
cd $FFMPEG_BASE/ffmpeg
./configure --target-os=linux --prefix=$PREFIX 
--enable-cross-compile 
--enable-runtime-cpudetect 
--disable-asm 
--arch=arm 
--cc=$PREBUILT/bin/arm-linux-androideabi-gcc 
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- 
--disable-stripping 
--nm=$PREBUILT/bin/arm-linux-androideabi-nm 
--sysroot=$PLATFORM 
--enable-nonfree 
--enable-version3 
--enable-gpl 
--disable-doc 
--enable-avresample 
--enable-demuxer=rtsp 
--enable-muxer=rtsp 
--disable-ffserver 
--disable-ffprobe
8
Script 3--enable-ffmpeg 
--enable-ffplay 
--enable-libx264 
--enable-encoder=libx264 
--enable-decoder=h264 
--enable-protocol=rtp 
--enable-hwaccels 
--enable-zlib 
--extra-cflags="-I$PREFIX/include -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors
-Wno-deprecated -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=armv7-a" 
--extra-ldflags="-L$PREFIX/lib"
make -j4 install
$PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib
-L$PLATFORM/usr/lib -L$PREFIX/lib  -soname libffmpeg.so -shared -nostdlib  -
z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so
libavcodec/libavcodec.a libavfilter/libavfilter.a libavresample/libavresample.a
libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz
-ldl -llog -lx264 --warn-once --dynamic-linker=/system/bin/linker
$PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a
# rm -v -r -f $FFMPEG_BASE
clear
echo ""
echo "FFmpeg Android Build Successful..."
echo ""
ls -l -R $PREFIX
9
Thank you!
 Video Expert
 Lectures on Video / Android / VoIP
 Android Native Developer
More About me:
Yossi CohenYossi Cohen
yossicohen19@gmail.comyossicohen19@gmail.com
http://www.mobilevideotech.com 
+972-545-313092+972-545-313092
10
Resources
Script source
http://stackoverflow.com/questions/14751069
/how-to-stream-to-ffserver-from-android
Ad

More Related Content

What's hot (20)

Working with core dump
Working with core dumpWorking with core dump
Working with core dump
Thierry Gayet
 
Embedded Linux Odp
Embedded Linux OdpEmbedded Linux Odp
Embedded Linux Odp
ghessler
 
Documentation with sphinx @ PyHug
Documentation with sphinx @ PyHugDocumentation with sphinx @ PyHug
Documentation with sphinx @ PyHug
Jimmy Lai
 
Twitter data analysis using apache flume
Twitter data analysis using apache flumeTwitter data analysis using apache flume
Twitter data analysis using apache flume
Nitin Kumar
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
William Lee
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCap
William Lee
 
BOSH deploys distributed systems, and Diego runs any containers
BOSH deploys distributed systems, and Diego runs any containersBOSH deploys distributed systems, and Diego runs any containers
BOSH deploys distributed systems, and Diego runs any containers
Benjamin Gandon
 
Confraria SECURITY & IT - Lisbon Set 29, 2011
Confraria SECURITY & IT - Lisbon Set 29, 2011Confraria SECURITY & IT - Lisbon Set 29, 2011
Confraria SECURITY & IT - Lisbon Set 29, 2011
ricardomcm
 
Lecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentLecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports Development
Mohammed Farrag
 
コンテナ仮想、その裏側 〜user namespaceとrootlessコンテナ〜
コンテナ仮想、その裏側 〜user namespaceとrootlessコンテナ〜コンテナ仮想、その裏側 〜user namespaceとrootlessコンテナ〜
コンテナ仮想、その裏側 〜user namespaceとrootlessコンテナ〜
Retrieva inc.
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administration
Mohammed Farrag
 
Linux Command Line
Linux Command LineLinux Command Line
Linux Command Line
Prima Yogi Loviniltra
 
Unix cmd on_free_bsd
Unix cmd on_free_bsdUnix cmd on_free_bsd
Unix cmd on_free_bsd
小均 張
 
The Ring programming language version 1.5.1 book - Part 14 of 180
The Ring programming language version 1.5.1 book - Part 14 of 180The Ring programming language version 1.5.1 book - Part 14 of 180
The Ring programming language version 1.5.1 book - Part 14 of 180
Mahmoud Samir Fayed
 
Light my-fuse
Light my-fuseLight my-fuse
Light my-fuse
Workhorse Computing
 
3.3 perform basic file management
3.3 perform basic file management3.3 perform basic file management
3.3 perform basic file management
Acácio Oliveira
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline Tutorial
Gagah Arifianto
 
How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
 How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
Kentaro Hatori
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
Acácio Oliveira
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
Acácio Oliveira
 
Working with core dump
Working with core dumpWorking with core dump
Working with core dump
Thierry Gayet
 
Embedded Linux Odp
Embedded Linux OdpEmbedded Linux Odp
Embedded Linux Odp
ghessler
 
Documentation with sphinx @ PyHug
Documentation with sphinx @ PyHugDocumentation with sphinx @ PyHug
Documentation with sphinx @ PyHug
Jimmy Lai
 
Twitter data analysis using apache flume
Twitter data analysis using apache flumeTwitter data analysis using apache flume
Twitter data analysis using apache flume
Nitin Kumar
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
William Lee
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCap
William Lee
 
BOSH deploys distributed systems, and Diego runs any containers
BOSH deploys distributed systems, and Diego runs any containersBOSH deploys distributed systems, and Diego runs any containers
BOSH deploys distributed systems, and Diego runs any containers
Benjamin Gandon
 
Confraria SECURITY & IT - Lisbon Set 29, 2011
Confraria SECURITY & IT - Lisbon Set 29, 2011Confraria SECURITY & IT - Lisbon Set 29, 2011
Confraria SECURITY & IT - Lisbon Set 29, 2011
ricardomcm
 
Lecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentLecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports Development
Mohammed Farrag
 
コンテナ仮想、その裏側 〜user namespaceとrootlessコンテナ〜
コンテナ仮想、その裏側 〜user namespaceとrootlessコンテナ〜コンテナ仮想、その裏側 〜user namespaceとrootlessコンテナ〜
コンテナ仮想、その裏側 〜user namespaceとrootlessコンテナ〜
Retrieva inc.
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administration
Mohammed Farrag
 
Unix cmd on_free_bsd
Unix cmd on_free_bsdUnix cmd on_free_bsd
Unix cmd on_free_bsd
小均 張
 
The Ring programming language version 1.5.1 book - Part 14 of 180
The Ring programming language version 1.5.1 book - Part 14 of 180The Ring programming language version 1.5.1 book - Part 14 of 180
The Ring programming language version 1.5.1 book - Part 14 of 180
Mahmoud Samir Fayed
 
3.3 perform basic file management
3.3 perform basic file management3.3 perform basic file management
3.3 perform basic file management
Acácio Oliveira
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline Tutorial
Gagah Arifianto
 
How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
 How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
Kentaro Hatori
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
Acácio Oliveira
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
Acácio Oliveira
 

Viewers also liked (20)

FFmpeg presentation
FFmpeg presentationFFmpeg presentation
FFmpeg presentation
Lauren Sorensen
 
FFmpeg: A Retrospective
FFmpeg: A RetrospectiveFFmpeg: A Retrospective
FFmpeg: A Retrospective
Samsung Open Source Group
 
FFmpeg
FFmpegFFmpeg
FFmpeg
psychesnet Hsieh
 
[Vietnam Mobile Day 2013] - Giới thiệu android media framework dựa trên công ...
[Vietnam Mobile Day 2013] - Giới thiệu android media framework dựa trên công ...[Vietnam Mobile Day 2013] - Giới thiệu android media framework dựa trên công ...
[Vietnam Mobile Day 2013] - Giới thiệu android media framework dựa trên công ...
AiTi Education
 
Live streaming in Android
Live streaming in AndroidLive streaming in Android
Live streaming in Android
Ahmet Mermerkaya
 
Lunch and Learn - FFmpeg
Lunch and Learn - FFmpegLunch and Learn - FFmpeg
Lunch and Learn - FFmpeg
Nuruddin Ashr
 
Multi Streaming Player
Multi Streaming PlayerMulti Streaming Player
Multi Streaming Player
Guillaume Chabin
 
Android Data Binding
Android Data BindingAndroid Data Binding
Android Data Binding
Ezequiel Zanetta
 
MVVM & Data Binding Library
MVVM & Data Binding Library MVVM & Data Binding Library
MVVM & Data Binding Library
10Clouds
 
Android MVVM
Android MVVMAndroid MVVM
Android MVVM
David Estivariz Pierola
 
Memory Leaks in Android Applications
Memory Leaks in Android ApplicationsMemory Leaks in Android Applications
Memory Leaks in Android Applications
Lokesh Ponnada
 
Deep dive into Android Data Binding
Deep dive into Android Data BindingDeep dive into Android Data Binding
Deep dive into Android Data Binding
Radek Piekarz
 
Android - Thread, Handler and AsyncTask
Android - Thread, Handler and AsyncTaskAndroid - Thread, Handler and AsyncTask
Android - Thread, Handler and AsyncTask
Hoang Ngo
 
Android data binding
Android data bindingAndroid data binding
Android data binding
Sergi Martínez
 
2011_12_4K research in PSNC
2011_12_4K research in PSNC2011_12_4K research in PSNC
2011_12_4K research in PSNC
mglowiak
 
RTSP Streaming Server - Demo Streaming RTSP Protocol Over IPv6 Network
RTSP Streaming Server - Demo Streaming RTSP Protocol Over IPv6 NetworkRTSP Streaming Server - Demo Streaming RTSP Protocol Over IPv6 Network
RTSP Streaming Server - Demo Streaming RTSP Protocol Over IPv6 Network
FranZEast
 
RTSP Protocol Analysis Of A Streaming Thorugh IPv6 Network
RTSP Protocol Analysis Of A Streaming Thorugh IPv6 NetworkRTSP Protocol Analysis Of A Streaming Thorugh IPv6 Network
RTSP Protocol Analysis Of A Streaming Thorugh IPv6 Network
FranZEast
 
Nosql redis-mongo
Nosql redis-mongoNosql redis-mongo
Nosql redis-mongo
ibelmonte
 
Remote monitoring system
Remote monitoring systemRemote monitoring system
Remote monitoring system
Pk Doctors
 
FFMPEG TOOLS
FFMPEG TOOLSFFMPEG TOOLS
FFMPEG TOOLS
Ranjith Siji
 
[Vietnam Mobile Day 2013] - Giới thiệu android media framework dựa trên công ...
[Vietnam Mobile Day 2013] - Giới thiệu android media framework dựa trên công ...[Vietnam Mobile Day 2013] - Giới thiệu android media framework dựa trên công ...
[Vietnam Mobile Day 2013] - Giới thiệu android media framework dựa trên công ...
AiTi Education
 
Lunch and Learn - FFmpeg
Lunch and Learn - FFmpegLunch and Learn - FFmpeg
Lunch and Learn - FFmpeg
Nuruddin Ashr
 
MVVM & Data Binding Library
MVVM & Data Binding Library MVVM & Data Binding Library
MVVM & Data Binding Library
10Clouds
 
Memory Leaks in Android Applications
Memory Leaks in Android ApplicationsMemory Leaks in Android Applications
Memory Leaks in Android Applications
Lokesh Ponnada
 
Deep dive into Android Data Binding
Deep dive into Android Data BindingDeep dive into Android Data Binding
Deep dive into Android Data Binding
Radek Piekarz
 
Android - Thread, Handler and AsyncTask
Android - Thread, Handler and AsyncTaskAndroid - Thread, Handler and AsyncTask
Android - Thread, Handler and AsyncTask
Hoang Ngo
 
2011_12_4K research in PSNC
2011_12_4K research in PSNC2011_12_4K research in PSNC
2011_12_4K research in PSNC
mglowiak
 
RTSP Streaming Server - Demo Streaming RTSP Protocol Over IPv6 Network
RTSP Streaming Server - Demo Streaming RTSP Protocol Over IPv6 NetworkRTSP Streaming Server - Demo Streaming RTSP Protocol Over IPv6 Network
RTSP Streaming Server - Demo Streaming RTSP Protocol Over IPv6 Network
FranZEast
 
RTSP Protocol Analysis Of A Streaming Thorugh IPv6 Network
RTSP Protocol Analysis Of A Streaming Thorugh IPv6 NetworkRTSP Protocol Analysis Of A Streaming Thorugh IPv6 Network
RTSP Protocol Analysis Of A Streaming Thorugh IPv6 Network
FranZEast
 
Nosql redis-mongo
Nosql redis-mongoNosql redis-mongo
Nosql redis-mongo
ibelmonte
 
Remote monitoring system
Remote monitoring systemRemote monitoring system
Remote monitoring system
Pk Doctors
 
Ad

Similar to FFMPEG on android (20)

Android in ubuntu
Android in ubuntuAndroid in ubuntu
Android in ubuntu
ksrajkumar87
 
Happy porting x86 application to android
Happy porting x86 application to androidHappy porting x86 application to android
Happy porting x86 application to android
Owen Hsu
 
Android OS Porting: Introduction
Android OS Porting: IntroductionAndroid OS Porting: Introduction
Android OS Porting: Introduction
Jollen Chen
 
D1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FFD1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FF
Anthony Jose
 
DEF CON 24 - Antonio Joseph - fuzzing android devices
DEF CON 24 - Antonio Joseph - fuzzing android devicesDEF CON 24 - Antonio Joseph - fuzzing android devices
DEF CON 24 - Antonio Joseph - fuzzing android devices
Felipe Prado
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
Opersys inc.
 
Building aosp
Building aospBuilding aosp
Building aosp
gvercoutere
 
Build Android OS on OSX
Build Android OS on OSXBuild Android OS on OSX
Build Android OS on OSX
Pietro Alberto Rossi
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 
Open-source Android 10 on Orange Pi: myth or reality?
Open-source Android 10 on Orange Pi: myth or reality?Open-source Android 10 on Orange Pi: myth or reality?
Open-source Android 10 on Orange Pi: myth or reality?
GlobalLogic Ukraine
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android Emulator
Samael Wang
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPad
AndrewWright224
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220
AndrewWright224
 
Lecture02web 140phpapp01
Lecture02web 140phpapp01Lecture02web 140phpapp01
Lecture02web 140phpapp01
letuan9999
 
Hacking Android OS
Hacking Android OSHacking Android OS
Hacking Android OS
Jimmy Software
 
Touch your NetBSD
Touch your NetBSDTouch your NetBSD
Touch your NetBSD
Pierre Pronchery
 
NetBSD workshop
NetBSD workshopNetBSD workshop
NetBSD workshop
Jun Ebihara
 
OpenCV 2.2.0 for Android
OpenCV 2.2.0 for AndroidOpenCV 2.2.0 for Android
OpenCV 2.2.0 for Android
Picker Weng
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
Vlatko Kosturjak
 
Lab manual
Lab manualLab manual
Lab manual
BNilavara
 
Happy porting x86 application to android
Happy porting x86 application to androidHappy porting x86 application to android
Happy porting x86 application to android
Owen Hsu
 
Android OS Porting: Introduction
Android OS Porting: IntroductionAndroid OS Porting: Introduction
Android OS Porting: Introduction
Jollen Chen
 
D1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FFD1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FF
Anthony Jose
 
DEF CON 24 - Antonio Joseph - fuzzing android devices
DEF CON 24 - Antonio Joseph - fuzzing android devicesDEF CON 24 - Antonio Joseph - fuzzing android devices
DEF CON 24 - Antonio Joseph - fuzzing android devices
Felipe Prado
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
Opersys inc.
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 
Open-source Android 10 on Orange Pi: myth or reality?
Open-source Android 10 on Orange Pi: myth or reality?Open-source Android 10 on Orange Pi: myth or reality?
Open-source Android 10 on Orange Pi: myth or reality?
GlobalLogic Ukraine
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android Emulator
Samael Wang
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPad
AndrewWright224
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220
AndrewWright224
 
Lecture02web 140phpapp01
Lecture02web 140phpapp01Lecture02web 140phpapp01
Lecture02web 140phpapp01
letuan9999
 
OpenCV 2.2.0 for Android
OpenCV 2.2.0 for AndroidOpenCV 2.2.0 for Android
OpenCV 2.2.0 for Android
Picker Weng
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
Vlatko Kosturjak
 
Ad

More from Yoss Cohen (20)

Underwater robotics simulation with isaac sim
Underwater robotics simulation with isaac simUnderwater robotics simulation with isaac sim
Underwater robotics simulation with isaac sim
Yoss Cohen
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
Yoss Cohen
 
open platform for swarm training
open platform for swarm training open platform for swarm training
open platform for swarm training
Yoss Cohen
 
Deep Learning - system view
Deep Learning - system viewDeep Learning - system view
Deep Learning - system view
Yoss Cohen
 
Dspip deep learning syllabus
Dspip deep learning syllabusDspip deep learning syllabus
Dspip deep learning syllabus
Yoss Cohen
 
IoT consideration selection
IoT consideration selectionIoT consideration selection
IoT consideration selection
Yoss Cohen
 
IoT evolution
IoT evolutionIoT evolution
IoT evolution
Yoss Cohen
 
Nvidia jetson nano bringup
Nvidia jetson nano bringupNvidia jetson nano bringup
Nvidia jetson nano bringup
Yoss Cohen
 
Autonomous car teleportation architecture
Autonomous car teleportation architectureAutonomous car teleportation architecture
Autonomous car teleportation architecture
Yoss Cohen
 
Motion estimation overview
Motion estimation overviewMotion estimation overview
Motion estimation overview
Yoss Cohen
 
Computer Vision - Image Filters
Computer Vision - Image FiltersComputer Vision - Image Filters
Computer Vision - Image Filters
Yoss Cohen
 
Intro to machine learning with scikit learn
Intro to machine learning with scikit learnIntro to machine learning with scikit learn
Intro to machine learning with scikit learn
Yoss Cohen
 
DASH and HTTP2.0
DASH and HTTP2.0DASH and HTTP2.0
DASH and HTTP2.0
Yoss Cohen
 
HEVC Definitions and high-level syntax
HEVC Definitions and high-level syntaxHEVC Definitions and high-level syntax
HEVC Definitions and high-level syntax
Yoss Cohen
 
Introduction to HEVC
Introduction to HEVCIntroduction to HEVC
Introduction to HEVC
Yoss Cohen
 
Hands-on Video Course - "RAW Video"
Hands-on Video Course - "RAW Video" Hands-on Video Course - "RAW Video"
Hands-on Video Course - "RAW Video"
Yoss Cohen
 
Video quality testing
Video quality testingVideo quality testing
Video quality testing
Yoss Cohen
 
HEVC / H265 Hands-On course
HEVC / H265 Hands-On courseHEVC / H265 Hands-On course
HEVC / H265 Hands-On course
Yoss Cohen
 
Web video standards
Web video standardsWeb video standards
Web video standards
Yoss Cohen
 
Product wise computer vision development
Product wise computer vision developmentProduct wise computer vision development
Product wise computer vision development
Yoss Cohen
 
Underwater robotics simulation with isaac sim
Underwater robotics simulation with isaac simUnderwater robotics simulation with isaac sim
Underwater robotics simulation with isaac sim
Yoss Cohen
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
Yoss Cohen
 
open platform for swarm training
open platform for swarm training open platform for swarm training
open platform for swarm training
Yoss Cohen
 
Deep Learning - system view
Deep Learning - system viewDeep Learning - system view
Deep Learning - system view
Yoss Cohen
 
Dspip deep learning syllabus
Dspip deep learning syllabusDspip deep learning syllabus
Dspip deep learning syllabus
Yoss Cohen
 
IoT consideration selection
IoT consideration selectionIoT consideration selection
IoT consideration selection
Yoss Cohen
 
Nvidia jetson nano bringup
Nvidia jetson nano bringupNvidia jetson nano bringup
Nvidia jetson nano bringup
Yoss Cohen
 
Autonomous car teleportation architecture
Autonomous car teleportation architectureAutonomous car teleportation architecture
Autonomous car teleportation architecture
Yoss Cohen
 
Motion estimation overview
Motion estimation overviewMotion estimation overview
Motion estimation overview
Yoss Cohen
 
Computer Vision - Image Filters
Computer Vision - Image FiltersComputer Vision - Image Filters
Computer Vision - Image Filters
Yoss Cohen
 
Intro to machine learning with scikit learn
Intro to machine learning with scikit learnIntro to machine learning with scikit learn
Intro to machine learning with scikit learn
Yoss Cohen
 
DASH and HTTP2.0
DASH and HTTP2.0DASH and HTTP2.0
DASH and HTTP2.0
Yoss Cohen
 
HEVC Definitions and high-level syntax
HEVC Definitions and high-level syntaxHEVC Definitions and high-level syntax
HEVC Definitions and high-level syntax
Yoss Cohen
 
Introduction to HEVC
Introduction to HEVCIntroduction to HEVC
Introduction to HEVC
Yoss Cohen
 
Hands-on Video Course - "RAW Video"
Hands-on Video Course - "RAW Video" Hands-on Video Course - "RAW Video"
Hands-on Video Course - "RAW Video"
Yoss Cohen
 
Video quality testing
Video quality testingVideo quality testing
Video quality testing
Yoss Cohen
 
HEVC / H265 Hands-On course
HEVC / H265 Hands-On courseHEVC / H265 Hands-On course
HEVC / H265 Hands-On course
Yoss Cohen
 
Web video standards
Web video standardsWeb video standards
Web video standards
Yoss Cohen
 
Product wise computer vision development
Product wise computer vision developmentProduct wise computer vision development
Product wise computer vision development
Yoss Cohen
 

Recently uploaded (20)

Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 

FFMPEG on android

  • 2. 2 The Problem There are many FFMPEG for Android Scripts. Most of them doesn’t work duo to: Frequent changes in FFMPEG Code Changes in Android Tool chain
  • 3. 3 Compilation instructions Download the latest NDK 32bit version there are problems when compiling on NDK-64bit Install the NDK on $Home/ (or change the NDK address in the script) Make sure you have root access to change and create in the new directories there might be a need to chmod 777 some of the new directories manually
  • 4. 4 Run the bottom script on this page saving it to ffmpeg4android.sh push it to device sdcard and chmod it to run enabled (described below). It is recommended to unmark the git clone line of the FFMPEG From the bin directory push the ffmpeg to the /data folder on the phone: adb push fmpeg /data/ffmpeg Change ffmpeg permissions to run permissions using: adb shell, cd /data, chmod 775 ffmpeg Test ffmpeg on an Android local media file
  • 5. 5 Instructions  1) Download the latest NDK 32bit version there are problems when compiling on NDK-64bit  2) Install it on $Home/ (or change the script below)  3) Make sure you have root access to change and create in the new directories there might be a need to chmod 777 some of the new directories manually  4) Run the script below by saving it to ffmpeg4android.sh push it to device sdcard and chmod it to run enabled (described below)  5) From the bin directory push the ffmpeg to the /data folder on the phone: adb push fmpeg /data/ffmpeg  6) Change ffmpeg permissions to run permissions using: adb shell, cd /data, chmod 775 ffmpeg  7) run ffmpeg on a local file
  • 6. 6 Script #!/bin/bash echo "" echo " ********** FFmpeg Android Build ********** " echo "" NDK=$HOME/android-ndk-r8d PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86 PLATFORM=$NDK/platforms/android-14/arch-arm PREFIX=$HOME/FFmpeg.Binaries.Android FFMPEG_BASE=$HOME/FFmpeg.Build if [ -d "$FFMPEG_BASE" ]; then rm -v -r -f $FFMPEG_BASE fi if [ -d "$PREFIX" ]; then rm -v -r -f $PREFIX fi mkdir $FFMPEG_BASE mkdir $PREFIX # x264 Installation echo "" echo " ********** libx264 Installation ********** " echo "" cd $FFMPEG_BASE git clone --depth 1 git://git.videolan.org/x264 cd $FFMPEG_BASE/x264 ./configure --prefix=$PREFIX --enable-static --enable-pic --disable-asm --disable-cli --host=arm-linux --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- --sysroot=$PLATFORM make sudo make install sudo ldconfig
  • 7. 7 Script-2 #FFmpeg Installation echo "" echo " ********** FFmpeg (Android) Installation ********** " echo "" cd $FFMPEG_BASE git clone --depth 1 git://source.ffmpeg.org/ffmpeg cd $FFMPEG_BASE/ffmpeg ./configure --target-os=linux --prefix=$PREFIX --enable-cross-compile --enable-runtime-cpudetect --disable-asm  --arch=arm --cc=$PREBUILT/bin/arm-linux-androideabi-gcc --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- --disable-stripping --nm=$PREBUILT/bin/arm-linux-androideabi-nm --sysroot=$PLATFORM --enable-nonfree --enable-version3 --enable-gpl --disable-doc --enable-avresample --enable-demuxer=rtsp --enable-muxer=rtsp --disable-ffserver --disable-ffprobe
  • 8. 8 Script 3--enable-ffmpeg --enable-ffplay --enable-libx264 --enable-encoder=libx264 --enable-decoder=h264 --enable-protocol=rtp --enable-hwaccels --enable-zlib --extra-cflags="-I$PREFIX/include -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=armv7-a"  --extra-ldflags="-L$PREFIX/lib" make -j4 install $PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o $PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -L$PREFIX/lib  -soname libffmpeg.so -shared -nostdlib  - z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavfilter/libavfilter.a libavresample/libavresample.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog -lx264 --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a # rm -v -r -f $FFMPEG_BASE clear echo "" echo "FFmpeg Android Build Successful..." echo "" ls -l -R $PREFIX
  • 9. 9 Thank you!  Video Expert  Lectures on Video / Android / VoIP  Android Native Developer More About me: Yossi CohenYossi Cohen [email protected]@gmail.com http://www.mobilevideotech.com  +972-545-313092+972-545-313092