
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (26)
-
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)
Sur d’autres sites (3996)
-
Compress video FFMPEG doesn't work
30 juillet 2015, par Douglas AnunciaçãoI’m trying to compress video using FFMPEG and this library : https://github.com/guardianproject/android-ffmpeg-java
I imported ffmpeglib as a module in my project. This is the code is use to compress :
public class MainActivity extends Activity {
private ArrayList<Object> listVideoPaths = new ArrayList<>();<br />
<br />
@Override<br />
protected void onCreate(Bundle savedInstanceState) {<br />
super.onCreate(savedInstanceState);<br />
setContentView(R.layout.activity_main);<br />
<br />
getGalleryVideos();<br />
<br />
File videoFolderFile = new File("/storage/emulated/0/DCIM/Camera/");<br />
<br />
if(videoFolderFile.exists())<br />
Log.e("TEST FFMPEG", "video folder exist");<br />
else<br />
Log.e("TEST FFMPEG", "video folder DON'T exist");<br />
<br />
<br />
File videoInputFile = new File(listVideoPaths.get(0).toString());<br />
<br />
if(videoInputFile.exists())<br />
Log.e("TEST FFMPEG", "video input file exist");<br />
else<br />
Log.e("TEST FFMPEG", "video input file DON'T exist");<br />
<br />
File videoOutputFile = new File(videoFolderFile,"output.mp4");<br />
<br />
if(videoOutputFile.exists())<br />
Log.e("TEST FFMPEG", "video output file exist");<br />
else<br />
Log.e("TEST FFMPEG", "video output file DON'T exist");<br />
<br />
FfmpegController ffmpegController;<br />
<br />
try {<br />
ffmpegController = new FfmpegController(this,videoFolderFile);<br />
<br />
Clip mediaIn = new Clip();<br />
<br />
mediaIn.path = videoInputFile.getAbsolutePath();<br />
<br />
mediaIn.videoFps = "25";<br />
<br />
ffmpegController.convertToMPEG(mediaIn, videoOutputFile.getAbsolutePath(), new ShellUtils.ShellCallback() {<br />
<br />
@Override<br />
public void shellOut(String shellLine) {<br />
Log.e("TEST FFMPEG", "shellOut - " + shellLine);<br />
}<br />
<br />
@Override<br />
public void processComplete(int exitValue) {<br />
Log.e("TEST FFMPEG", "proccess complete - " + exitValue);<br />
}<br />
});<br />
<br />
<br />
} catch (IOException e) {<br />
e.printStackTrace();<br />
} catch (Exception e) {<br />
e.printStackTrace();<br />
}finally {<br />
<br />
if(videoOutputFile.exists())<br />
Log.e("TEST FFMPEG", "finished ffmpeg ---> video output file exist");<br />
else<br />
Log.e("TEST FFMPEG", "finished ffmpeg ---> video output file DON'T exist");<br />
<br />
}<br />
}<br />
<br />
private void getGalleryVideos(){<br />
<br />
Cursor videoCursor = null;<br />
<br />
try {<br />
<br />
final String[] columns = { Media.DATA,<br />
Media._ID,<br />
Media.DATE_ADDED };<br />
<br />
final String orderBy = Media.DATE_ADDED;<br />
<br />
videoCursor = getContentResolver().query(<br />
MediaStore.Video.Media.EXTERNAL_CONTENT_URI, columns,<br />
null, null, orderBy);<br />
<br />
if (videoCursor != null &amp;&amp; videoCursor.getCount() > 0) {<br />
<br />
while (videoCursor.moveToNext()) {<br />
<br />
int dataColumnIndex = videoCursor<br />
.getColumnIndex(Media.DATA);<br />
<br />
listVideoPaths.add(videoCursor<br />
.getString(dataColumnIndex));<br />
<br />
}<br />
<br />
}<br />
<br />
Collections.sort(listVideoPaths,new Comparator());<br />
<br />
} catch (Exception e) {<br />
<br />
e.printStackTrace();<br />
<br />
} finally {<br />
<br />
if (videoCursor != null) {<br />
<br />
if (!videoCursor.isClosed()) {<br />
<br />
videoCursor.close();<br />
<br />
}<br />
<br />
}<br />
<br />
}<br />
<br />
}<br />
<br />
}<br />
</code></pre><br />
<br />
<p>I get no error but the video doesn't play. The log file is:</p><br />
<br />
<blockquote><br />
<p>3096-3096/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
video folder exist 07-30 14:31:57.389<br><br />
3096-3096/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
video input file exist 07-30 14:31:57.389<br><br />
3096-3096/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
video output file DON'T exist 07-30 14:31:58.363<br><br />
3096-3096/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut -<br />
/data/data/douglasanunciacao.androidffmpegjavateste/app_bin/ffmpeg -y<br />
-i /storage/emulated/0/DCIM/Camera/VID_20150730_142330563.mp4 -f mpeg /storage/emulated/0/DCIM/Camera/output.mp4 07-30 14:31:58.385<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - WARNING: linker:<br />
/data/data/douglasanunciacao.androidffmpegjavateste/app_bin/ffmpeg has<br />
text relocations. This is wasting memory and prevents security<br />
hardening. Please fix. 07-30 14:31:58.390<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg<br />
developers 07-30 14:31:58.391<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - built on Dec 22 2014 12:52:34 with gcc 4.6 20120106<br />
(prerelease) 07-30 14:31:58.391<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - configuration: --arch=arm --cpu=cortex-a8<br />
--target-os=linux --enable-runtime-cpudetect --prefix=/data/data/info.guardianproject.ffmpeg/app_opt --enable-pic --disable-shared --enable-static --cross-prefix=/home/n8fr8/dev/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-<br />
--sysroot=/home/n8fr8/dev/android/ndk/platforms/android-16/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon -fPIE -pie' --extra-ldflags='-L../x264 -fPIE -pie' --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib 07-30 14:31:58.391<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - libavutil 51. 54.100 / 51. 54.100 07-30 14:31:58.391<br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - libavcodec 54. 23.100 / 54. 23.100 07-30 14:31:58.391<br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - libavformat 54. 6.100 / 54. 6.100 07-30 14:31:58.391<br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - libavdevice 54. 0.100 / 54. 0.100 07-30 14:31:58.391<br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - libavfilter 2. 77.100 / 2. 77.100 07-30 14:31:58.391<br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - libswscale 2. 1.100 / 2. 1.100 07-30 14:31:58.391<br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - libswresample 0. 15.100 / 0. 15.100 07-30 14:31:58.391<br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - libpostproc 52. 0.100 / 52. 0.100 07-30 14:31:58.868<br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - Input #0, mov,mp4,m4a,3gp,3g2,mj2, from<br />
'/storage/emulated/0/DCIM/Camera/VID_20150730_142330563.mp4': 07-30<br />
14:31:58.869 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - Metadata: 07-30 14:31:58.869<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - major_brand : mp42 07-30 14:31:58.870<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - minor_version : 0 07-30 14:31:58.871<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - compatible_brands: isommp42 07-30 14:31:58.872<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - creation_time : 2015-07-30 17:23:34 07-30<br />
14:31:58.873 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - Duration: 00:00:01.89, start: 0.000000,<br />
bitrate: 17571 kb/s 07-30 14:31:58.874<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - Stream #0:0(eng): Video: h264 (High) (avc1 /<br />
0x31637661), yuv420p, 1920x1080, 15874 kb/s, SAR 65536:65536 DAR 16:9,<br />
23.90 fps, 23.92 tbr, 90k tbn, 180k tbc 07-30 14:31:58.875 3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - Metadata: 07-30 14:31:58.876<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - rotate : 270 07-30 14:31:58.877<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - creation_time : 2015-07-30 17:23:34 07-30<br />
14:31:58.878 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - handler_name : VideoHandle 07-30<br />
14:31:58.878 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - Stream #0:1(eng): Audio: aac (mp4a /<br />
0x6134706D), 48000 Hz, stereo, s16, 127 kb/s 07-30 14:31:58.878<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - Metadata: 07-30 14:31:58.878<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - creation_time : 2015-07-30 17:23:34 07-30<br />
14:31:58.878 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - handler_name : SoundHandle 07-30<br />
14:31:58.882 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - [buffer @ 0xb5cce0a0] w:1920 h:1080<br />
pixfmt:yuv420p tb:1/90000 sar:65536/65536 sws_param:flags=2 07-30<br />
14:31:58.882 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - [buffersink @ 0xb5cce0d0] No opaque field<br />
provided 07-30 14:31:58.891<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - [mpeg @ 0xb5c3df00] VBV buffer size not set, muxing may<br />
fail 07-30 14:31:58.892<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - Output #0, mpeg, to<br />
'/storage/emulated/0/DCIM/Camera/output.mp4': 07-30 14:31:58.894<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - Metadata: 07-30 14:31:58.895<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - major_brand : mp42 07-30 14:31:58.896<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - minor_version : 0 07-30 14:31:58.896<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - compatible_brands: isommp42 07-30 14:31:58.897<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - creation_time : 2015-07-30 17:23:34 07-30<br />
14:31:58.898 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - encoder : Lavf54.6.100 07-30<br />
14:31:58.898 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - Stream #0:0(eng): Video: mpeg1video,<br />
yuv420p, 1920x1080 [SAR 65536:65536 DAR 16:9], q=2-31, 200 kb/s, 90k<br />
tbn, 23.98 tbc 07-30 14:31:58.899<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - Metadata: 07-30 14:31:58.899<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - rotate : 270 07-30 14:31:58.900<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - creation_time : 2015-07-30 17:23:34 07-30<br />
14:31:58.901 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - handler_name : VideoHandle 07-30<br />
14:31:58.906 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - Stream #0:1(eng): Audio: mp2, 48000 Hz,<br />
stereo, s16, 128 kb/s 07-30 14:31:58.906<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - Metadata: 07-30 14:31:58.906<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - creation_time : 2015-07-30 17:23:34 07-30<br />
14:31:58.906 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - handler_name : SoundHandle 07-30<br />
14:31:58.906 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - Stream mapping: 07-30 14:31:58.906<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - Stream #0:0 -> #0:0 (h264 -> mpeg1video) 07-30<br />
14:31:58.906 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - Stream #0:1 -> #0:1 (aac -> mp2) 07-30<br />
14:31:58.906 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - Press [q] to stop, [?] for help 07-30<br />
14:31:59.824 3096-3182/douglasanunciacao.androidffmpegjavateste<br />
E/TESTE FFMPEG﹕ shellOut - frame= 4 fps=0.0 q=2.0 size= 0kB<br />
time=00:00:00.08 bitrate= 0.0kbits/s 07-30 14:32:02.029<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - frame= 8 fps=2.7 q=10.5 size= 4kB time=00:00:00.25<br />
bitrate= 130.9kbits/s 07-30 14:32:02.536<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - frame= 13 fps=3.7 q=25.2 size= 696kB time=00:00:00.45<br />
bitrate=12427.3kbits/s 07-30 14:32:03.045<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - frame= 18 fps=4.4 q=31.0 size= 750kB time=00:00:00.66<br />
bitrate=9206.8kbits/s 07-30 14:32:03.582<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - frame= 23 fps=5.0 q=31.0 size= 786kB time=00:00:00.87<br />
bitrate=7351.4kbits/s 07-30 14:32:04.140<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - frame= 28 fps=5.5 q=31.0 size= 862kB time=00:00:01.08<br />
bitrate=6511.8kbits/s 07-30 14:32:05.239<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - frame= 30 fps=4.8 q=31.0 size= 876kB time=00:00:01.16<br />
bitrate=6144.9kbits/s 07-30 14:32:05.746<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - frame= 35 fps=5.2 q=31.0 size= 910kB time=00:00:01.37<br />
bitrate=5416.2kbits/s 07-30 14:32:06.317<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - frame= 41 fps=5.6 q=31.0 size= 972kB time=00:00:01.62<br />
bitrate=4895.2kbits/s 07-30 14:32:06.832<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - frame= 45 fps=5.7 q=31.0 Lsize= 1022kB<br />
time=00:00:01.83 bitrate=4562.1kbits/s 07-30 14:32:06.832<br><br />
3096-3182/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
shellOut - video:984kB audio:30kB global headers:0kB muxing overhead<br />
0.756932% 07-30 14:32:06.858 3096-3096/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
proccess complete - 0 07-30 14:32:06.858<br><br />
3096-3096/douglasanunciacao.androidffmpegjavateste E/TESTE FFMPEG﹕<br />
terminou o ffmpeg ---> video output file exist</p><br />
</blockquote><br />
<br />
<p>Does anyone knows how to solve this problem? Thanks in advance.</p> -
Android FFMPEG java concat multiple files
17 juillet 2015, par Kim TI’m using a fork of the cordova-plugin-video-editor library :
https://github.com/jbavari/cordova-plugin-video-editor/pull/13
Which uses the android-ffmpeg-java library here :
https://github.com/guardianproject/android-ffmpeg-java
The out of box cordova plugin example works well to encode a single video using the following code :
File tempFile = File.createTempFile("ffmpeg", null, appContext.getCacheDir());
FfmpegController ffmpegController = new FfmpegController(appContext, tempFile);
TranscodeCallback tcCallback = new TranscodeCallback();
Clip clipIn = new Clip(videoSrcPath);
Clip clipOut = new Clip(outputFilePath);
clipOut.videoCodec = "libx264";
clipOut.videoFps = "24"; // tailor this to your needs
clipOut.videoBitrate = 512; // 512 kbps - tailor this to your needs
clipOut.audioChannels = 1;
clipOut.width = outputWidth;
clipOut.height = outputHeight;
clipOut.duration = videoDuration;
ffmpegController.processVideo(clipIn, clipOut, true, tcCallback);This calls the android-ffmpeg-java code here :
They have a multiple file concat test example here :
So I have modified the cordova plugin code to match the example :
ArrayList<clip> listVideos = new ArrayList<clip>();
Clip clip = new Clip();
clip.path = new File(videoSrcPath).getCanonicalPath();
ffmpegController.getInfo(clip);
clip.duration = 5;
listVideos.add(clip);
Clip clip2 = new Clip();
clip2.path = new File(videoSrcPath2).getCanonicalPath();
ffmpegController.getInfo(clip2);
clip2.duration = 5;
listVideos.add(clip2);
Clip clipOut = new Clip();
clipOut.path = new File(outputFilePath).getCanonicalPath();
ffmpegController.concatAndTrimFilesMP4Stream(listVideos, clipOut, false, false, new ShellUtils.ShellCallback() {
@Override
public void shellOut(String shellLine) {
System.out.println("fc>" + shellLine);
}
@Override
public void processComplete(int exitValue) {
if (exitValue < 0)
System.err.println("concat non-zero exit: " + exitValue);
}
});
</clip></clip>However when run I get the error :
23:15:08.498 3218-3293/com.example.hello D/VideoEditor﹕ execute method starting
07-10 23:15:08.498 3218-3293/com.example.hello D/VideoEditor﹕ transcodeVideo firing
07-10 23:15:08.499 3218-3293/com.example.hello D/VideoEditor﹕ options: {"fileUri":"content:\/\/com.android.providers.media.documents\/document\/video%3A23389","fileUri2":"content:\/\/com.android.providers.media.documents\/document\/video%3A23390","outputFileName":"1436584506888","quality":2,"outputFileType":1,"optimizeForNetworkUse":1,"duration":2}
07-10 23:15:08.615 3218-3293/com.example.hello D/VideoEditor﹕ videoSrcPath: /storage/emulated/0/Movies/-a.mp4
07-10 23:15:08.615 3218-3293/com.example.hello D/VideoEditor﹕ videoSrcPath2: /storage/emulated/0/Movies/-b.mp4
07-10 23:15:08.618 3218-3293/com.example.hello V/VideoEditor﹕ outputFilePath: /storage/emulated/0/Movies/HelloWorld/VID_1436584506888.mp4
07-10 23:15:08.618 3218-3293/com.example.hello W/PluginManager﹕ THREAD WARNING: exec() call to VideoEditor.transcodeVideo blocked the main thread for 121ms. Plugin should use CordovaInterface.getThreadPool().
07-10 23:15:09.126 3742-3742/? W/linker﹕ /data/data/com.example.hello/app_bin/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
07-10 23:15:09.506 3750-3750/? W/linker﹕ /data/data/com.example.hello/app_bin/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
07-10 23:15:09.836 3218-3264/com.example.hello I/System.out﹕ fc>/data/data/com.example.hello/app_bin/ffmpeg -y -t 0 0 : 0 0 : 5.000000 -i /storage/emulated/0/Movies/-a.mp4 -f mpegts -c copy -an -bsf:v h264_mp4toannexb /storage/emulated/0/Android/data/com.example.hello/cache/ffmpeg-246029513.tmp/0.ts
07-10 23:15:09.864 3758-3758/? W/linker﹕ /data/data/com.example.hello/app_bin/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
07-10 23:15:09.865 3218-3759/com.example.hello I/System.out﹕ fc>WARNING: linker: /data/data/com.example.hello/app_bin/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
07-10 23:15:09.869 3218-3759/com.example.hello I/System.out﹕ fc>ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
07-10 23:15:09.870 3218-3759/com.example.hello I/System.out﹕ fc> built on Dec 22 2014 12:52:34 with gcc 4.6 20120106 (prerelease)
07-10 23:15:09.870 3218-3759/com.example.hello I/System.out﹕ fc> configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/info.guardianproject.ffmpeg/app_opt --enable-pic --disable-shared --enable-static --cross-prefix=/home/n8fr8/dev/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --sysroot=/home/n8fr8/dev/android/ndk/platforms/android-16/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon -fPIE -pie' --extra-ldflags='-L../x264 -fPIE -pie' --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib
07-10 23:15:09.870 3218-3759/com.example.hello I/System.out﹕ fc> libavutil 51. 54.100 / 51. 54.100
07-10 23:15:09.870 3218-3759/com.example.hello I/System.out﹕ fc> libavcodec 54. 23.100 / 54. 23.100
07-10 23:15:09.870 3218-3759/com.example.hello I/System.out﹕ fc> libavformat 54. 6.100 / 54. 6.100
07-10 23:15:09.870 3218-3759/com.example.hello I/System.out﹕ fc> libavdevice 54. 0.100 / 54. 0.100
07-10 23:15:09.870 3218-3759/com.example.hello I/System.out﹕ fc> libavfilter 2. 77.100 / 2. 77.100
07-10 23:15:09.870 3218-3759/com.example.hello I/System.out﹕ fc> libswscale 2. 1.100 / 2. 1.100
07-10 23:15:09.870 3218-3759/com.example.hello I/System.out﹕ fc> libswresample 0. 15.100 / 0. 15.100
07-10 23:15:09.870 3218-3759/com.example.hello I/System.out﹕ fc> libpostproc 52. 0.100 / 52. 0.100
07-10 23:15:09.870 3218-3759/com.example.hello I/System.out﹕ fc>[NULL @ 0xb6421100] Unable to find a suitable output format for '0'
07-10 23:15:09.870 3218-3759/com.example.hello I/System.out﹕ fc>0: Invalid argument
07-10 23:15:09.891 3218-3264/com.example.hello I/System.out﹕ fc>/data/data/com.example.hello/app_bin/ffmpeg -y -t 0 0 : 0 0 : 5.000000 -i /storage/emulated/0/Movies/-b.mp4 -f mpegts -c copy -an -bsf:v h264_mp4toannexb /storage/emulated/0/Android/data/com.example.hello/cache/ffmpeg-246029513.tmp/1.ts
07-10 23:15:09.912 3762-3762/? W/linker﹕ /data/data/com.example.hello/app_bin/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
07-10 23:15:09.913 3218-3763/com.example.hello I/System.out﹕ fc>WARNING: linker: /data/data/com.example.hello/app_bin/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
07-10 23:15:09.917 3218-3763/com.example.hello I/System.out﹕ fc>ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
07-10 23:15:09.917 3218-3763/com.example.hello I/System.out﹕ fc> built on Dec 22 2014 12:52:34 with gcc 4.6 20120106 (prerelease)
07-10 23:15:09.918 3218-3763/com.example.hello I/System.out﹕ fc> configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/info.guardianproject.ffmpeg/app_opt --enable-pic --disable-shared --enable-static --cross-prefix=/home/n8fr8/dev/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --sysroot=/home/n8fr8/dev/android/ndk/platforms/android-16/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon -fPIE -pie' --extra-ldflags='-L../x264 -fPIE -pie' --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib
07-10 23:15:09.918 3218-3763/com.example.hello I/System.out﹕ fc> libavutil 51. 54.100 / 51. 54.100
07-10 23:15:09.918 3218-3763/com.example.hello I/System.out﹕ fc> libavcodec 54. 23.100 / 54. 23.100
07-10 23:15:09.918 3218-3763/com.example.hello I/System.out﹕ fc> libavformat 54. 6.100 / 54. 6.100
07-10 23:15:09.918 3218-3763/com.example.hello I/System.out﹕ fc> libavdevice 54. 0.100 / 54. 0.100
07-10 23:15:09.918 3218-3763/com.example.hello I/System.out﹕ fc> libavfilter 2. 77.100 / 2. 77.100
07-10 23:15:09.918 3218-3763/com.example.hello I/System.out﹕ fc> libswscale 2. 1.100 / 2. 1.100
07-10 23:15:09.918 3218-3763/com.example.hello I/System.out﹕ fc> libswresample 0. 15.100 / 0. 15.100
07-10 23:15:09.918 3218-3763/com.example.hello I/System.out﹕ fc> libpostproc 52. 0.100 / 52. 0.100
07-10 23:15:09.918 3218-3763/com.example.hello I/System.out﹕ fc>[NULL @ 0xb6321100] Unable to find a suitable output format for '0'
07-10 23:15:09.918 3218-3763/com.example.hello I/System.out﹕ fc>0: Invalid argument
07-10 23:15:09.940 3218-3264/com.example.hello I/System.out﹕ fc>/data/data/com.example.hello/app_bin/ffmpeg -y -i concat:/storage/emulated/0/Android/data/com.example.hello/cache/ffmpeg-246029513.tmp/0.ts|/storage/emulated/0/Android/data/com.example.hello/cache/ffmpeg-246029513.tmp/1.ts -c copy -an /storage/emulated/0/Movies/HelloWorld/VID_1436584506888.mp4
07-10 23:15:09.963 3766-3766/? W/linker﹕ /data/data/com.example.hello/app_bin/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
07-10 23:15:09.964 3218-3767/com.example.hello I/System.out﹕ fc>WARNING: linker: /data/data/com.example.hello/app_bin/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
07-10 23:15:09.971 3218-3767/com.example.hello I/System.out﹕ fc>ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
07-10 23:15:09.972 3218-3767/com.example.hello I/System.out﹕ fc> built on Dec 22 2014 12:52:34 with gcc 4.6 20120106 (prerelease)
07-10 23:15:09.972 3218-3767/com.example.hello I/System.out﹕ fc> configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --prefix=/data/data/info.guardianproject.ffmpeg/app_opt --enable-pic --disable-shared --enable-static --cross-prefix=/home/n8fr8/dev/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --sysroot=/home/n8fr8/dev/android/ndk/platforms/android-16/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon -fPIE -pie' --extra-ldflags='-L../x264 -fPIE -pie' --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib
07-10 23:15:09.973 3218-3767/com.example.hello I/System.out﹕ fc> libavutil 51. 54.100 / 51. 54.100
07-10 23:15:09.973 3218-3767/com.example.hello I/System.out﹕ fc> libavcodec 54. 23.100 / 54. 23.100
07-10 23:15:09.974 3218-3767/com.example.hello I/System.out﹕ fc> libavformat 54. 6.100 / 54. 6.100
07-10 23:15:09.974 3218-3767/com.example.hello I/System.out﹕ fc> libavdevice 54. 0.100 / 54. 0.100
07-10 23:15:09.974 3218-3767/com.example.hello I/System.out﹕ fc> libavfilter 2. 77.100 / 2. 77.100
07-10 23:15:09.975 3218-3767/com.example.hello I/System.out﹕ fc> libswscale 2. 1.100 / 2. 1.100
07-10 23:15:09.976 3218-3767/com.example.hello I/System.out﹕ fc> libswresample 0. 15.100 / 0. 15.100
07-10 23:15:09.976 3218-3767/com.example.hello I/System.out﹕ fc> libpostproc 52. 0.100 / 52. 0.100
07-10 23:15:09.976 3218-3767/com.example.hello I/System.out﹕ fc>concat:/storage/emulated/0/Android/data/com.example.hello/cache/ffmpeg-246029513.tmp/0.ts|/storage/emulated/0/Android/data/com.example.hello/cache/ffmpeg-246029513.tmp/1.ts: Not a directory
07-10 23:15:09.981 3218-3264/com.example.hello D/VideoEditor﹕ transcode exception
java.lang.Exception: There was a problem rendering the video: /storage/emulated/0/Movies/HelloWorld/VID_1436584506888.mp4
at org.ffmpeg.android.FfmpegController.concatAndTrimFilesMP4Stream(FfmpegController.java:1272)
at org.apache.cordova.videoeditor.VideoEditor$1.run(VideoEditor.java:257)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)I’m not sure why it says ’Not a directory’ ? Surely it’s valid because the files are created at the previous step ?
-
Build latest version of FFMPEG with libx264 Android
12 novembre 2016, par Biraj ZalavadiaI was able to Build FFMPEG with libx264 Android successfully and was working well before 2 months.
I uses halfninja for building.
Today I take latest source of ffmpeg and libX264 from here.
git clone git://git.videolan.org/x264.git
git clone git://git.videolan.org/ffmpeg.gitAnd try to rebuild whole project. But now it throws following errors.
ffmpeg.c:2406: error: undefined reference to 'hwaccels'
ffmpeg.c:3390: error: undefined reference to 'qp_hist'
ffmpeg.c:3390: error: undefined reference to 'do_hex_dump'
ffmpeg.c:3390: error: undefined reference to 'do_pkt_dump'
ffmpeg.c:576: error: undefined reference to 'do_benchmark_all'
ffmpeg.c:657: error: undefined reference to 'audio_sync_method'
ffmpeg.c:1222: error: undefined reference to 'vstats_filename'
ffmpeg.c:972: error: undefined reference to 'frame_drop_threshold'
ffmpeg.c:1181: error: undefined reference to 'debug_ts'
ffmpeg.c:2742: error: undefined reference to 'copy_tb'
ffmpeg.c:2846: error: undefined reference to 'audio_volume'
ffmpeg.c:2862: error: undefined reference to 'init_simple_filtergraph'
ffmpeg.c:2863: error: undefined reference to 'configure_filtergraph'
ffmpeg.c:2923: error: undefined reference to 'video_sync_method'
ffmpeg.c:2538: error: undefined reference to 'frame_bits_per_raw_sample'
ffmpeg.c:3258: error: undefined reference to 'sdp_filename'
ffmpeg.c:2087: error: undefined reference to 'ist_in_filtergraph'
ffmpeg.c:4069: error: undefined reference to 'ffmpeg_parse_options'
ffmpeg.c:4074: error: undefined reference to 'show_usage'
ffmpeg.c:3303: error: undefined reference to 'options'
ffmpeg.c:3303: error: undefined reference to 'stdin_interaction'
ffmpeg.c:2553: error: undefined reference to 'exit_on_error'
ffmpeg.c:2553: error: undefined reference to 'do_pkt_dump'
ffmpeg.c:2553: error: undefined reference to 'do_hex_dump'
ffmpeg.c:3727: error: undefined reference to 'copy_ts'
ffmpeg.c:3727: error: undefined reference to 'dts_delta_threshold'
ffmpeg.c:268: error: undefined reference to 'dts_error_threshold'
ffmpeg.c:3976: error: undefined reference to 'print_stats'
ffmpeg.c:1694: error: undefined reference to 'do_benchmark'
ffmpeg.c:1694: error: undefined reference to 'max_error_rate'Please help me out to resolve this.
Please look at my script.
build_android.sh
#!/bin/bash
#
# build_android.sh
# Copyright (c) 2012 Jacek Marchwicki
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
export NDK=/home/tasol/DEVELOPMENT/IJOOMER_DEVELOPMENT/NDK/android-ndk-r10d
if [ "$NDK" = "" ]; then
echo NDK variable not set, exiting
echo "Use: export NDK=/your/path/to/android-ndk"
exit 1
fi
OS=`uname -s | tr '[A-Z]' '[a-z]'`
function build_x264
{
PLATFORM=$NDK/platforms/$PLATFORM_VERSION/arch-$ARCH/
export PATH=${PATH}:$PREBUILT/bin/
CROSS_COMPILE=$PREBUILT/bin/$EABIARCH-
CFLAGS=$OPTIMIZE_CFLAGS
#CFLAGS=" -I$ARM_INC -fpic -DANDROID -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wa,--noexecstack -MMD -MP "
export CPPFLAGS="$CFLAGS"
export CFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS"
export CXX="${CROSS_COMPILE}g++ --sysroot=$PLATFORM"
export AS="${CROSS_COMPILE}gcc --sysroot=$PLATFORM"
export CC="${CROSS_COMPILE}gcc --sysroot=$PLATFORM"
export NM="${CROSS_COMPILE}nm"
export STRIP="${CROSS_COMPILE}strip"
export RANLIB="${CROSS_COMPILE}ranlib"
export AR="${CROSS_COMPILE}ar"
#export LDFLAGS="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog"
cd x264
./configure --disable-asm --prefix=$(pwd)/$PREFIX --host=$ARCH-linux --enable-static $ADDITIONAL_CONFIGURE_FLAG || exit 1
make clean || exit 1
make -j4 install || exit 1
cd ..
}
function build_ffmpeg
{
PLATFORM=$NDK/platforms/$PLATFORM_VERSION/arch-$ARCH/
CC=$PREBUILT/bin/$EABIARCH-gcc
CROSS_PREFIX=$PREBUILT/bin/$EABIARCH-
PKG_CONFIG=${CROSS_PREFIX}pkg-config
if [ ! -f $PKG_CONFIG ];
then
cat > $PKG_CONFIG << EOF
#!/bin/bash
pkg-config \$*
EOF
chmod u+x $PKG_CONFIG
fi
NM=$PREBUILT/bin/$EABIARCH-nm
cd ffmpeg
export PKG_CONFIG_LIBDIR=$(pwd)/$PREFIX/lib/pkgconfig/
export PKG_CONFIG_PATH=$(pwd)/$PREFIX/lib/pkgconfig/
./configure --target-os=linux \
--prefix=$PREFIX \
--enable-cross-compile \
--extra-libs="-lgcc" \
--arch=$ARCH \
--cc=$CC \
--cross-prefix=$CROSS_PREFIX \
--nm=$NM \
--sysroot=$PLATFORM \
--extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " \
--disable-shared \
--disable-stripping \
--enable-static \
--enable-runtime-cpudetect \
--extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog -L$PREFIX/lib" \
--extra-cflags="-I$PREFIX/include" \
--enable-gpl \
--enable-encoder=libx264 \
--enable-libx264 \
--enable-parser=mjpeg \
--enable-demuxer=image2 \
--enable-hwaccel=h264_vaapi \
--enable-hwaccel=h264_vaapi \
--enable-hwaccel=h264_dxva2 \
--enable-hwaccel=mpeg4_vaapi \
--enable-demuxer=mov \
--enable-demuxer=h264 \
--enable-demuxer=mpegvideo \
--enable-demuxer=h263 \
--enable-demuxer=mpegps \
--enable-demuxer=mjpeg \
--enable-demuxer=rtsp \
--enable-demuxer=rtp \
--enable-demuxer=hls \
--enable-demuxer=matroska \
--enable-muxer=rtsp \
--enable-muxer=mp4 \
--enable-muxer=mov \
--enable-muxer=mjpeg \
--enable-muxer=matroska \
--enable-protocol=crypto \
--enable-protocol=jni \
--enable-protocol=file \
--disable-network \
--enable-filter=buffer \
--enable-filter=buffersink \
--enable-filter=scale \
--enable-protocol=rtp \
--enable-protocol=tcp \
--enable-protocol=udp \
--enable-protocol=applehttp \
--enable-protocol=hls \
--enable-protocol=http \
--enable-decoder=xsub \
--enable-decoder=jacosub \
--enable-decoder=dvdsub \
--enable-decoder=dvbsub \
--enable-decoder=subviewer \
--enable-decoder=rawvideo \
--enable-encoder=rawvideo \
--enable-decoder=mjpeg \
--enable-encoder=mjpeg \
--enable-decoder=h263 \
--enable-decoder=mpeg4 \
--enable-encoder=mpeg4 \
--enable-decoder=h264 \
--enable-encoder=h264 \
--enable-decoder=aac \
--enable-encoder=aac \
--enable-parser=h264 \
--enable-encoder=mp2 \
--enable-decoder=mp2 \
--enable-encoder=libvo_amrwbenc \
--enable-decoder=amrwb \
--enable-muxer=mp2 \
--enable-bsfs \
--enable-decoders \
--enable-encoders \
--enable-parsers \
--enable-hwaccels \
--enable-muxers \
--enable-avformat \
--enable-avcodec \
--disable-demuxer=v4l \
--disable-demuxer=v4l2 \
--disable-indev=v4l \
--disable-indev=v4l2 \
--disable-ffplay \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--enable-nonfree \
--enable-version3 \
--enable-memalign-hack \
--disable-asm \
$ADDITIONAL_CONFIGURE_FLAG \
|| exit 1
make clean || exit 1
make -j4 install || exit 1
cd ..
}
function build_one {
cd ffmpeg
cd ..
}
#arm v5
EABIARCH=arm-linux-androideabi
ARCH=arm
CPU=armv5
OPTIMIZE_CFLAGS="-marm -march=$CPU"
PREFIX=../ffmpeg-build/armeabi
OUT_LIBRARY=$PREFIX/libffmpeg.so
ADDITIONAL_CONFIGURE_FLAG=
SONAME=libffmpeg.so
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/$OS-x86_64
#PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/$OS-x86
PLATFORM_VERSION=android-5
build_x264
build_ffmpeg
build_one
#arm v7vfpv3
#EABIARCH=arm-linux-androideabi
#ARCH=arm
#CPU=armv7-a
#OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU "
#PREFIX=../ffmpeg-build/armeabi-v7a
#OUT_LIBRARY=$PREFIX/libffmpeg.so
#ADDITIONAL_CONFIGURE_FLAG=
#SONAME=libffmpeg.so
#PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/$OS-x86_64
#PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/$OS-x86
#PLATFORM_VERSION=android-5
#build_x264
#build_ffmpeg
#build_one
#arm v7 + neon (neon also include vfpv3-32)
EABIARCH=arm-linux-androideabi
ARCH=arm
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=neon -marm -march=$CPU -mtune=cortex-a8 -mthumb -D__thumb__ "
PREFIX=../ffmpeg-build/armeabi-v7a
#PREFIX=../ffmpeg-build/armeabi-v7a-neon
OUT_LIBRARY=../ffmpeg-build/armeabi-v7a/libffmpeg-neon.so
ADDITIONAL_CONFIGURE_FLAG=--enable-neon
SONAME=libffmpeg-neon.so
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/$OS-x86_64
#PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/$OS-x86
PLATFORM_VERSION=android-9
build_x264
build_ffmpeg
build_one
#x86
EABIARCH=i686-linux-android
ARCH=x86
OPTIMIZE_CFLAGS="-m32"
PREFIX=../ffmpeg-build/x86
OUT_LIBRARY=$PREFIX/libffmpeg.so
ADDITIONAL_CONFIGURE_FLAG=--disable-asm
SONAME=libffmpeg.so
PREBUILT=$NDK/toolchains/x86-4.8/prebuilt/$OS-x86_64
#PREBUILT=$NDK/toolchains/x86-4.6/prebuilt/$OS-x86
PLATFORM_VERSION=android-9
build_x264
build_ffmpeg
build_one
#mips
EABIARCH=mipsel-linux-android
ARCH=mips
OPTIMIZE_CFLAGS="-EL -march=mips32 -mips32 -mhard-float"
PREFIX=../ffmpeg-build/mips
OUT_LIBRARY=$PREFIX/libffmpeg.so
ADDITIONAL_CONFIGURE_FLAG=""
SONAME=libffmpeg.so
PREBUILT=$NDK/toolchains/mipsel-linux-android-4.8/prebuilt/$OS-x86_64
#PREBUILT=$NDK/toolchains/mipsel-linux-android-4.6/prebuilt/$OS-x86
PLATFORM_VERSION=android-9
build_x264
build_ffmpeg
build_onebuild_all.sh
#!/bin/bash
#
# build_all.sh
export NDK=/home/tasol/DEVELOPMENT/IJOOMER_DEVELOPMENT/NDK/android-ndk-r10d
sudo ./build_android.sh
$NDK/ndk-build
echo "Done Dona Done!!!"Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := videokit
# These need to be in the right order
FFMPEG_LIBS := $(addprefix ffmpeg-build/$(TARGET_ARCH_ABI)/lib/, \
libavdevice.a \
libavformat.a \
libavfilter.a \
libavcodec.a \
libswscale.a \
libavutil.a \
libswresample.a \
libpostproc.a )
# ffmpeg uses its own deprecated functions liberally, so turn off that annoying noise
LOCAL_CFLAGS += -g -Iffmpeg -Ivideokit -Wno-deprecated-declarations
LOCAL_LDLIBS += -llog -lz $(FFMPEG_LIBS) ffmpeg-build/$(TARGET_ARCH_ABI)/lib/libx264.a
LOCAL_SRC_FILES := videokit/uk_co_halfninja_videokit_Videokit.c videokit/ffmpeg.c videokit/cmdutils.c
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := ffmpeg
FFMPEG_LIBS := $(addprefix ffmpeg-build/$(TARGET_ARCH_ABI)/lib/, \
libavdevice.a \
libavformat.a \
libavfilter.a \
libavcodec.a \
libswscale.a \
libavutil.a \
libswresample.a \
libpostproc.a )
LOCAL_CFLAGS += -g -Iffmpeg -Ivideokit -Wno-deprecated-declarations
LOCAL_LDLIBS += -llog -lz $(FFMPEG_LIBS) ffmpeg-build/$(TARGET_ARCH_ABI)/lib/libx264.a
LOCAL_SRC_FILES := ffmpeg/ffmpeg.c ffmpeg/cmdutils.c
include $(BUILD_EXECUTABLE)Application.mk
APP_ABI := armeabi,armeabi-v7a,x86,mips
APP_PLATFORM := android-10
APP_STL := gnustl_staticUPDATE
Finally Got success