Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

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

Autres articles (76)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (5659)

  • Revision b0c146eea9 : [svc] 1. Add two pass RC options in vp9_spatial_scalable_encoder. 2. Add r

    28 février 2014, par Minghai Shang

    Changed Paths :
     Modify /examples.mk


     Modify /examples/vp9_spatial_scalable_encoder.c


     Modify /vpx/exports_enc


     Modify /vpx/src/svc_encodeframe.c


     Modify /vpx/svc_context.h



    [svc] 1. Add two pass RC options in vp9_spatial_scalable_encoder.
    2. Add read/write for RC stats file
    The two pass RC for svc does not work yet. This is just the first
    step. We need further development to make it working.
    Change-Id : I8ef0e177dff0b5ed3c97a916beea5123717cc6f2

  • Video Encoding issue

    6 octobre 2014, par pbellema

    I’m making an app that records small videos and concatenates them together (like Vine).
    If I record a video without concatenation there are no problems.
    But if I assemble recordings, two problems appear : records disappear or they are cut out.

    When I start to record :

    private boolean prepareVideoRecorder(){
       if (mCamera != null) {
           mMediaRecorder = new MediaRecorder();

           Camera.Parameters p = mCamera.getParameters();

           CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_480P);

           // Step 1: Unlock and set camera to MediaRecorder
           mCamera.unlock();
           mMediaRecorder.setCamera(mCamera);

          //mMediaRecorder.setOrientationHint(90);

           Log.i("MY_LOG", "set preview display");


           mMediaRecorder.setMaxDuration(8000);

           // Step 2: Set sources
           mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
           mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);

           // Step 3: Set a CamcorderProfile (requires API Level 8 or higher)
           mMediaRecorder.setProfile(profile);




           mMediaRecorder.setVideoSize(profile.videoFrameWidth,profile.videoFrameHeight);

           // Step 4: Set output file
           mMediaRecorder.setOutputFile(getOutputMediaFile().toString());

           if (mFrontCamera) {

               mMediaRecorder.setPreviewDisplay(mFrontPreview.getHolder().getSurface());
           } else {
               mMediaRecorder.setPreviewDisplay(mBackPreview.getHolder().getSurface());
           }

           // Step 6: Prepare configured MediaRecorder
           try {
               mMediaRecorder.prepare();
           } catch (IllegalStateException e) {
               Log.d("MY_LOG", "IllegalStateException preparing MediaRecorder: " + e.getMessage());
               releaseMediaRecorder();
               return false;
           } catch (IOException e) {
               Log.d("MY_LOG", "IOException preparing MediaRecorder: " + e.getMessage());
               releaseMediaRecorder();
               return false;
           }
           return true;
       } else {
           Log.i("MY_LOG", "camera null");
           return false;
       }

    And when I stop :

    private void stopRecording(boolean forcedStop) {
       mRecording = false;
       try {
           mMediaRecorder.stop();
           releaseMediaRecorder();
           mCamera.lock();
           rotateVideo(mPaths.size() - 1, mFrontCamera);
          if (forcedStop) manageVideos(forcedStop);
       } catch (RuntimeException e) {
           Log.i("MY_LOG", "Exception" + e.toString());
       }
    }

    and when I finish, those are my concatenation functions :

    private void manageVideos(boolean forcedStop) {
       if (mPaths.size() > 1 || forcedStop) {
           String mediaStorageDirPath = Helper.getMediaStorageDirPath();
           String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
           final String path = mediaStorageDirPath + File.separator +
                   "APPEND_"+ timeStamp + ".mp4";

           finalVideo = path;
           ffmpegAppend(path);
       } else {
           finalVideo = mPaths.get(0);
           if (!isProcessingFFmpeg) {
               goToSubtitleFragment(finalVideo);
           }
       }
    }

    private void ffmpegAppend(String path) {
       String mediaStorageDirPath = Helper.getMediaStorageDirPath();
       String filePath = mediaStorageDirPath + File.separator + "append.txt";

       try {
           File f = new File(filePath);

           OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(f));
           BufferedWriter writer = new BufferedWriter(out);

           for (int i = 0; i < mPaths.size(); i++) {
               writer.write("file '" + mPaths.get(i) + "'");
               writer.newLine();
           }

           writer.close();

           String cmd = "ffmpeg -f concat -i " + filePath + " -c copy " + path;

           mCmd.add(cmd);

           manageCommands();

       } catch (Exception e) {

       }
    }

    private void manageCommands() {
       if (!isProcessingFFmpeg && mCmd.size() > 0) {
           new FFmpegTask().execute(mCmd.get(0));
       }
    }

    private class FFmpegTask extends AsyncTask {
       protected Integer doInBackground(String... cmd) {
           isProcessingFFmpeg = true;
           int fileCount = cmd.length;

           Processor p = new Processor(Helper.getEncodingLibraryPath(getActivity()), getActivity());

           for (String c : cmd) {
               String[] strArr = c.split(" ");
               p.process(strArr);
           }

           return fileCount;
       }

       protected void onProgressUpdate(Integer... progress) {

       }

       protected void onPostExecute(Integer result) {
           StackTraceElement[] ste = Thread.currentThread().getStackTrace();
           isProcessingFFmpeg = false;
           if (mCmd.size() > 0) {
               mCmd.remove(0);
           }
           if (mCmd.size() > 0) {
               new FFmpegTask().execute(mCmd.get(0));
           } else if (isFinished) {
               goToSubtitleFragment(finalVideo);
           }
       }
    }

    Do you see where the problems might be coming from ?
    Thanks to you.

  • rails / streamio-ffmpeg - How to execute 2-pass encoding ?

    20 mars 2017, par R4ttlesnake

    I’m using streamio-ffmpeg to encode videos uploaded to my Rails application via ffmpeg. I want to encode the videos to .webm-format using the VP9 coding format and the VP9 Encoding Guide of the WebM Project recommends using 2-pass encoding. I managed to get the videos encoding via streamio-ffmpeg using 1-pass encoding, but I can’t figure out how to handle the 2-pass encoding.

    Here my setup so far :

    # create two tempfiles for the video and a still
    video = Tempfile.new(["video", ".webm"], binmode: true)
    still = Tempfile.new(["still", ".jpg"], binmode: true)

    # new FFMPEG
    movie = FFMPEG::Movie.new(original.path)

    # extract still from video
    movie.screenshot(still.path)

    # encode video
    options = %w(-c:v libvpx-vp9 -b:v 1000K -threads 8 -speed 4 -tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -c:a libvorbis -b:a 64k -f webm)
    movie.transcode(video.path, options)

    The command to do a 2-pass encoding with ffmpeg would be :

    ffmpeg -i <source> -c:v libvpx-vp9 -pass 1 ... -f webm /dev/null
    ffmpeg -i <source> -c:v libvpx-vp9 -pass 2 ... -f output.webm
    </source></source>

    In particular, I don’t get how to pass the file of the first encoding step to the second step with streamio-ffmpeg. How would I apply these two steps to the syntax of movie.transcode(output, options) ?

    Thanks !