
Recherche avancée
Autres articles (56)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
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 (11057)
-
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
-
OpenCV conda installation (missing ffmpeg) - Windows
12 février 2017, par FZNBI managed to install OpenCV 3.1 using conda and Python 3.5 and everything seems to work fine.
However, when trying to import a video file via ffmpeg I get this :
import numpy as np
import cv2
cap = cv2.VideoCapture('data\vtest.avi')
cap.read()
#(False, None)When using still images or my laptop webcam it works (notice that the VideCapture returns
None
). Obviously, something is wrong with ffmpeg.I have tried a couple of things :
- Install ffmpeg binaries in my environment/PATH (works fine separately
but apparently OpenCV cannot call it since it looks for specific dlls). -
Move to the bin folder (which is in my path as well) the
dlls from the compiled version in
sourceforge :opencv_ffmpeg310_64.dll
opencv_ffmpeg310.dll
Neither of the two options worked. Any ideas ?
- Install ffmpeg binaries in my environment/PATH (works fine separately
-
OpenCV-Python installation (missing ffmpeg) - Windows
8 mai 2017, par FZNBI managed to install OpenCV 3.1 using conda and Python 3.5 and everything seems to work fine.
However, when trying to import a video file via ffmpeg I get this :
import numpy as np
import cv2
cap = cv2.VideoCapture('data\vtest.avi')
cap.read()
#(False, None)When using still images or my laptop webcam it works (notice that the VideCapture returns
None
). Obviously, something is wrong with ffmpeg.I have tried a couple of things :
- Install ffmpeg binaries in my environment/PATH (works fine separately
but apparently OpenCV cannot call it since it looks for specific dlls). -
Move to the bin folder (which is in my path as well) the
dlls from the compiled version in
sourceforge :opencv_ffmpeg310_64.dll
opencv_ffmpeg310.dll
Neither of the two options worked. Any ideas ?
- Install ffmpeg binaries in my environment/PATH (works fine separately