
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (65)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...)
Sur d’autres sites (8381)
-
How to get Updated Shared Object Files of OpenCV and FFMPEG libraries to overcome Libpng vulnerability ? [duplicate]
3 mars 2017, par LiyaThis question already has an answer here :
-
Libpng vulnerability
2 answers
We seek a technical help on a current issue which we are facing with one of our android application.
Our application is for live video streaming and recording (both audio and video) using wifi camera . We have completed the development process and every functionality of the application is working as expected in current version. but once we tried to upload the application to Google has rejected the application stating that vulnerability issue with Libpng library version.
Our application uses OpenCV, FFMPEG, JavaCV and JavaCPP libraries for Image processing for Video generation. But when we tried to upload to play store google have rejected application with following message :
“ Hello Google Play Developer,
We rejected Application name, for violating our Malicious Behavior or
User Data policy. If you submitted an update, the previous version of
your app is still available on Google Play.This app uses software that contains security vulnerabilities for
users or allows the collection of user data without proper disclosure.Below is the list of issues and the corresponding APK versions that
were detected in your recent submission. Please upgrade your app(s) as
soon as possible and increment the version number of the upgraded APK.Vulnerability APK Version(s) Libpng library
The vulnerabilities were fixed in libpng v1.0.66, v.1.2.56, v.1.4.19,
v1.5.26 or higher. You can find more information about how resolve the
issue in this Google Help Center article.”Since we have not used libpng library directly in our application we assume the problem is with opencv lib version which may be using libpng , so we replaced the opencv jar file with its gradle dependency and .so files of different libraries are combined in an armeabi.jar file and once we deleted the .so files from libs/armeabi.jar folder and uploaded to play store, then Google didn’t rejected with vulnerability issue and it got uploaded to the play store but the recording isn’t working in that version because we have removed the .SO files from the Project.
So as per our assumptions the libpng vulnerability is not only due to opencv but also due to the other libraries or the .so files .So please kindly suggest us which all .SO files we can remove from the library , so our application functionality for video recording works properly .
We tried to update the OpenCV, FFMPEG libraries and since the SO files are not getting regenerated so could not resolve this issue yet
We already refer following links to find a solution :
For more information please read our stackover flow post regarding this issue :Libpng vulnerability
We need help to solve this issue. Please let us know if you can help us to solve this issue since we are running out of time.
PS : These are the assumptions we made on this issue, May be we are wrong , so please guide us to the right path so we can achieve our goal.
-
Libpng vulnerability
-
Using openCV library with Java works well on Linux but not on Windows
6 août 2016, par user3586330I have a method that takes screenshots on absolute intervals (25%, 50%, 75% and 100%) from a video-file and save each of them to a separate .png-file. I use openCV with the JavaCV-Wrapper library to do that. The class/method of interest is :
package de.stal.videoreporter;
import org.bytedeco.javacpp.opencv_core;
import static org.bytedeco.javacpp.opencv_imgcodecs.cvSaveImage;
import org.bytedeco.javacv.FFmpegFrameGrabber;
import org.bytedeco.javacv.Frame;
import org.bytedeco.javacv.FrameGrabber;
import org.bytedeco.javacv.OpenCVFrameConverter;
class VideoThumbnailer {
public void createThumbnails(String videoname) throws FrameGrabber.Exception {
FFmpegFrameGrabber g = new FFmpegFrameGrabber("videos/" + videoname);
g.start();
OpenCVFrameConverter.ToIplImage converterToIplImage = new OpenCVFrameConverter.ToIplImage();
int length = g.getLengthInFrames();
int fifty = length / 2;
int twentyfive = fifty / 2;
int seventyfive = fifty + twentyfive;
int hundred = length - 1;
//each frame of video
for (int j = 0; j < length; j++) {
if (j == twentyfive || j == fifty || j == seventyfive || j == hundred) {
String ss = "";
if (j == twentyfive) {
ss = "25";
} else if (j == fifty) {
ss = "50";
} else if (j == seventyfive) {
ss = "75";
} else if (j == hundred) {
ss = "100";
}
g.setFrameNumber(j);
Frame f = g.grabImage();
opencv_core.IplImage image = converterToIplImage.convert(f);
String img_path = "thumbnails/" + videoname + "." + ss + ".png";
cvSaveImage(img_path, image);
}
}
g.stop();
}
}That works fine on environment : Ubuntu 15.10 x64, Java v.1.7.0_101 and Netbeans 8.0.2 with Maven. So I exported the project to a runnable jar-file(with all dependencies included) and tried to start it on Windows 10 x64 via :
java -jar VideoReporter-1.0-SNAPSHOT-jar-with-dependencies.jar
On Windows an exception will be thrown when executing the .jar-file :
Error putting member offsets for class org/bytedeco/javacpp/avutil$Pool_free_Pointer.
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.avutil
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.bytedeco.javacpp.Loader.load(Loader.java:472)
at org.bytedeco.javacpp.Loader.load(Loader.java:417)
at org.bytedeco.javacpp.avformat$AVFormatContext.<clinit>(avformat.java:2719)
at org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe(FFmpegFrameGrabber.java:391)
at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:385)
at de.stal.videoreporter.VideoThumbnailer.createThumbnails(VideoThumbnailer.java:15)
at de.stal.videoreporter.MetaReader.slurpMetadata(MetaReader.java:67)
at de.stal.videoreporter.VideoReporter.main(VideoReporter.java:19)
</clinit>My pom.xml is :
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelversion>4.0.0</modelversion>
<groupid>de.stal</groupid>
<artifactid>VideoReporter</artifactid>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
UTF-8
1.7
1.7
</properties>
<build>
<plugins>
<plugin>
<artifactid>maven-assembly-plugin</artifactid>
<configuration>
<archive>
<manifest>
<mainclass>de.stal.videoreporter.VideoReporter</mainclass>
</manifest>
</archive>
<descriptorrefs>
<descriptorref>jar-with-dependencies</descriptorref>
</descriptorrefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupid>org.apache.commons</groupid>
<artifactid>commons-csv</artifactid>
<version>1.1</version>
</dependency>
<dependency>
<groupid>org.bytedeco</groupid>
<artifactid>javacpp</artifactid>
<version>1.2.1</version>
</dependency>
<dependency>
<groupid>org.bytedeco</groupid>
<artifactid>javacv</artifactid>
<version>1.2</version>
</dependency>
<dependency>
<groupid>com.fasterxml.jackson.dataformat</groupid>
<artifactid>jackson-dataformat-csv</artifactid>
<version>2.8.0.rc2</version>
</dependency>
<dependency>
<groupid>javassist</groupid>
<artifactid>javassist</artifactid>
<version>3.12.1.GA</version>
</dependency>
<dependency>
<groupid>commons-collections</groupid>
<artifactid>commons-collections</artifactid>
<version>3.2.1</version>
</dependency>
<dependency>
<groupid>com.opencsv</groupid>
<artifactid>opencsv</artifactid>
<version>3.3</version>
</dependency>
</dependencies>
</project>What might be the problem on Windows ? In my opinion there shouldn’t be a problem with access to openCV/FFMPEG-classes because they all have been included the .jar-file ? Is this a problem with the classpath ?
Thanks, Peter
-
How to build FFMPEG lib with android ndk
27 janvier 2017, par S. Le GalloudecI introduce my problem : I’m a student working on a project asked by a company to my school.
My part is to develop an android application (i have to use c++) who can make an authentication, ask to an api wich camera the client can watch, then display in real time the stream of the IP camera (using RTSP protocol)To be honnest i’m pretty lost. I’ve found the library FFMPEG, wich looks like useful to my project. If i got it right, the library can display a stream from a camera. So i built the library for my project, and then i tried to include it in my program.
I did it the same way i did to include the library curl that i already use.
But when i try to run my program, i got this message :
FAILURE : Build failed with an exception.
-
What went wrong :
Execution failed for task ’:app:externalNativeBuildDebug’.
Build command failed.
Error while executing ’/local/Android/Sdk/cmake/3.6.3155560/bin/cmake’ with arguments —build /local/Bureau/Projet2/videosurveillance/Application_Android/App_Android/app/.externalNativeBuild/cmake/debug/x86 —target lecteur
[1/1] Linking CXX shared library ../obj/x86/liblecteur.so
FAILED : : && /local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target i686-none-linux-android -gcc-toolchain /local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64 —sysroot=/local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86 -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,—noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -std=gnu++11 -O0 -fno-limit-debug-info -Wl,—build-id -Wl,—warn-shared-textrel -Wl,—fatal-warnings -Wl,—no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,liblecteur.so -o ../obj/x86/liblecteur.so CMakeFiles/lecteur.dir/src/main/cpp/lecteur.cpp.o ../../../../../distribution/ffmpeg/x86/lib/libswscale.a -lz /local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86/usr/lib/liblog.so -lm "/local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a" && :
/local/Bureau/Projet2/videosurveillance/Application_Android/App_Android/app/src/main/cpp/lecteur.cpp:19 : error : undefined reference to ’avcodec_configuration’
clang++ : error : linker command failed with exit code 1 (use -v to see invocation)
ninja : build stopped : subcommand failed.Try :
Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output.
And i know that the problem comes from my cmakelist, or from my tree. But i don’t see the mistake, so if you could help me. Here is my cmakelist :
cmake_minimum_required(VERSION 3.4.1)
set(distribution_DIR ${CMAKE_SOURCE_DIR}/../distribution)
add_library(lib-curl STATIC IMPORTED)
add_library(ffmpeg SHARED IMPORTED)
set_target_properties(lib-curl PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/curl/lib/${ANDROID_ABI}/libcurl.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavcodec.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavdevice.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavfilter.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavformat.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavutil.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libpostproc.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswresample.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswscale.a)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
add_library( # Sets the name of the library.
downloader
SHARED
src/main/cpp/downloader.cpp
#src/main/cpp/downloader.h
)
add_library( # Sets the name of the library.
getrequest
SHARED
src/main/cpp/getrequest.cpp
#src/main/cpp/getrequest.h
)
add_library( # Sets the name of the library.
lecteur
SHARED
src/main/cpp/lecteur.cpp
#src/main/cpp/lecteur.h
)
target_include_directories(downloader PRIVATE
${distribution_DIR}/curl/include)
target_include_directories(getrequest PRIVATE
${distribution_DIR}/curl/include)
target_include_directories(lecteur PRIVATE
${distribution_DIR}/ffmpeg/${ANDROID_ABI}/include)
find_library( # Sets the name of the path variable.
log-lib
log )
target_link_libraries( # Specifies the target library.
downloader
lib-curl
z
${log-lib}
)
target_link_libraries( # Specifies the target library.
getrequest
lib-curl
z
${log-lib}
)
target_link_libraries( # Specifies the target library.
lecteur
ffmpeg
z
${log-lib}
)If you want to understand how i made my cmake, and what looks like my program you can check here : https://github.com/samylegalloudec/android-ndk-ffmepg
Hope i was clear
Best regards
Edit n°1 :
I think i’ve made a mistake in my cmakelist.txt so i fixed it (i guess) this way :
cmake_minimum_required(VERSION 3.4.1)
set(distribution_DIR ${CMAKE_SOURCE_DIR}/../distribution)
add_library(lib-curl STATIC IMPORTED)
set_target_properties(lib-curl PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/curl/lib/${ANDROID_ABI}/libcurl.a)
add_library(ffmpeg-codec STATIC IMPORTED)
set_target_properties(ffmpeg-codec PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavcodec.a)
add_library(ffmpeg-device STATIC IMPORTED)
set_target_properties(ffmpeg-device PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavdevice.a)
add_library(ffmpeg-filter STATIC IMPORTED)
set_target_properties(ffmpeg-filter PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavfilter.a)
add_library(ffmpeg-format STATIC IMPORTED)
set_target_properties(ffmpeg-format PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavformat.a)
add_library(ffmpeg-util STATIC IMPORTED)
set_target_properties(ffmpeg-util PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavutil.a)
add_library(ffmpeg-postproc STATIC IMPORTED)
set_target_properties(ffmpeg-postproc PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libpostproc.a)
add_library(ffmpeg-sample STATIC IMPORTED)
set_target_properties(ffmpeg-sample PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswresample.a)
add_library(ffmpeg-scale STATIC IMPORTED)
set_target_properties(ffmpeg-scale PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswscale.a)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
add_library( # Sets the name of the library.
downloader
SHARED
src/main/cpp/downloader.cpp
#src/main/cpp/downloader.h
)
add_library( # Sets the name of the library.
getrequest
SHARED
src/main/cpp/getrequest.cpp
#src/main/cpp/getrequest.h
)
add_library( # Sets the name of the library.
lecteur
SHARED
src/main/cpp/lecteur.cpp
#src/main/cpp/lecteur.h
)
target_include_directories(downloader PRIVATE
${distribution_DIR}/curl/include)
target_include_directories(getrequest PRIVATE
${distribution_DIR}/curl/include)
target_include_directories(lecteur PRIVATE
${distribution_DIR}/ffmpeg/${ANDROID_ABI}/include)
find_library( # Sets the name of the path variable.
log-lib
log )
target_link_libraries( # Specifies the target library.
downloader
lib-curl
z
${log-lib}
)
target_link_libraries( # Specifies the target library.
getrequest
lib-curl
z
${log-lib}
)
target_link_libraries( # Specifies the target library.
lecteur
ffmpeg-codec
ffmpeg-device
ffmpeg-filter
ffmpeg-format
ffmpeg-util
ffmpeg-postproc
ffmpeg-sample
ffmpeg-scale
z
${log-lib}
)Now i have another message :
FAILURE : Build failed with an exception.
-
What went wrong :
Execution failed for task ’:app:externalNativeBuildDebug’.
Build command failed.
Error while executing ’/local/Android/Sdk/cmake/3.6.3155560/bin/cmake’ with arguments —build /local/Bureau/Projet2/videosurveillance/Application_Android/App_Android/app/.externalNativeBuild/cmake/debug/x86 —target lecteur
[1/1] Linking CXX shared library ../obj/x86/liblecteur.so
FAILED : : && /local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target i686-none-linux-android -gcc-toolchain /local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64 —sysroot=/local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86 -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,—noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -std=gnu++11 -O0 -fno-limit-debug-info -Wl,—build-id -Wl,—warn-shared-textrel -Wl,—fatal-warnings -Wl,—no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,liblecteur.so -o ../obj/x86/liblecteur.so CMakeFiles/lecteur.dir/src/main/cpp/lecteur.cpp.o ../../../../../distribution/ffmpeg/x86/lib/libavcodec.a ../../../../../distribution/ffmpeg/x86/lib/libavdevice.a ../../../../../distribution/ffmpeg/x86/lib/libavfilter.a ../../../../../distribution/ffmpeg/x86/lib/libavformat.a ../../../../../distribution/ffmpeg/x86/lib/libavutil.a ../../../../../distribution/ffmpeg/x86/lib/libpostproc.a ../../../../../distribution/ffmpeg/x86/lib/libswresample.a ../../../../../distribution/ffmpeg/x86/lib/libswscale.a -lz /local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86/usr/lib/liblog.so -lm "/local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a" && :
/local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld : warning : shared library text segment is not shareable
/local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld : error : treating warnings as errors
clang++ : error : linker command failed with exit code 1 (use -v to see invocation)
ninja : build stopped : subcommand failed. -
Try :
Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output.
-