
Recherche avancée
Médias (91)
-
999,999
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (36)
-
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 (...) -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (3929)
-
how can I add animation between images when convert images to video using java code and FFmpeg ?
20 août 2018, par rahul404how can I add animation between images when convert images to video using java code and FFmpeg ?
-
Java merge ? mix ? 2 audio files(mp3) parallely and download it
4 février 2024, par JoonSeo Yangis there any way to mix 2 audio files parallely and let user download it ?


I was trying it by ffmpeg


FFmpegBuilder builder = new FFmpegBuilder()
 .overrideOutputFiles(true)
 .setInput(audioInputPath1)
 .addInput(audioInputPath2)
 .addOutput(outputFilePath)
 .setFormat("mp3")
 .setAudioCodec("libmp3lame")
 .setAudioBitRate(256000)
 .done();

 executor.createJob(builder).run();



but it doesnt work by codec problem, so i want to know if there any other way to reach my goal, or fix my ffmpeg code to make it work ?


-
How to make video from images using Java + x264 ; cross platform solution required
19 octobre 2014, par Shashank TulsyanI have made a software which records my entire day into a video.
Example video : https://www.youtube.com/watch?v=ITZYMMcubdw (Note : >16hrs compressed in 2mins, video speed too high, might cause epilepsy :P )The approach that I use right now is, Avisynth + x264 + Java.
This is very very efficient. The video for entire day is created in 3-4mins, and reduced to a size of 40-50MB. This is perfect, the only issue is that this solution is not cross platform.
Does anyone have a better idea ?I tried using java based x246 libraries but
- They are slow as hell
- The video output size is too big
- The video quality is not satisfactory.
Some website suggest a command such as :
x264.exe --crf 18 --fps 24 --input-res 1920x1080 --input-csp rgb -o "T:\crf18.mkv" "T:\___BBB\big_buck_bunny_%05d.png"
There are 2 problems with this approach.
- As far as I know, x264 does accept image sequence as input, ffmpeg does
- The input images are not named in sequence such as image01.png , image02.png etc. They are named as timestamp_as_longinteger.png . So inorder to allow x264 to accept these images as input, I have to rename all of them ( i make a symbolic link for all images in a new folder ). This approach is again unsatisfactory, because I need more flexibility in selecting/unselecting files which would be converted to a video. Right now my approach is a hack.
The best solution is x264. But not sure how I can send it an image sequence from Java. That too, images which are not named in sequential fashion.
BTW The purpose of making video is going back in time, and finding out how time was spend/wasted.
The software is aware of what the user is doing. So using this I can find out (visually) how a class evolved with time. How much time I spend on a particular class/package/module/project/customer. The granuality right now is upto the class level, I wish to take it to the function level. The software is called jitendriya.
Here is 1 solution
How does one encode a series of images into H264 using the x264 C API ?But this is for C. If I have to do the same in java, and in a cross plaform fashion, I will have to resort to JNA/JNI. JNA might have a significant performance hit. JNI would be more work.
FFMpeg also looks like a nice alternative, but I am still not satisfied by any of these solutions looking at the pros and cons.
Solution Adapted.
package weeklyvideomaker;
import java.awt.AWTException;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Calendar;
import java.util.LinkedList;
import java.util.logging.Level;
import java.util.logging.Logger;
import neembuu.release1.util.StreamGobbler;
import org.shashaank.activitymonitor.ScreenCaptureHandler;
import org.shashaank.jitendriya.JitendriyaParams;
/**
*
* @author Shashank
*/
public class DirectVideoScreenHandler implements ScreenCaptureHandler {
private final JitendriyaParams jp;
private String extension="264";
private boolean lossless=false;
private String fps="24/1";
private Process p = null;
private Rectangle r1;
private Robot r;
private int currentDay;
private static final String[]weeks={"sun","mon","tue","wed","thu","fri","sat"};
public DirectVideoScreenHandler(JitendriyaParams jp) {
this.jp = jp;
}
public String getExtension() {
return extension;
}
public void setExtension(String extension) {
this.extension = extension;
}
public boolean isLossless() {
return lossless;
}
public void setLossless(boolean lossless) {
this.lossless = lossless;
}
public String getFps() {
return fps;
}
public void setFps(String fps) {
this.fps = fps;
}
private static int getday(){
return Calendar.getInstance().get(Calendar.DAY_OF_WEEK) - 1;
}
public void make()throws IOException,AWTException{
currentDay = getday();
File week = jp.getWeekFolder();
String destinationFile = week+"\\videos\\"+weeks[currentDay]+"_"+System.currentTimeMillis()+"_direct."+extension;
r = new Robot();
r1 = getScreenSize();
ProcessBuilder pb = makeProcess(destinationFile, 0, r1.width, r1.height);
p = pb.start();
StreamGobbler out = new StreamGobbler(p.getInputStream(), "out");
StreamGobbler err = new StreamGobbler(p.getErrorStream(), "err");
out.start();err.start();
}
private static Rectangle getScreenSize(){
return new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
}
private void screenShot(OutputStream os)throws IOException{
BufferedImage bi = r.createScreenCapture(r1);
int[]intRawData = ((java.awt.image.DataBufferInt)
bi.getRaster().getDataBuffer()).getData();
byte[]rawData = new byte[intRawData.length*3];
for (int i = 0; i < intRawData.length; i++) {
int rgb = intRawData[i];
rawData[ i*3 + 0 ] = (byte) (rgb >> 16);
rawData[ i*3 + 1 ] = (byte) (rgb >> 8);
rawData[ i*3 + 2 ] = (byte) (rgb);
}
os.write(rawData);
}
private ProcessBuilder makeProcess(String destinationFile, int numberOfFrames,
int width, int height){
LinkedList<string> commands = new LinkedList<>();
commands.add("\""+encoderPath()+"\"");
if(true){
commands.add("-");
if(lossless){
commands.add("--qp");
commands.add("0");
}
commands.add("--keyint");
commands.add("240");
commands.add("--sar");
commands.add("1:1");
commands.add("--output");
commands.add("\""+destinationFile+"\"");
if(numberOfFrames>0){
commands.add("--frames");
commands.add(String.valueOf(numberOfFrames));
}else{
commands.add("--stitchable");
}
commands.add("--fps");
commands.add(fps);
commands.add("--input-res");
commands.add(width+"x"+height);
commands.add("--input-csp");
commands.add("rgb");//i420
}
return new ProcessBuilder(commands);
}
private String encoderPath(){
return jp.getToolsPath()+File.separatorChar+"x264_64.exe";
}
@Override public void run() {
try {
if(p==null){
make();
}
if(currentDay!=getday()){// day changed
destroy();
return;
}
if(!r1.equals(getScreenSize())){// screensize changed
destroy();
return;
}
screenShot(p.getOutputStream());
} catch (Exception ex) {
Logger.getLogger(DirectVideoScreenHandler.class.getName()).log(Level.SEVERE, null, ex);
}
}
private void destroy()throws Exception{
p.getOutputStream().flush();
p.getOutputStream().close();
p.destroy();
p = null;
}
}
</string>package weeklyvideomaker;
import org.shashaank.jitendriya.JitendriyaParams;
/**
*
* @author Shashank
*/
public class DirectVideoScreenHandlerTest {
public static void main(String[] args)throws Exception {
JitendriyaParams jp = new JitendriyaParams.Builder()
.setToolsPath("F:\\GeneralProjects\\JReminder\\development_environment\\tools")
.setOsDependentDataFolderPath("J:\\jt_data")
.build();
DirectVideoScreenHandler w = new DirectVideoScreenHandler(jp);
w.setExtension("264");
w.setFps("24/1");
w.setLossless(false);
w.make();
for (int i = 0; ; i++) {
w.run();
Thread.sleep(1000);
}
}
}