
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (99)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...) -
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.
Sur d’autres sites (8654)
-
Google Analytics 4 and GDPR : Everything You Need to Know
17 mai 2022, par Erin -
How to run ffmpeg without installation in springboot application ?
9 juin 2020, par Firas BCI have a spring web application deployed on azure (Saas).
I want to run FFmpeg command in it but the problem azure (saas) doesn't give you the ability to use apt-install or to install an external program is there any way to run ffmpeg directly from the spring app ?


-
Java, Linux : 2nd call to ffmpeg via Runtime not getting executed
21 février 2018, par We are BorgI am trying to convert video to gif. I am using ffmpeg and imagemagick to achieve this. The first step is successful where a mp4 is created, but the 2nd process is not getting called. If I run the command manually, then it all works fine, but not via code. What am I doing wrong ? Thank you.
Error log :
First path is ffmpeg -i /media/attachment/test/groupattach/200/5mpnkfiq4f635m2j663sb5dne -ss 05 -t 10 -c copy /media/attachment/test/groupattach/200/tsr8svjtvqa4alm5vls9v0pgc4.mp4
Third path is ffmpeg -i /media/attachment/test/groupattach/200/tsr8svjtvqa4alm5vls9v0pgc4.mp4 -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -loop 0 - /media/attachment/test/groupattach/200/f9b4cmkhhpm180sau7f7j7j1ai.gif
java.io.FileNotFoundException: File '/media/attachment/test/groupattach/200/f9b4cmkhhpm180sau7f7j7j1ai.gif' does not exist
at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:299)
at org.apache.commons.io.FileUtils.readFileToByteArray(FileUtils.java:1763)
at com.myproj.spring.service.GroupAttachmentsServiceImpl.createFilePreviewForFiles(GroupAttachmentsServiceImpl.java:4157)
at com.myproj.spring.service.GroupAttachmentsServiceImpl.addAttachment(GroupAttachmentsServiceImpl.java:662)
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)Service layer where I get error :
if (extension.toLowerCase().equals("mp4")) {
String videoPath = createPreviewForVideos(attachId, fileBytes, filesPath, fileName);
return FileUtils.readFileToByteArray(new File(videoPath));
}This happens because the 2nd part of code is not executed posted below.
private String createPreviewForVideos(int attachId, byte[] fileBytes, String filePath, String fileName) {
try {
GroupAttachments groupAttachments = this.groupAttachmentsDAO.getAttachmenById(attachId);
String gifLocation = msg + "groupattach/" + groupAttachments.getGroupId() + "/";
String videoName = String.valueOf(new BigInteger(130, random).toString(32)) + ".mp4";
String gifName = String.valueOf(new BigInteger(130, random).toString(32)) + ".gif";
String firstpath = "ffmpeg -i " + filePath + " -ss 05 -t 10 -c copy " + gifLocation + videoName;
System.out.println("First path is " + firstpath);
Process process = Runtime.getRuntime().exec(firstpath);
process.waitFor();
process.destroy();
String thirdPath = "ffmpeg -i " + gifLocation + videoName + " -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -loop 0 - " + gifLocation + gifName;
Process thirdProcess = Runtime.getRuntime().exec(thirdPath);
thirdProcess.waitFor();
thirdProcess.destroy();
thirdProcess.destroyForcibly();
if(thirdProcess.isAlive()){
thirdProcess.destroyForcibly();
}
// return gifLocation+gifName;
return secondPhaseForVideos(attachId, fileBytes, filePath, fileName, videoName, gifName);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
private String secondPhaseForVideos(int attachId, byte[] fileBytes, String filePath, String fileName, String videoName, String gifName) {
try {
GroupAttachments groupAttachments = this.groupAttachmentsDAO.getAttachmenById(attachId);
String gifLocation = msg + "groupattach/" + groupAttachments.getGroupId() + "/";
String thirdPath = "ffmpeg -i " + gifLocation + videoName + " -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -loop 0 - " + gifLocation + gifName;
System.out.println("Third path is "+thirdPath);
Process process = Runtime.getRuntime().exec(thirdPath);
process.waitFor();
process.destroy();
groupAttachments.setFullSizePath(gifName);
this.groupAttachmentsDAO.updateAttachment(groupAttachments);
return gifLocation + gifName;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}2nd phase code never gets executed...the Runtime process. What am I doing wrong ? Thank you.