SlideShare ist ein Scribd-Unternehmen logo
1 von 10
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

Weitere ähnliche Inhalte

Was ist angesagt?

Working with core dump
Working with core dumpWorking with core dump
Working with core dumpThierry Gayet
 
Embedded Linux Odp
Embedded Linux OdpEmbedded Linux Odp
Embedded Linux Odpghessler
 
Documentation with sphinx @ PyHug
Documentation with sphinx @ PyHugDocumentation with sphinx @ PyHug
Documentation with sphinx @ PyHugJimmy Lai
 
Twitter data analysis using apache flume
Twitter data analysis using apache flumeTwitter data analysis using apache flume
Twitter data analysis using apache flumeNitin 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 PlayCapWilliam 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 containersBenjamin 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, 2011ricardomcm
 
Lecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentLecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentMohammed 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 administrationMohammed 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 180Mahmoud Samir Fayed
 
3.3 perform basic file management
3.3 perform basic file management3.3 perform basic file management
3.3 perform basic file managementAcácio Oliveira
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialGagah 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 BIOSKentaro 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 managementAcá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 managementAcácio Oliveira
 

Was ist angesagt? (20)

Working with core dump
Working with core dumpWorking with core dump
Working with core dump
 
Embedded Linux Odp
Embedded Linux OdpEmbedded Linux Odp
Embedded Linux Odp
 
Documentation with sphinx @ PyHug
Documentation with sphinx @ PyHugDocumentation with sphinx @ PyHug
Documentation with sphinx @ PyHug
 
Twitter data analysis using apache flume
Twitter data analysis using apache flumeTwitter data analysis using apache flume
Twitter data analysis using apache flume
 
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
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCap
 
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
 
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
 
Lecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentLecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports Development
 
コンテナ仮想、その裏側 〜user namespaceとrootlessコンテナ〜
コンテナ仮想、その裏側 〜user namespaceとrootlessコンテナ〜コンテナ仮想、その裏側 〜user namespaceとrootlessコンテナ〜
コンテナ仮想、その裏側 〜user namespaceとrootlessコンテナ〜
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administration
 
Linux Command Line
Linux Command LineLinux Command Line
Linux Command Line
 
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
 
Light my-fuse
Light my-fuseLight my-fuse
Light my-fuse
 
3.3 perform basic file management
3.3 perform basic file management3.3 perform basic file management
3.3 perform basic file management
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline Tutorial
 
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
 
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
 
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
 

Andere mochten auch

