
Recherche avancée
Autres articles (111)
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...) -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (9511)
-
Evolution #3560 (Fermé) : Supprimer l’option expérimentale Google Closure Compiler
4 mai 2017Fait en 3.2 par https://zone.spip.org/trac/spip-zone/changeset/104154
-
Exception in thread "main" java.lang.UnsatisfiedLinkError : no jniavutil in java.library.path
29 novembre 2016, par tpm900I am trying to split a video into frames using FFmpegFrameGrabber (using code I have seen in tutorials) but am getting an exception as follows :
The code :
public BufferedImage getNextFrame() {
FFmpegFrameGrabber fFmpegFrameGrabber = new FFmpegFrameGrabber("resources/WebPage.mp4");
BufferedImage bufferedImage = null;
opencv_core.IplImage i;
try {
fFmpegFrameGrabber.start();
i = fFmpegFrameGrabber.grab();
bufferedImage = i.getBufferedImage();
} catch (Exception e) {
e.printStackTrace();
try {
fFmpegFrameGrabber.stop();
} catch (Exception e1) {
e1.printStackTrace();
}
}
return bufferedImage;
}The stack trace :
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniavutil in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:593)
at com.googlecode.javacpp.Loader.load(Loader.java:489)
at com.googlecode.javacpp.Loader.load(Loader.java:431)
at com.googlecode.javacv.cpp.avutil.<clinit>(avutil.java:76)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.avcodec.<clinit>(avcodec.java:87)
at com.googlecode.javacv.FFmpegFrameGrabber.<init>(FFmpegFrameGrabber.java:73)
at MP4VideoCodec.getNextFrame(MP4VideoCodec.java:16)
at MP4VideoCodec.<init>(MP4VideoCodec.java:12)
at main.main(main.java:7)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.UnsatisfiedLinkError: no avutil in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:593)
at com.googlecode.javacpp.Loader.load(Loader.java:481)
... 15 more
</init></init></clinit></clinit>How do I correct this exception ?
-
Code runs when in a main method but not when in another method
8 août 2018, par Zubair AhmedI created the setArtwork method to set the artwork of an aac file in an .m4a container and it does exactly what I want it to when I run the main method
public static void setArtwork(File art, File m4a) throws Exception{
Mp4TagReader reader = new Mp4TagReader();
Mp4TagWriter writer = new Mp4TagWriter();
RandomAccessFile song = new RandomAccessFile(m4a.toString(),"rw");
Mp4Tag mp4tag = reader.read(song);
Artwork artwork = ArtworkFactory.createArtworkFromFile(art);
mp4tag.addField(artwork);
mp4tag.setField(artwork);
RandomAccessFile temp = new RandomAccessFile(m4a,"rw");
writer.write(mp4tag,song,temp);
}
public static void main(String[] args) throws Exception{
File art = new File("C:\\Users\\Zubair\\Documents\\music\\coverArt.jpeg");
File m4a = new File("C:\\Users\\Zubair\\Documents\\music\\song.m4a");
setArtwork(art,m4a);
}BUT, when I try to use the setArtwork method in a different method in a different class it doesn’t actually save the mp4 tag to the File. I did some debugging to see if the picture was even being added to the artwork tag and it all looks good, but it seems that the tag doesn’t get written to the file.
public static void mp3Tom4a(File mp3File, File m4aFolder, File coverArt) throws Exception {
String input = mp3File.toString();
String name = mp3File.getName();
String output = name.substring(0,name.indexOf(MP3)) + M4A;
output = m4aFolder.toString() + "\\" + output;
//cd ffmpeg\bin && ffmpeg -y -i input.mp3 -an -vcodec copy cover.jpg && ffmpeg -y -i input.mp3 -c:a aac -b:a 192k -vn output.m4a
ProcessBuilder builder = new ProcessBuilder(
"cmd.exe","/c","cd ffmpeg\\bin && ffmpeg -y -i "
+ input +" -an -vcodec copy "+coverArt+
" && ffmpeg -y -i " + input + " -c:a aac -b:a 128k -vn " + output);
builder.redirectErrorStream(true);
builder.start();
JAudioData.setArtwork(coverArt,new File(output));
}
public static void main(String[] args) throws Exception {
mp3Tom4a(new File("C:\\Users\\Zubair\\Documents\\music\\song.mp3"),
new File("C:\\Users\\Zubair\\Documents\\music"),
new File("C:\\Users\\Zubair\\Documents\\music\\coverArt.jpeg"));
}it doesn’t make sense that setArtwork only works when it’s in the main method of its own class, especially because the objects I am using for the parameters are identical to eachother, so there should be no difference in the result. I think it might have something to do with the RandomAccessFile object being updated but the physical storage not getting updated
Edit- If I comment out builder.start() then it can successfully write the mp4tag to the m4a file. But I don’t see why having builder.start() would prevent that from happenning. My best guess is that because builder.start() is what creates song.m4a it is still being "edited" by that and can’t be edited by any other processes.