
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (58)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
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 (...) -
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 (4947)
-
FFMPEG read input from text file and filter complex from file at the same time
28 août 2020, par Arindam SahaI am trying to send input media files from a text file instead of inline argument and filter complex from text file as well.


Here is what I have done.


- 

-
I have created a text file and pushed all the input medias in te text file like,


file 0.mp3
file 1.mp3
file 2.mp3
file 3.mp3
file 4.mp3
file 5.mp3
file 6.mp3
file 7.mp3
file 8.mp3
file 9.mp3

...



-
I also have created another text file called
filter.txt
and inject all the complex filter rules in that.

[0]adelay=0|0,volume=207[0a];[1]adelay=111400|111400,volume=206[1a];[2]adelay=116300|116300,volume=205[2a];[3]adelay=122300|122300,volume=204[3a];[4]adelay=125600|125600,volume=203[4a];[5]adelay=128000|128000,volume=202[5a];[6]adelay=137800|137800,volume=201[6a];[7]adelay=149100|149100,volume=200[7a];[8]adelay=150400|150400,volume=199[8a];[9]adelay=151900|151900,volume=198[9a];[10]adelay=153300|153300,volume=197[10a];[11]adelay=190300|190300,volume=196[11a];[12]adelay=210000|210000,volume=195[12a];[13]adelay=222500|222500,volume=194[13a];[14]adelay=224400|224400,volume=193[14a];[15]adelay=226900|226900,volume=192[15a];[16]adelay=228700|228700,volume=191[16a];[17]adelay=236100|236100,volume=190[17a];[18]adelay=240000|240000,volume=189[18a];[19]adelay=251200|251200,volume=188[19a];[20]adelay=253400|253400,volume=187[20a];[21]adelay=256500|256500,volume=186[21a];[22]adelay=258800|258800,volume=185[22a];[23]adelay=263700|263700,volume=184[23a];[24]adelay=267500|267500,volume=183[24a];[25]adelay=272000|272000,volume=182[25a];[26]adelay=273500|273500,volume=181[26a];[27]adelay=276600|276600,volume=180[27a];[28]adelay=27920 ....









Both these 2 files as input individually works fine. However, if I try to pass both of them together the FFMPEG complains.


ffmpeg -y -f concat -i tmp/input.txt -filter_complex_script tmp/filter.txt -map "[a]" tmp/out.mp3



I get this error :


Invalid file index 1 in filtergraph description 



Any help is really appreciated.


-
-
How to control output file name in a batch file ?
24 décembre 2016, par vini_iI’m running a batch file to use FFMPEG to convert all the files with the *.MTS extension in a directory.
for %%A in (*.MTS) do ffmpeg -i "%%A" -vcodec copy -acodec pcm_s16le -ar 48000 -ac 2 "newfiles\%%A.mov"
pauseThe output files go to a directory called newfiles. The conversion takes place with no problem. The problem is that if the input is a file name.MTS the output is a file name.MTS.mov
How can i change the batch file so that with an input of name.MTS the output is name.mov ?
-
How can I transcode a file with FFMPEG and stream the output file in the response of a Java servlet ?
6 octobre 2012, par user1700589Basically, this is what I'm trying to do :
1. User passes a URL as a GET parameter to my servlet.
2. Servlet uses a ProcessBuilder to convert the media contained in that URL to a valid media format (ie : MP3).
3. The servlet streams the output file being transcoded by FFMPEG back to the browser.1 and 2 work fine, but it is 3 I am having a problem with. The best I can do is create a FileInputStream to the output file being transcoded and send that as the response but it is not working. My guess is that it is because the file is being written as I'm trying to stream it.
Is there anyway to intercept the output file argument in FFMPEG and read it into an InputStream ? In my mind it does not seem that it should be difficult to take input file A, transcode it to output file B, and then stream output file B back to the client, on the fly.
ProcessBuilder pb = new ProcessBuilder("ffmpeg.exe", "-i", url, "file.mp3");
Process p = pb.start();
final InputStream inStream = p.getErrorStream();
new Thread(new Runnable() {
public void run() {
InputStreamReader reader = new InputStreamReader(inStream);
Scanner scan = new Scanner(reader);
while (scan.hasNextLine()) {
System.out.println(scan.nextLine());
}
}
}).start();
ServletOutputStream stream = null;
BufferedInputStream buf = null;
try {
stream = response.getOutputStream();
File mp3 = new File(file.mp3");
//set response headers
response.setContentType("audio/mpeg");
response.addHeader("Content-Disposition", "attachment; filename=file.mp3");
response.setContentLength(-1);
//response.setContentLength((int) mp3.length());
FileInputStream input = new FileInputStream(mp3);
buf = new BufferedInputStream(input);
int readBytes = 0;
//read from the file; write to the ServletOutputStream
while ((readBytes = buf.read()) != -1) {
stream.write(readBytes);
}
} catch (IOException ioe) {
throw new ServletException(ioe.getMessage());
} finally {
if (stream != null) {
stream.close();
}
if (buf != null) {
buf.close();
}
}