
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (72)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (9285)
-
RTP packets detected as UDP
28 février 2017, par user3172852Here is what I am trying to do :
WebRTC endpoint > RTP Endpoint > ffmpeg > RTMP server.
This is what my SDP file looks like.
var cm_offer = "v=0\n" +
"o=- 3641290734 3641290734 IN IP4 127.0.0.1\n" +
"s=nginx\n" +
"c=IN IP4 127.0.0.1\n" +
"t=0 0\n" +
"m=audio 60820 RTP/AVP 0\n" +
"a=rtpmap:0 PCMU/8000\n" +
"a=recvonly\n" +
"m=video 59618 RTP/AVP 101\n" +
"a=rtpmap:101 H264/90000\n" +
"a=recvonly\n";What’s happening is that wireshark can detect the incoming packets at port 59618, but not as RTP packets but UDP packets. I am trying to capture the packets using ffmpeg with the following command :
ubuntu@ip-132-31-40-100:~$ ffmpeg -i udp://127.0.0.1:59618 -vcodec copy stream.mp4
ffmpeg version git-2017-01-22-f1214ad Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc
libavutil 55. 44.100 / 55. 44.100
libavcodec 57. 75.100 / 57. 75.100
libavformat 57. 63.100 / 57. 63.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 69.100 / 6. 69.100
libavresample 3. 2. 0 / 3. 2. 0
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100All I get is a blinking cursor and The stream.mp4 file is not written to disk after I exit (ctrl+c).
So can you help me figure out :
- why wireshark cannot detect the packets as RTP (I suspect it has something to do with SDP)
- How to handle SDP answer when the RTP endpoint is pushing to ffmpeg which doesn’t send an answer back.
Here is the entire code (hello world tutorial modified)
/*
* (C) Copyright 2014-2015 Kurento (http://kurento.org/)
*
* 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.
*/
function getopts(args, opts)
{
var result = opts.default || {};
args.replace(
new RegExp("([^?=&]+)(=([^&]*))?", "g"),
function($0, $1, $2, $3) { result[$1] = decodeURI($3); });
return result;
};
var args = getopts(location.search,
{
default:
{
ws_uri: 'wss://' + location.hostname + ':8433/kurento',
ice_servers: undefined
}
});
function setIceCandidateCallbacks(webRtcPeer, webRtcEp, onerror)
{
webRtcPeer.on('icecandidate', function(candidate) {
console.log("Local candidate:",candidate);
candidate = kurentoClient.getComplexType('IceCandidate')(candidate);
webRtcEp.addIceCandidate(candidate, onerror)
});
webRtcEp.on('OnIceCandidate', function(event) {
var candidate = event.candidate;
console.log("Remote candidate:",candidate);
webRtcPeer.addIceCandidate(candidate, onerror);
});
}
function setIceCandidateCallbacks2(webRtcPeer, rtpEp, onerror)
{
webRtcPeer.on('icecandidate', function(candidate) {
console.log("Localr candidate:",candidate);
candidate = kurentoClient.getComplexType('IceCandidate')(candidate);
rtpEp.addIceCandidate(candidate, onerror)
});
}
window.addEventListener('load', function()
{
console = new Console();
var webRtcPeer;
var pipeline;
var webRtcEpt;
var videoInput = document.getElementById('videoInput');
var videoOutput = document.getElementById('videoOutput');
var startButton = document.getElementById("start");
var stopButton = document.getElementById("stop");
startButton.addEventListener("click", function()
{
showSpinner(videoInput, videoOutput);
var options = {
localVideo: videoInput,
remoteVideo: videoOutput
};
if (args.ice_servers) {
console.log("Use ICE servers: " + args.ice_servers);
options.configuration = {
iceServers : JSON.parse(args.ice_servers)
};
} else {
console.log("Use freeice")
}
webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function(error)
{
if(error) return onError(error)
this.generateOffer(onOffer)
});
function onOffer(error, sdpOffer)
{
if(error) return onError(error)
kurentoClient(args.ws_uri, function(error, client)
{
if(error) return onError(error);
client.create("MediaPipeline", function(error, _pipeline)
{
if(error) return onError(error);
pipeline = _pipeline;
pipeline.create("WebRtcEndpoint", function(error, webRtc){
if(error) return onError(error);
webRtcEpt = webRtc;
setIceCandidateCallbacks(webRtcPeer, webRtc, onError)
webRtc.processOffer(sdpOffer, function(error, sdpAnswer){
if(error) return onError(error);
webRtcPeer.processAnswer(sdpAnswer, onError);
});
webRtc.gatherCandidates(onError);
webRtc.connect(webRtc, function(error){
if(error) return onError(error);
console.log("Loopback established");
});
});
pipeline.create("RtpEndpoint", function(error, rtp){
if(error) return onError(error);
//setIceCandidateCallbacks2(webRtcPeer, rtp, onError)
var cm_offer = "v=0\n" +
"o=- 3641290734 3641290734 IN IP4 127.0.0.1\n" +
"s=nginx\n" +
"c=IN IP4 127.0.0.1\n" +
"t=0 0\n" +
"m=audio 60820 RTP/AVP 0\n" +
"a=rtpmap:0 PCMU/8000\n" +
"a=recvonly\n" +
"m=video 59618 RTP/AVP 101\n" +
"a=rtpmap:101 H264/90000\n" +
"a=recvonly\n";
rtp.processOffer(cm_offer, function(error, cm_sdpAnswer){
if(error) return onError(error);
//webRtcPeer.processAnswer(cm_sdpAnswer, onError);
});
//rtp.gatherCandidates(onError);
webRtcEpt.connect(rtp, function(error){
if(error) return onError(error);
console.log("RTP endpoint connected to webRTC");
});
});
});
});
}
});
stopButton.addEventListener("click", stop);
function stop() {
if (webRtcPeer) {
webRtcPeer.dispose();
webRtcPeer = null;
}
if(pipeline){
pipeline.release();
pipeline = null;
}
hideSpinner(videoInput, videoOutput);
}
function onError(error) {
if(error)
{
console.error(error);
stop();
}
}
})
function showSpinner() {
for (var i = 0; i < arguments.length; i++) {
arguments[i].poster = 'img/transparent-1px.png';
arguments[i].style.background = "center transparent url('img/spinner.gif') no-repeat";
}
}
function hideSpinner() {
for (var i = 0; i < arguments.length; i++) {
arguments[i].src = '';
arguments[i].poster = 'img/webrtc.png';
arguments[i].style.background = '';
}
}
/**
* Lightbox utility (to display media pipeline image in a modal dialog)
*/
$(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) {
event.preventDefault();
$(this).ekkoLightbox();
}); -
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 -
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