Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (77)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une 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 (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang 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.

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

Sur d’autres sites (6010)

  • How can I transcode a file with FFMPEG and stream the output file in the response of a Java servlet ?

    6 octobre 2012, par user1700589

    Basically, 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();
           }
       }
  • How to control output file name in a batch file ?

    24 décembre 2016, par vini_i

    I’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"
    pause

    The 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 ?

  • FFMPEG read input from text file and filter complex from file at the same time

    28 août 2020, par Arindam Saha

    I 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.

    


      

    1. 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

...


      


    2. 


    3. 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 ....


      


    4. 


    


    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.