Recherche avancée

Médias (0)

Mot : - Tags -/organisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (111)

  • 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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

Sur d’autres sites (11560)

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