
Recherche avancée
Autres articles (99)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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. -
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.
Sur d’autres sites (12957)
-
ffmpeg ProcessBuilder No such file or directory
24 avril 2020, par silentsudoI am trying to get media duration using ffmpeg command from a java program. I am calling this method from within spring boot application.
I am using
ProcessBuilder
.


File object is valid and exists for privacy I have replaced file path in error logs.



My Code is as below :



private String getMediaDuration(File file) {
 final String command = "/usr/bin/ffmpeg -version";//-i " + file.getAbsolutePath() + " 2>&1 | grep Duration | cut -c 13-20";
 try {
 ProcessBuilder builder = new ProcessBuilder("/usr/bin/ffmpeg",
 "-version");
 builder.directory(file.getParentFile());

 System.out.println("Directory : " + builder.directory().exists());
 System.out.println("Directory : " + builder.directory().getAbsolutePath());
 final Process process = builder.start();
 final InputStream is = process.getInputStream();
 final InputStreamReader isr = new InputStreamReader(is);
 final BufferedReader br = new BufferedReader(isr);
 String line;
 while ((line = br.readLine()) != null) {
 System.out.println(line);
 }
 return line;
 } catch (Exception e) {
 e.printStackTrace();
 }
 return null;
 }




Unfortunately nothing seems to be working
Error below :



java.io.IOException: Cannot run program "/usr/bin/ffmpeg -version" (in directory "/abc/xyz"): error=2, No such file or directory
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
 at ....getMediaDuration(FFmpegRunner.java:208)
 at ....ffmpegprocessor.FFmpegRunner.run(FFmpegRunner.java:61)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: error=2, No such file or directory
 at java.lang.UNIXProcess.forkAndExec(Native Method)
 at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
 at java.lang.ProcessImpl.start(ProcessImpl.java:134)
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
 ... 5 more
</init>



Output for
whereis ffmpeg



ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz




Please help me understand where it is going wrong. Thank you.


-
Remove Unnecesary Maven Dependencies from Eclipse
18 mai 2021, par ur3kI am working with Spring-Boot 2.3.8 and Eclipse.


I am using these dependencies to work on some videos :



 <dependency>
 <groupid>org.bytedeco</groupid>
 <artifactid>javacv</artifactid>
 <version>1.5.4</version>
 </dependency>

 
 <dependency>
 <groupid>org.bytedeco</groupid>
 <artifactid>opencv-platform</artifactid>
 <version>4.4.0-1.5.4</version>
 </dependency>

 
 <dependency>
 <groupid>org.bytedeco</groupid>
 <artifactid>ffmpeg-platform</artifactid>
 <version>4.3.1-1.5.4</version>
 </dependency>
 



Eclipse is adding all JARs of opencv, javaccp and ffmpeg, including JARs for Androind, MacOs, etc. I just need the ones for Windows and the problem is that these extra dependencies are creating problems for my teams when they try to load the project, build or test it (it is extreamly slow or just doesnt work).


These dependencies are not present in my final WAR when I build with maven form the command line and I use :


mvn -Djavacpp.platform=windows-x86_64 clean install 



Is there a way to tell eclipse to do the same ?


The WAR size goes from 800 MB to around 200 MB when building without and with and the platform flag, these extra 600 MB are what in my opinion is too much for eclipse.


Here is an image of all the JARs being added to the project.




-
Crop and pinch zoom image with FFMPEG
27 septembre 2022, par huggerI am working on a simple photo editor component for a mobile app which requires the user to be able to pan and scale (zoom) an image to be cropped. S/O to @kesh for the help so far !


With the pinch zoom value which ranges from 1-5, I wish to use this in my FFMPEG execution along with the crop command :


cropSelected() {
 this.setState({ isCropping: true });

 const diff =
 this.props.videoHeight / (this.state.aspectRatio * deviceWidth);
 const offsetDiff = this.state.offsetTopTranslate * diff;

 var filterPathPostCrop =
 this.props.type === 'photo'
 ? RNFS.DocumentDirectoryPath + '/afterCrop.png'
 : this.props.type === 'gif'
 ? RNFS.DocumentDirectoryPath + '/afterCrop.gif'
 : RNFS.DocumentDirectoryPath + '/afterCrop.mp4';
 //hardcoded zoom at 1.2x for example!
 FFmpegKit.execute(
 `-y -i ${this.state.mediaSource} -vf "crop=iw/1.2:ih/1.2:0:${offsetDiff},scale=iw:-1" -qscale 0 -frames:v 1 ${filterPathPostCrop}`
 ).then(async (session) => {
 const returnCode = await session.getReturnCode();
 if (ReturnCode.isSuccess(returnCode)) {
 // SUCCESS

 Animated.spring(this._pinchScale, {
 toValue: 1,
 useNativeDriver: true,
 }).start();

 this.setState(
 {
 mediaSource: filterPathPostCrop,
 videoSourcePreview: `${filterPathPostCrop}?${new Date().getTime()}`,
 ffMPEGinProgress: null,
 aspectRatio: 1080 / 1080,
 videoTime: 0,
 isPlayingVideo: false,
 isCropping: false,
 filterOutputIsAlt: !this.state.filterOutputIsAlt,
 wasCropped: true,
 });
 } else if (ReturnCode.isCancel(returnCode)) {
 // CANCEL
 } else {
 // ERROR
 alert('error');
 }
 });
 }



I drew this to illustrate what I am trying to achieve here.




I hope this helps !