
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
Autres articles (33)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (3198)
-
Android plugin with .so lib's (UNITY)
23 mars 2017, par Vladimir IlianovSo i need ffmpeg in android. (for muxing audio and video).
I found this awesome project for android studio (link in the end of a post, in rar as ffmpeg4android_demo_studio2).
I works perfect, does muxing and overall awesome project. So i decided to make plugin for anroid from that project, so i remade project like that : (link in the end of a post, in rar as ffmpeg4android_demo_studio ((p.S. the is no GeneralUtils code because its big, please download rar and open it.))package com.netcompss.ffmpeg4android;
public class CommandValidationException extends Exception {
private static final long serialVersionUID = 1L;
}=============================================
package com.netcompss.ffmpeg4android;
import android.content.Context;
import android.util.Log;
import android.widget.Toast;
public class FFMpeg {
private Context context;
private static FFMpeg instance;
public FFMpeg (){
this.instance = this;
}
public static FFMpeg instance(){
if(instance == null){
instance = new FFMpeg();
}
return instance;
}
public void setContext(Context context){
this.context = context;
}
public void mux(String video,String audio,String out){
//GeneralUtils.checkForPermissionsMAndAbove(currentActivity, true);
LoadJNI vk = new LoadJNI();
try {
String workFolder = context.getFilesDir().getAbsolutePath()+ "/";
String cmd = "ffmpeg -i "+video+" -i "+audio+" -c copy -map 0:v:0 -map 1:a:0 -shortest "+out;
vk.run(GeneralUtils.utilConvertToComplex(cmd) , workFolder , context);
Log.i("test", "ffmpeg4android finished successfully");
} catch (Throwable e) {
Log.e("test", "vk run exception.", e);
}
}
public void showMessage(String message){
Toast.makeText(this.context,message,Toast.LENGTH_SHORT).show();
}
}==================
package com.netcompss.ffmpeg4android ;
import android.app.Activity;
import android.content.Context;
import android.widget.TextView;
import android.os.Bundle;
public class LicenseCheckJNI
{
public int licenseCheck(String path, Context ctx) {
String rcStr = "-100";
rcStr = licenseCheckComplexJNI(path);
int rc =Integer.decode(rcStr);
return rc;
}
public native String licenseCheckComplexJNI(String path);
public native String licenseCheckSimpleJNI(String path);
static {
System.loadLibrary("license-jni");
}
}
package com.netcompss.ffmpeg4android;
import java.io.File;
import android.content.Context;
import android.nfc.Tag;
import android.util.Log;
public final class LoadJNI {
static {
System.loadLibrary("loader-jni");
System.loadLibrary("license-jni");
System.loadLibrary("videokit");
}
/**
*
* @param args ffmpeg command
* @param workFolder working directory
* @param ctx Android context
* @param isValidate apply validation to the command
* @throws CommandValidationException
*/
public void run(String[] args, String workFolder, Context ctx, boolean isValidate) throws CommandValidationException {
Log.i(Prefs.TAG, "running ffmpeg4android_lib: " + Prefs.version);
// delete previous log: this is essential for correct progress calculation
String vkLogPath = workFolder + "vk.log";
GeneralUtils.deleteFileUtil(vkLogPath);
GeneralUtils.printCommand(args);
//printInternalDirStructure(ctx);
if (isValidate) {
if (GeneralUtils.isValidCommand(args)) {
Log.d(Prefs.TAG, "=LOAD================");
load(args, workFolder, getVideokitLibPath(ctx), true);
}
else
throw new CommandValidationException();
}
else {
Log.d(Prefs.TAG, "=LOAD================");
load(args, workFolder, getVideokitLibPath(ctx), true);
}
}
/**
*
* @param args ffmpeg command
* @param workFolder working directory
* @param ctx Android context
* @throws CommandValidationException
*/
public void run(String[] args, String workFolder, Context ctx) throws CommandValidationException {
run(args, workFolder, ctx, true);
}
private static void printInternalDirStructure(Context ctx) {
Log.d(Prefs.TAG, "=printInternalDirStructure=");
Log.d(Prefs.TAG, "==============================");
File file = new File(ctx.getFilesDir().getParent());
analyzeDir(file);
Log.d(Prefs.TAG, "==============================");
}
private static void analyzeDir(File path) {
if (path.isDirectory()) {
Log.d(Prefs.TAG,"Scanning dir: " + path.getAbsolutePath());
File[] files1 = path.listFiles();
for (int i = 0; i < files1.length; i++) {
analyzeDir(files1[i]);
}
Log.d(Prefs.TAG, "==========");
}
else {
Log.d(Prefs.TAG, path.getAbsolutePath());
}
}
private static String getVideokitLibPath(Context ctx) {
//File file = new File(ctx.getFilesDir().getParent() + "/lib/");
//analyzeDir(file);
String videokitLibPath = ctx.getFilesDir().getParent() + "/lib/libvideokit.so";
File file = new File(videokitLibPath);
if(file.exists()) {
Log.i(Prefs.TAG, "videokitLibPath exits");
}
else {
Log.w(Prefs.TAG, "videokitLibPath not exits: " + videokitLibPath);
videokitLibPath = ctx.getFilesDir().getParent() + "/lib/arm64/libvideokit.so";
Log.i(Prefs.TAG, "trying videokitLibPath: " + videokitLibPath);
file = new File(videokitLibPath);
if(file.exists()) {
Log.i(Prefs.TAG, "videokitLibPath exits: " + videokitLibPath);
}
else {
Log.w(Prefs.TAG, "videokitLibPath not exits: " + videokitLibPath);
videokitLibPath = "/data/app/com.examples.ffmpeg4android_demo-1/lib/arm64/libvideokit.so";
Log.i(Prefs.TAG, "trying videokitLibPath: " + videokitLibPath);
file = new File(videokitLibPath);
if(file.exists()) {
Log.i(Prefs.TAG, "videokitLibPath exits: " + videokitLibPath);
}
else {
Log.w(Prefs.TAG, "videokitLibPath not exits: " + videokitLibPath);
videokitLibPath = "/data/app/com.examples.ffmpeg4android_demo-2/lib/arm64/libvideokit.so";
Log.i(Prefs.TAG, "trying videokitLibPath: " + videokitLibPath);
if(file.exists()) {
Log.i(Prefs.TAG, "videokitLibPath exits: " + videokitLibPath);
}
else {
Log.e(Prefs.TAG, "can't find path of lib");
}
}
}
}
//String videokitLibPath = ctx.getFilesDir().getParent() + "/lib/arm64/libvideokit.so";
// only this works on Android M, and the number changes (demo-2, demo-1)
//String videokitLibPath = "/data/app/com.examples.ffmpeg4android_demo-1/lib/arm64/libvideokit.so";
//Log.i(Prefs.TAG, "videokitLibPath: " + videokitLibPath);
return videokitLibPath;
}
public void fExit( Context ctx) {
fexit(getVideokitLibPath(ctx));
}
public native String fexit(String videokitLibPath);
public native String unload();
public native String load(String[] args, String videokitSdcardPath, String videokitLibPath, boolean isComplex);
}============================
package com.netcompss.ffmpeg4android;
public class Prefs {
public static final String TAG = "ffmpeg4android";
public static final String version = "322.00.00_LM322";
}
[/code]
[code=JavaScript]
package com.netcompss.ffmpeg4android;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import android.util.Log;
public class ProgressCalculator {
private int _durationOfCurrentWaitIndex = 0;
private final int DURATION_OF_CURRENT_WAIT_INDEX_LIMIT = 12;
private String _durationOfCurrent;
private long _lastVklogSize = -1;
private int _vkLogNoChangeCounter = 0;
private SimpleDateFormat _simpleDateFormat;
long _timeRef = -1;
int _prevProgress = 0;
private String vkLogPath = null;
public ProgressCalculator(String vkLogPathIn) {
vkLogPath = vkLogPathIn;
_simpleDateFormat = new SimpleDateFormat("HH:mm:ss.SS");
try {
Date ref = _simpleDateFormat.parse("00:00:00.00");
ref.setYear(112);
_timeRef = ref.getTime();
} catch (ParseException e) {
Log.w(Prefs.TAG, "failed to set _timeRef");
}
}
public void initCalcParamsForNextInter() {
Log.i(Prefs.TAG, "initCalcParamsForNextInter");
_lastVklogSize = -1;
_vkLogNoChangeCounter = 0;
_durationOfCurrent = null;
}
public int calcProgress() {
return calcProgress(1);
}
public int calcProgress(int durationMultiplyer) {
//Log.i(Prefs.TAG, "========calc progress======= " + durationMultiplyer);
int progress = 0;
if (_durationOfCurrent == null) {
String dur = GeneralUtils.getDutationFromVCLogRandomAccess(vkLogPath);
Log.d(Prefs.TAG, "dur: " + dur);
if (dur == null || dur.equals("") || dur.equals("null") ) {
Log.i(Prefs.TAG, "dur is not good, not setting ");
if (_durationOfCurrentWaitIndex < DURATION_OF_CURRENT_WAIT_INDEX_LIMIT) {
Log.i(Prefs.TAG, "waiting for real duration, going out of calcProgress with 0");
_durationOfCurrentWaitIndex ++;
return 0;
}
else {
Log.i(Prefs.TAG, "_durationOfCurrentWaitIndex is equal to: " + DURATION_OF_CURRENT_WAIT_INDEX_LIMIT + " reseting.");
_durationOfCurrentWaitIndex = 0;
Log.i(Prefs.TAG, "setting fake Prefs.durationOfCurrent");
_durationOfCurrent = "00:03:00.00";
Log.w(Prefs.TAG, "setting fake Prefs.durationOfCurrent (Cant get from file): " + _durationOfCurrent);
}
}
else {
_durationOfCurrent = GeneralUtils.getDutationFromVCLogRandomAccess(vkLogPath);
Log.i(Prefs.TAG, "duration: " + _durationOfCurrent + " \nTranscoding...");
}
}
if (_durationOfCurrent != null) {
long currentVkLogSize = -1;
currentVkLogSize = GeneralUtils.getVKLogSizeRandomAccess(vkLogPath);
//Log.d(Prefs.TAG, "currentVkLogSize: " + currentVkLogSize + " _lastVklogSize: " + _lastVklogSize);
if (currentVkLogSize > _lastVklogSize) {
_lastVklogSize = currentVkLogSize;
_vkLogNoChangeCounter = 0;
}
else {
//Log.w(Prefs.TAG, "Looks like Vk log is not increasing in size");
_vkLogNoChangeCounter++;
}
String currentTimeStr = GeneralUtils.readLastTimeFromVKLogUsingRandomAccess(vkLogPath);
//Log.d(Prefs.TAG, "currentTimeStr: " + currentTimeStr);
if (currentTimeStr.equals("exit")) {
Log.d(Prefs.TAG, "============Found one of the exit tokens in the log============");
return 100;
}
else if (currentTimeStr.equals("error") && _prevProgress == 0) {
Log.d(Prefs.TAG, "============Found error in the log============");
return 100;
}
else if (_vkLogNoChangeCounter > 16) {
Log.e(Prefs.TAG, "VK log is not changing in size, and no exit token found");
return 100;
}
try {
Date durationDate = _simpleDateFormat.parse(_durationOfCurrent);
Date currentTimeDate = _simpleDateFormat.parse(currentTimeStr);
currentTimeDate.setYear(112);
durationDate.setYear(112);
//Log.d(Prefs.TAG, " durationDate: " + durationDate + " currentTimeDate: " + currentTimeDate);
long durationLong = durationDate.getTime() - _timeRef;
if (durationMultiplyer != 1) {
//Log.i(Prefs.TAG, "====durationMultiplyer is not 1, handling===");
//Log.i(Prefs.TAG, "durationLong before: " + durationLong);
durationLong = durationLong * durationMultiplyer;
//Log.i(Prefs.TAG, "durationLong after: " + durationLong);
}
long currentTimeLong = currentTimeDate.getTime() - _timeRef;
//Log.d(Prefs.TAG, " durationLong: " + durationLong + " currentTimeLong: " + currentTimeLong + " diff: " + (durationLong - currentTimeLong));
progress = Math.round(((float)currentTimeLong / durationLong) * 100);
if (progress >= 100) {
Log.w(Prefs.TAG, "progress is 100, but can't find exit in the log, probably fake progress, still running...");
progress = 99;
}
_prevProgress = progress;
} catch (ParseException e) {
Log.w(Prefs.TAG, e.getMessage());
}
}
return progress;
}
}==================================
Then clicked build and copied ffmpeg4android_lib.aar in unity project under assets/Plugins/Android/libs/
then made this wrap upusing System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System.IO;
public class Test : MonoBehaviour {
private AndroidJavaObject FFMpeg = null;
private AndroidJavaObject activityContext = null;
public string Path1;
public string Path2;
public string Out3;
public string path;
public Text File1;
public Text File2;
public Text Context;
public Text End;
public void Convert(){
File1.text = File.Exists (path+Path1).ToString();
File2.text = File.Exists (path+Path2).ToString();
if (FFMpeg == null) {
using(AndroidJavaClass activityclass = new AndroidJavaClass("com.unity3d.player.UnityPlayer")){
activityContext = activityclass.GetStatic<androidjavaobject> ("currentActivity");
}
Context.text = "Context =" + activityContext;
}
using (AndroidJavaClass pluginClass = new AndroidJavaClass ("com.netcompss.ffmpeg4android.FFMpeg")) {
if (pluginClass != null) {
FFMpeg = pluginClass.CallStatic<androidjavaobject> ("instance");
FFMpeg.Call ("setContext", activityContext);
//activityContext.Call ("runOnUiThread", new AndroidJavaRunnable (() => {
FFMpeg.Call ("mux", path+Path1,path+Path2,path+Out3);
//}));
}
}
End.text = "Done";
}
}
</androidjavaobject></androidjavaobject>=============================================
And the problem is :
When i launch apk made from original project in AndroidStudio everything works fine.
When i launch apk made in unity its works fine until this part :
load(args, workFolder, getVideokitLibPath(ctx), true) ;IT does load all lib ok.
Its throw this error in logcat when trying to do that code03-23 10:43:17.293 28263-28277/? W/dalvikvm: No implementation found for native Lcom/netcompss/ffmpeg4android/LoadJNI;.load:([Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/String;
03-23 10:43:17.294 28263-28277/? E/test: vk run exception.
java.lang.UnsatisfiedLinkError: Native method not found: com.netcompss.ffmpeg4android.LoadJNI.load:([Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/String;
at com.netcompss.ffmpeg4android.LoadJNI.load(Native Method)
at com.netcompss.ffmpeg4android.LoadJNI.run(LoadJNI.java:37)
at com.netcompss.ffmpeg4android.LoadJNI.run(LoadJNI.java:57)
at com.netcompss.ffmpeg4android.FFMpeg.mux(FFMpeg.java:36)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.a(Unknown Source)
at com.unity3d.player.UnityPlayer$b$1.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:194)
at com.unity3d.player.UnityPlayer$b.run(Unknown Source)Projects Dropbox link :
https://www.dropbox.com/s/6vglcw7xk2n8lwu/AndroidStudioProjects.rar?dl=0 -
Error of "Built target opencv_imgproc" while compiling opencv2
23 mars 2017, par HongFollowing https://github.com/menpo/conda-opencv3, while I compile opencv, there is following error (please read the error at the end of the post). The only change I made is to enable ffmpeg by modifying "-DWITH_FFMPEG=1" in BUILD.SH. Any suggestion ?
$conda build conda/
BUILD START: opencv3-3.1.0-py27_0
updating index in: /home/cocadas/anaconda2/conda-bld/linux-64
updating index in: /home/cocadas/anaconda2/conda-bld/noarch
The following NEW packages will be INSTALLED:
bzip2: 1.0.6-3
cmake: 3.6.3-0
curl: 7.52.1-0
eigen: 3.2.7-0 menpo
expat: 2.1.0-0
mkl: 2017.0.1-0
ncurses: 5.9-10
numpy: 1.12.1-py27_0
openssl: 1.0.2k-1
pip: 9.0.1-py27_1
python: 2.7.13-0
readline: 6.2-2
setuptools: 27.2.0-py27_0
sqlite: 3.13.0-0
tk: 8.5.18-0
wheel: 0.29.0-py27_0
xz: 5.2.2-1
zlib: 1.2.8-3
Source cache directory is: /home/cocadas/anaconda2/conda-bld/src_cache
Found source in cache: opencv-3.1.0.tar.gz
Extracting download
Applying patch: u'/home/cocadas/conda-opencv3/conda/no_rpath.patch'
patching file CMakeLists.txt
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 397 with fuzz 1 (offset 11 lines).
Package: opencv3-3.1.0-py27_0
source tree in: /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0
source /home/cocadas/anaconda2/bin/activate /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/_b_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl
mkdir build
cd build
CMAKE_GENERATOR='Unix Makefiles'
CMAKE_ARCH=-m64
++ uname -s
SHORT_OS_STR=Linux
'[' Linux == Linux ']'
DYNAMIC_EXT=so
TBB=
OPENMP=-DWITH_OPENMP=1
IS_OSX=0
-- 3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf
--
-- OpenCV modules:
-- To be built: core flann hdf imgproc ml photo reg surface_matching video dnn fuzzy imgcodecs shape videoio highgui objdetect plot superres xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco optflow sfm stitching python2
-- Disabled: world contrib_world
-- Disabled by dependency: -
-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python3 ts viz cvv matlab
--
-- GUI:
-- QT: NO
-- GTK+ 3.x: YES (ver 3.18.9)
-- GThread : YES (ver 2.48.2)
-- GtkGlExt: NO
-- OpenGL support: NO
-- VTK support: NO
--
-- Media I/O:
-- ZLib: build (ver 1.2.8)
-- JPEG: build (ver 90)
-- WEBP: build (ver 0.3.1)
-- PNG: build (ver 1.6.19)
-- TIFF: build (ver 42 - 4.0.2)
-- JPEG 2000: build (ver 1.900.1)
-- OpenEXR: build (ver 1.7.1)
-- GDAL: NO
--
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: YES (ver 2.2.4)
-- FFMPEG: YES
-- codec: YES (ver 56.60.100)
-- format: YES (ver 56.40.101)
-- util: YES (ver 54.31.100)
-- swscale: YES (ver 3.1.101)
-- resample: NO
-- gentoo-style: YES
-- GStreamer: NO
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- OpenNI2: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: Using libv4l1 (ver 1.10.0) / libv4l2 (ver 1.10.0)
-- XIMEA: NO
-- Xine: NO
-- gPhoto2: NO
--
-- Parallel framework: OpenMP
--
-- Other third-party libraries:
-- Use IPP: 9.0.1 [9.0.1]
-- at: /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_lnx
-- Use IPP Async: NO
-- Use VA: NO
-- Use Intel VA-API/OpenCL: NO
-- Use Eigen: YES (ver 3.2.7)
-- Use Cuda: NO
-- Use OpenCL: NO
-- Use custom HAL: NO
--
-- Python 2:
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:554:22: error: ‘H5Tclose’ was not declared in this scope
H5Tclose( dstype );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:555:22: error: ‘H5Sclose’ was not declared in this scope
H5Sclose( dspace );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:557:22: error: ‘H5Dclose’ was not declared in this scope
H5Dclose( dsdata );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp: At global scope:
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:466:50: warning: unused parameter ‘dslabel’ [-Wunused-parameter]
void HDF5Impl::dsread( OutputArray Array, String dslabel,
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp: In member function ‘virtual void cv::hdf::HDF5Impl::dswrite(cv::InputArray, cv::String, const int*, const int*) const’:
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:583:5: error: ‘hsize_t’ was not declared in this scope
hsize_t dsdims[n_dims];
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:584:13: error: expected ‘;’ before ‘offset’
hsize_t offset[n_dims];
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:588:7: error: ‘offset’ was not declared in this scope
offset[d] = 0;
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:590:7: error: ‘dsdims’ was not declared in this scope
dsdims[d] = matrix.size[d];
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:601:9: error: ‘dsdims’ was not declared in this scope
dsdims[d] = dims_counts[d];
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:605:5: error: ‘hid_t’ was not declared in this scope
hid_t dsdata = H5Dopen( m_h5_file_id, dslabel.c_str(), H5P_DEFAULT );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:608:11: error: expected ‘;’ before ‘dspace’
hid_t dspace = H5Screate_simple( n_dims, dsdims, NULL );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:614:9: error: ‘offset’ was not declared in this scope
offset[d] = dims_offset[d];
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:618:11: error: expected ‘;’ before ‘fspace’
hid_t fspace = H5Dget_space( dsdata );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:619:26: error: ‘fspace’ was not declared in this scope
H5Sselect_hyperslab( fspace, H5S_SELECT_SET,
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:619:34: error: ‘H5S_SELECT_SET’ was not declared in this scope
H5Sselect_hyperslab( fspace, H5S_SELECT_SET,
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:620:26: error: ‘offset’ was not declared in this scope
offset, NULL, dsdims, NULL );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:620:40: error: ‘dsdims’ was not declared in this scope
offset, NULL, dsdims, NULL );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:620:53: error: ‘H5Sselect_hyperslab’ was not declared in this scope
offset, NULL, dsdims, NULL );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:623:11: error: expected ‘;’ before ‘dstype’
hid_t dstype = GetH5type( matrix.type() );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:628:15: error: expected ‘;’ before ‘adims’
hsize_t adims[1] = { channs };
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:629:7: error: ‘dstype’ was not declared in this scope
dstype = H5Tarray_create( dstype, 1, adims );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:629:44: error: ‘adims’ was not declared in this scope
dstype = H5Tarray_create( dstype, 1, adims );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:629:50: error: ‘H5Tarray_create’ was not declared in this scope
dstype = H5Tarray_create( dstype, 1, adims );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:633:15: error: ‘dsdata’ was not declared in this scope
H5Dwrite( dsdata, dstype, dspace, fspace,
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:633:23: error: ‘dstype’ was not declared in this scope
H5Dwrite( dsdata, dstype, dspace, fspace,
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:633:31: error: ‘dspace’ was not declared in this scope
H5Dwrite( dsdata, dstype, dspace, fspace,
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:634:15: error: ‘H5P_DEFAULT’ was not declared in this scope
H5P_DEFAULT, matrix.data );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:634:40: error: ‘H5Dwrite’ was not declared in this scope
H5P_DEFAULT, matrix.data );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:637:24: error: ‘H5Tclose’ was not declared in this scope
H5Tclose( dstype );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:639:22: error: ‘H5Sclose’ was not declared in this scope
H5Sclose( dspace );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:641:22: error: ‘H5Dclose’ was not declared in this scope
H5Dclose( dsdata );
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:580:9: warning: unused variable ‘channs’ [-Wunused-variable]
int channs = matrix.channels();
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp: In member function ‘virtual void cv::hdf::HDF5Impl::dsinsert(cv::InputArray, cv::String, const int*, const int*) const’:
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:670:5: error: ‘hsize_t’ was not declared in this scope
hsize_t dsdims[n_dims];
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:671:13: error: expected ‘;’ before ‘offset’
hsize_t offset[n_dims];
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:675:7: error: ‘offset’ was not declared in this scope
offset[d] = 0;
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:676:7: error: ‘dsdims’ was not declared in this scope
dsdims[d] = matrix.size[d];......
hsize_t foffset[1] = 0 ;
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:1022:11 : error : expected ‘ ;’ before ‘dspace’
hid_t dspace = H5Screate_simple( 1, dsddims, NULL ) ;
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:1025:26 : error : ‘dspace’ was not declared in this scope
H5Sselect_hyperslab( dspace, H5S_SELECT_SET,
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:1025:34 : error : ‘H5S_SELECT_SET’ was not declared in this scope
H5Sselect_hyperslab( dspace, H5S_SELECT_SET,
^
/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:1026:26 : error : ‘foffset’ was not declared in this scope
foffset, NULL, dsddims, NULL ) ;[ 57%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/svm.cpp.o
[ 57%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/testset.cpp.o
[ 57%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/tree.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/approx.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/blend.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/canny.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/clahe.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/color.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/colormap.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/connectedcomponents.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/contours.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/convhull.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/corner.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/cornersubpix.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/demosaicing.cpp.o
[ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/deriv.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/distransform.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/drawing.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/emd.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/featureselect.cpp.o
[ 59%] Linking CXX shared library ../../lib/libopencv_ml.so
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/filter.cpp.o
[ 59%] Built target opencv_ml
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/floodfill.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/gabor.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/generalized_hough.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/geometry.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/grabcut.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/hershey_fonts.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/histogram.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/hough.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/imgwarp.cpp.o
[ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/intersection.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/linefit.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/lsd.cpp.o
[ 60%] Linking CXX shared library ../../lib/libopencv_flann.so
[ 60%] Built target opencv_flann
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/matchcontours.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/main.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/min_enclosing_triangle.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/moments.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/morph.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/phasecorr.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/pyramids.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/rotcalipers.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/samplers.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/segmentation.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/shapedescr.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/smooth.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/spatialgradient.cpp.o
[ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/subdivision2d.cpp.o
[ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/sumpixels.cpp.o
[ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/tables.cpp.o
[ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/templmatch.cpp.o
[ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/thresh.cpp.o
[ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/undistort.cpp.o
[ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/utils.cpp.o
[ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/opencl_kernels_imgproc.cpp.o
[ 62%] Linking CXX shared library ../../lib/libopencv_imgproc.so
[ 62%] Built target opencv_imgproc
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "/home/cocadas/anaconda2/bin/conda-build", line 6, in
sys.exit(conda_build.cli.main_build.main())
File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 334, in main
execute(sys.argv[1:])
File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 325, in execute
noverify=args.no_verify)
File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/api.py", line 97, in build
need_source_download=need_source_download, config=config)
File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/build.py", line 1502, in build_tree
config=config)
File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/build.py", line 1137, in build
utils.check_call_env(cmd, env=env, cwd=src_dir)
File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/utils.py", line 616, in check_call_env
return _func_defaulting_env_to_os_environ(subprocess.check_call, *popenargs, **kwargs)
File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/utils.py", line 612, in _func_defaulting_env_to_os_environ
return func(_args, **kwargs)
File "/home/cocadas/anaconda2/lib/python2.7/subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/bin/bash', '-x', '-e', '/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/conda_build.sh']' returned non-zero exit status 2 -
How to integrate shared object file of libx264 while using ffmpeg for android ?
5 août 2014, par user3665376I am working with integrating ffmpeg for android .
Since I needed H.264 encoding I need to integrate libx264 with ffmpeg . Given below are the steps I followed .
1) Build the latest libx264 using android compiler tool-chain to obtain libx264.so.142 .
2) Build ffmpeg v 2.3 referring to this with —enable -libx264 option while configuring ffmpeg . The method explained in the blog included some editing in configure file of ffmpeg to generate shared object files with extension format [lib name].so rather than the generating shared object file with extension format [lib name].so.[version] (Since android build system supports files with extension .so only).
The building process was successful but since the generated .so files (after building ffmpeg) has dynamic dependency with libx264.so.142,I need to package libx264.so.142 also with the android .apk file . But since the above format (.so.142) is not supported with android apk building system I cannot package it with the .apk .
So I think the only option I have is to make some changes in configure file of ffmpeg to change the dynamic dependency of libx264.so.142 to libx264.so . Am I right ??
What changes do I need to make to ffmpeg configure file to achieve this ?