[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 - FFmpegNuruddin 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 ApplicationsLokesh Ponnada
 
Deep dive into Android Data Binding
Deep dive into Android Data BindingDeep dive into Android Data Binding
Deep dive into Android Data BindingRadek Piekarz
 
Android - Thread, Handler and AsyncTask
Android - Thread, Handler and AsyncTaskAndroid - Thread, Handler and AsyncTask
Android - Thread, Handler and AsyncTaskHoang Ngo
 
2011_12_4K research in PSNC
2011_12_4K research in PSNC2011_12_4K research in PSNC
2011_12_4K research in PSNCmglowiak
 
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 NetworkFranZEast
 
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 NetworkFranZEast
 
Nosql redis-mongo
Nosql redis-mongoNosql redis-mongo
Nosql redis-mongoibelmonte
 
Remote monitoring system
Remote monitoring systemRemote monitoring system
Remote monitoring systemPk Doctors
 

Andere mochten auch (20)

FFmpeg presentation
FFmpeg presentationFFmpeg presentation
FFmpeg presentation
 
FFmpeg: A Retrospective
FFmpeg: A RetrospectiveFFmpeg: A Retrospective
FFmpeg: A Retrospective
 
FFmpeg
FFmpegFFmpeg
FFmpeg
 
[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 ...
 
Live streaming in Android
Live streaming in AndroidLive streaming in Android
Live streaming in Android
 
Lunch and Learn - FFmpeg
Lunch and Learn - FFmpegLunch and Learn - FFmpeg
Lunch and Learn - FFmpeg
 
Multi Streaming Player
Multi Streaming PlayerMulti Streaming Player
Multi Streaming Player
 
Android Data Binding
Android Data BindingAndroid Data Binding
Android Data Binding
 
MVVM & Data Binding Library
MVVM & Data Binding Library MVVM & Data Binding Library
MVVM & Data Binding Library
 
Android MVVM
Android MVVMAndroid MVVM
Android MVVM
 
Memory Leaks in Android Applications
Memory Leaks in Android ApplicationsMemory Leaks in Android Applications
Memory Leaks in Android Applications
 
Deep dive into Android Data Binding
Deep dive into Android Data BindingDeep dive into Android Data Binding
Deep dive into Android Data Binding
 
Android - Thread, Handler and AsyncTask
Android - Thread, Handler and AsyncTaskAndroid - Thread, Handler and AsyncTask
Android - Thread, Handler and AsyncTask
 
Android data binding
Android data bindingAndroid data binding
Android data binding
 
2011_12_4K research in PSNC
2011_12_4K research in PSNC2011_12_4K research in PSNC
2011_12_4K research in PSNC
 
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
 
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
 
Nosql redis-mongo
Nosql redis-mongoNosql redis-mongo
Nosql redis-mongo
 
Remote monitoring system
Remote monitoring systemRemote monitoring system
Remote monitoring system
 
FFMPEG TOOLS
FFMPEG TOOLSFFMPEG TOOLS
FFMPEG TOOLS
 

Ähnlich wie FFMPEG on android

Happy porting x86 application to android
Happy porting x86 application to androidHappy porting x86 application to android
Happy porting x86 application to androidOwen Hsu
 
Android OS Porting: Introduction
Android OS Porting: IntroductionAndroid OS Porting: Introduction
Android OS Porting: IntroductionJollen Chen
 
D1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FFD1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FFAnthony 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 devicesFelipe 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 2013Opersys 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 EmulatorSamael Wang
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadAndrewWright224
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220AndrewWright224
 
Lecture02web 140phpapp01
Lecture02web 140phpapp01Lecture02web 140phpapp01
Lecture02web 140phpapp01letuan9999
 
OpenCV 2.2.0 for Android
OpenCV 2.2.0 for AndroidOpenCV 2.2.0 for Android
OpenCV 2.2.0 for AndroidPicker 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 AndroidVlatko Kosturjak
 

Ähnlich wie FFMPEG on android (20)

Android in ubuntu
Android in ubuntuAndroid in ubuntu
Android in ubuntu
 
Happy porting x86 application to android
Happy porting x86 application to androidHappy porting x86 application to android
Happy porting x86 application to android
 
Android OS Porting: Introduction
Android OS Porting: IntroductionAndroid OS Porting: Introduction
Android OS Porting: Introduction
 
D1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FFD1T3-Anto-Joseph-Droid-FF
D1T3-Anto-Joseph-Droid-FF
 
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
 
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
 
Building aosp
Building aospBuilding aosp
Building aosp
 
Build Android OS on OSX
Build Android OS on OSXBuild Android OS on OSX
Build Android OS on OSX
 
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...
 
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?
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android Emulator
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPad
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220
 
Lecture02web 140phpapp01
Lecture02web 140phpapp01Lecture02web 140phpapp01
Lecture02web 140phpapp01
 
Hacking Android OS
Hacking Android OSHacking Android OS
Hacking Android OS
 
Touch your NetBSD
Touch your NetBSDTouch your NetBSD
Touch your NetBSD
 
NetBSD workshop
NetBSD workshopNetBSD workshop
NetBSD workshop
 
OpenCV 2.2.0 for Android
OpenCV 2.2.0 for AndroidOpenCV 2.2.0 for Android
OpenCV 2.2.0 for Android
 
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
 
Lab manual
Lab manualLab manual
Lab manual
 

Mehr von 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 platformsYoss 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 viewYoss Cohen
 
Dspip deep learning syllabus
Dspip deep learning syllabusDspip deep learning syllabus
Dspip deep learning syllabusYoss Cohen
 
IoT consideration selection
IoT consideration selectionIoT consideration selection
IoT consideration selectionYoss Cohen
 
Nvidia jetson nano bringup
Nvidia jetson nano bringupNvidia jetson nano bringup
Nvidia jetson nano bringupYoss Cohen
 
Autonomous car teleportation architecture
Autonomous car teleportation architectureAutonomous car teleportation architecture
Autonomous car teleportation architectureYoss Cohen
 
Motion estimation overview
Motion estimation overviewMotion estimation overview
Motion estimation overviewYoss Cohen
 
Computer Vision - Image Filters
Computer Vision - Image FiltersComputer Vision - Image Filters
Computer Vision - Image FiltersYoss 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 learnYoss Cohen
 
DASH and HTTP2.0
DASH and HTTP2.0DASH and HTTP2.0
DASH and HTTP2.0Yoss Cohen
 
HEVC Definitions and high-level syntax
HEVC Definitions and high-level syntaxHEVC Definitions and high-level syntax
HEVC Definitions and high-level syntaxYoss Cohen
 
Introduction to HEVC
Introduction to HEVCIntroduction to HEVC
Introduction to HEVCYoss 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 testingYoss Cohen
 
HEVC / H265 Hands-On course
HEVC / H265 Hands-On courseHEVC / H265 Hands-On course
HEVC / H265 Hands-On courseYoss Cohen
 
Web video standards
Web video standardsWeb video standards
Web video standardsYoss Cohen
 
Product wise computer vision development
Product wise computer vision developmentProduct wise computer vision development
Product wise computer vision developmentYoss Cohen
 
3D Video Programming for Android
3D Video Programming for Android3D Video Programming for Android
3D Video Programming for AndroidYoss Cohen
 

Mehr von Yoss Cohen (20)

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
 
open platform for swarm training
open platform for swarm training open platform for swarm training
open platform for swarm training
 
Deep Learning - system view
Deep Learning - system viewDeep Learning - system view
Deep Learning - system view
 
Dspip deep learning syllabus
Dspip deep learning syllabusDspip deep learning syllabus
Dspip deep learning syllabus
 
IoT consideration selection
IoT consideration selectionIoT consideration selection
IoT consideration selection
 
IoT evolution
IoT evolutionIoT evolution
IoT evolution
 
Nvidia jetson nano bringup
Nvidia jetson nano bringupNvidia jetson nano bringup
Nvidia jetson nano bringup
 
Autonomous car teleportation architecture
Autonomous car teleportation architectureAutonomous car teleportation architecture
Autonomous car teleportation architecture
 
Motion estimation overview
Motion estimation overviewMotion estimation overview
Motion estimation overview
 
Computer Vision - Image Filters
Computer Vision - Image FiltersComputer Vision - Image Filters
Computer Vision - Image Filters
 
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
 
DASH and HTTP2.0
DASH and HTTP2.0DASH and HTTP2.0
DASH and HTTP2.0
 
HEVC Definitions and high-level syntax
HEVC Definitions and high-level syntaxHEVC Definitions and high-level syntax
HEVC Definitions and high-level syntax
 
Introduction to HEVC
Introduction to HEVCIntroduction to HEVC
Introduction to HEVC
 
Hands-on Video Course - "RAW Video"
Hands-on Video Course - "RAW Video" Hands-on Video Course - "RAW Video"
Hands-on Video Course - "RAW Video"
 
Video quality testing
Video quality testingVideo quality testing
Video quality testing
 
HEVC / H265 Hands-On course
HEVC / H265 Hands-On courseHEVC / H265 Hands-On course
HEVC / H265 Hands-On course
 
Web video standards
Web video standardsWeb video standards
Web video standards
 
Product wise computer vision development
Product wise computer vision developmentProduct wise computer vision development
Product wise computer vision development
 
3D Video Programming for Android
3D Video Programming for Android3D Video Programming for Android
3D Video Programming for Android
 

Kürzlich hochgeladen

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

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 yossicohen19@gmail.comyossicohen19@gmail.com http://www.mobilevideotech.com  +972-545-313092+972-545-313092