
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (73)
-
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 (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
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 (...)
Sur d’autres sites (13002)
-
How to trim and merge using Fluent FFMpeg ?
29 juillet 2016, par John D.Here’s what I want to do with fluent-ffmpeg :
I have 3 input files. An intro, main, and outro video. I wish to merge the three, while trimming the main video. Here is my code :
var ffmpegCommand = ffmpeg();
ffmpegCommand.addInput(introVideo);
ffmpegCommand.addInput(mainVideo).seekInput(20).duration(3);
ffmpegCommand.addInput(outroVideo);
ffmpegCommand.on('error', function(err, stdout, stderr){
console.log("FAILED!\n\t"+err+"\n\t"+stdout+"\n\t"+stderr);
});
ffmpegCommand.on('end', function(){
console.log('COMPLETE!');
});
ffmpegCommand.on('start', function(commandLine) {
console.log('Spawned Ffmpeg with command: ' + commandLine);
});
ffmpegCommand.mergeToFile('final.mp4', './vid_files/tmp');The program executes fine, but when I ffplay final.mp4, the result is that introVideo plays then the video appears to freeze. According to the fluent-ffmpeg documentation, it states "Each of these [Input options] methods apply on the last input added". So I can’t figure out why that syntax doesn’t seem to work...
How can I trim the main video to send to mergeToFile ?
Note that this works fine if I don’t have .seekinput(20).duration(3) on the second addInput.
Oh, here’s the outputted commandLine value :
ffmpeg -i ./vid_files/intro.mp4 -ss 20 -i ./vid_files/main.mp4 -i ./vid_files/outro.mp4 -y -filter_complex concat=n=3:v=1:a=1 -t 3 final.mp4
-
Change pitch of audio file without altering the duration of audio file (FFMPEG)
13 janvier 2016, par VickySI am in a bit of trouble.
I am working on FFMPEG for android and now my task is to modify the pitch of the audio file without altering the duration of the audio file.I used these commands but they alter the duration :
ffmpeg -i /sdcard/emoj/final.wav -filter:a atempo=1.5 -vn /sdcard/emoj/final1.wav
ffmpeg -i /sdcard/emoj/final.wav -filter:a asetrate=r=35K -vn /sdcard/emoj/final1.wavI know I can use Sonic NDK for this purpose. But I want to know if its possible with the help of FFMPEG.
In documentation I have seend something called "Rubberband" I think that can help. But I dont know how to use that.I just want the command to do that.
I would appreciate any help in this regard. -
How to get video frame for a specific time from mp4
11 décembre 2015, par man-ri have an mp4 video byte array and i need to generate a thumbnail for it using its middle frame (e.g. if the video length is 10 seconds then i need to get the picture from 5th second).
i managed to parse through the file and extract its boxes (atom). i have also managed to get the video length from the mvhd box. also i managed to extract
1. the time-To-Sample table from stts box,
2. the sample-To-Chunk table from stcs box,
3. the chunk-Offset table from stco box,
4. the sample Size table from stsz box,
5. the Sync Sample table from stss boxi know that all the actual media are available in the mdat box and that i need to correlate the above table to find the exact frame offset in the file but my question is how ? the tables data seems to be compressed (specially the time-To-Sample table) but i don’t know how decompress them.
any help is appreciated.
below are code samples
code to convert byte to hex
public static char[] bytesToHex(byte[] bytes) {
char[] hexChars = new char[bytes.length * 2];
for ( int j = 0; j < bytes.length; j++ ) {
int v = bytes[j] & 0xFF;
hexChars[j * 2] = hexArray[v >>> 4];
hexChars[j * 2 + 1] = hexArray[v & 0x0F];
}
return hexChars;
}code for getting the box offset
final static String MOOV = "6D6F6F76";
final static String MOOV_MVHD = "6D766864";
final static String MOOV_TRAK = "7472616B";
final static String MOOV_TRAK_MDIA = "6D646961";
final static String MOOV_TRAK_MDIA_MINF = "6D696E66";
final static String MOOV_TRAK_MDIA_MINF_STBL = "7374626C";
final static String MOOV_TRAK_MDIA_MINF_STBL_STSD = "73747364";
final static String MOOV_TRAK_MDIA_MINF_STBL_STTS = "73747473";
final static String MOOV_TRAK_MDIA_MINF_STBL_STSS = "73747373";
final static String MOOV_TRAK_MDIA_MINF_STBL_STSC = "73747363";
final static String MOOV_TRAK_MDIA_MINF_STBL_STCO = "7374636F";
final static String MOOV_TRAK_MDIA_MINF_STBL_STSZ = "7374737A";
static int getBox(char[] s, int offset, String type) {
int typeOffset = -1;
for (int i = offset*2; i-1) {
break;
}
}
i+=(size*2);
}
return typeOffset;
}code for getting the duration and timescale
static int[] getDuration(char[] s) {
int mvhdOffset = getBox(s, 0, MOOV_MVHD);
int timeScaleStart = (mvhdOffset*2) + (4 + 4 + 1 + 3 + 4 + 4)*2;
int timeScaleEnd = (mvhdOffset*2) + (4 + 4 + 1 + 3 + 4 + 4 + 4)*2;
int durationStart = (mvhdOffset*2) + (4 + 4 + 1 + 3 + 4 + 4 + 4)*2;
int durationEnd = (mvhdOffset*2) + (4 + 4 + 1 + 3 + 4 + 4 + 4 + 4)*2;
String timeScaleHex = new String(Arrays.copyOfRange(s, timeScaleStart, timeScaleEnd));
String durationHex = new String(Arrays.copyOfRange(s, durationStart, durationEnd));
int timeScale = Integer.parseInt(timeScaleHex, 16);
int duration = Integer.parseInt(durationHex, 16);
int[] result = {duration, timeScale};
return result;
}code to get the time-To-Sample table
static int[][] getTimeToSampleTable(char[] s, int trakOffset) {
int offset = getBox(s, trakOffset, MOOV_TRAK_MDIA_MINF_STBL_STTS);
int sizeStart = offset*2;
int sizeEnd = offset*2 + (4)*2;
int typeStart = offset*2 + (4)*2;
int typeEnd = offset*2 + (4 + 4)*2;
int noOfEntriesStart = offset*2 + (4 + 4 + 1 + 3)*2;
int noOfEntriesEnd = offset*2 + (4 + 4 + 1 + 3 + 4)*2;
String sizeHex = new String(Arrays.copyOfRange(s, sizeStart, sizeEnd));
String typeHex = new String(Arrays.copyOfRange(s, typeStart, typeEnd));
String noOfEntriesHex = new String(Arrays.copyOfRange(s, noOfEntriesStart, noOfEntriesEnd));
int size = Integer.parseInt(sizeHex, 16);
int noOfEntries = Integer.parseInt(noOfEntriesHex, 16);
int[][] timeToSampleTable = new int[noOfEntries][2];
for (int i = 0; icode>