Recherche avancée

Médias (91)

Autres articles (57)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (8141)

  • ffmpeg progress percentage in php

    9 avril 2018, par Mr.ZZ

    ffmpeg.php

    $sCmd = "ffmpeg -i ".$image." -i ".$music." video.avi 1> progress.txt";
    $proc = popen($sCmd." 2>&1", "r");

    progress.php

    $content = @file_get_contents('progress.txt');
    if($content){
       preg_match("/Duration: (.*?), start:/", $content, $matches);
       $rawDuration = $matches[1];
       $ar = array_reverse(explode(":", $rawDuration));
       $duration = floatval($ar[0]);
       if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
       if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;
       preg_match_all("/time=(.*?) bitrate/", $content, $matches);
       $rawTime = array_pop($matches);
       if (is_array($rawTime)){$rawTime = array_pop($rawTime);}
       $ar = array_reverse(explode(":", $rawTime));
       $time = floatval($ar[0]);
       if (!empty($ar[1])) $time += intval($ar[1]) * 60;
       if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;
       $progress = round(($time/$duration) * 100);
       echo $progress;
    }

    progress.php final output was always 100, so it was easy with jquery to hide progress and show download button.

    BUT after changing ffmpeg.php with this command :

    $sCmd = "ffmpeg -loop 1 -r 1 -i ".$image." -i ".$music." -c:a copy -shortest video.avi 1> progress.txt";
    $proc = popen($sCmd." 2>&1", "r");

    progress.php output is different numbers above 100(thousands) and jquery can’t figure out ffmpeg process finished or not.

    How to get 100 when ffmpeg finishs working ? I think i need some changes in progress.php because final result in progress.txt is longer than before.

  • From jpg to animated gif

    12 mai 2016, par lleoun

    I’m desperate, I need to convert some jpg images into an animated gif.

    I’ve tried ffmpeg, but the result has a terrible quality.

    Also tried imagemagick, and the result looks great but it weights 511 KB !!

    Anyone please can tell me what to use or how to use the before applications to get a final animated gif with a normal quality and a normal weight for a gif ??

    As I said I’m desperate, I need to finish this asap :(

    Thanks a lot

  • Using JavaCV/FFMPEG to push byte buffer image via RTMP

    6 mai 2022, par ljnoah

    I have a USB camera that returns frames as a byte buffer type to which I would like to push/send via rtmp using JavaCV library to be viewed using VLC. According to this link : http://bytedeco.org/javacpp-presets/ffmpeg/apidocs/org/bytedeco/ffmpeg/ffmpeg.html. It should be possible, but I don't really have any experience with ffmpeg, but from what I've read in their github it should be possible, only, thus far I was not able to find an example on how to do it. Basically, I would like to store a byte buffer and send an image that is in variable instead of grabbing frames from a camera as my USB camera is not detected by android and needs external libraries to work.

    


    private byte[] FrameData = new byte[384 * 288 * 4];
  //private final Bitmap bitmap = Bitmap.createBitmap(PREVIEW_WIDTH, PREVIEW_HEIGHT, // Bitmap.Config.ARGB_8888); // creates a bitmap with the proper format in-case its needed
  private final IFrameCallback mIFrameCallback = new IFrameCallback() {
      @Override
      public void onFrame(final ByteBuffer frameData) {
          frameData.clear();
          frameData.get(FrameData, 0, frameData.capacity());
          }
  };


    


    This callback gives me the frames from my camera on the fly and writes it to FrameData, which I can compress to a bitmap if needed.

    


    My camera preview where I call the callback above :

    


      public void handleStartPreview(Object surface) {
      if ((mUVCCamera == null)) return;
      try {
          mUVCCamera.setPreviewSize(mWidth, mHeight, 1, 26, UVCCamera.DEFAULT_PREVIEW_MODE, UVCCamera.DEFAULT_BANDWIDTH, 0);
      } catch (IllegalArgumentException e) {
          try {
              mUVCCamera.setPreviewSize(mWidth, mHeight, 1, 26, UVCCamera.DEFAULT_PREVIEW_MODE, UVCCamera.DEFAULT_BANDWIDTH, 0);
              Log.e(TAG, "handleStartPreview4");
          } catch (IllegalArgumentException e1) {
              callOnError(e1);
              return;
          }
      }
      int result = mUVCCamera.startPreview();
      mUVCCamera.setFrameCallback(mIFrameCallback, UVCCamera.PIXEL_FORMAT_RGBX);
      mUVCCamera.startCapture();
      startRecording();
  }


    


    My question is How can I use this example :

    


     String ffmpeg = Loader.load(org.bytedeco.ffmpeg.ffmpeg.class);
 ProcessBuilder pb = new ProcessBuilder(ffmpeg, "-i", "/path/to/input.mp4", "-vcodec", "h264", "/path/to/output.mp4");
 pb.inheritIO().start().waitFor();


    


    to push my frames from the camera that are stored FrameData byte buffer via RTMP/RTSP to my server IP, even If I need to compress it to a bitmap before...