Recherche avancée

Médias (1)

Mot : - Tags -/berlin

Autres articles (104)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (11588)

  • ffmpeg and upload issue

    29 juillet 2015, par sonam Sharma

    hello please look at the code

      <?php
      session_start();
    include "conn.php";
    $sid = $_SESSION['id'];
      $ipIP=$_SERVER['REMOTE_ADDR'];
      $uploaddir = "mem/$sid/video/";

       //Check the file is of correct format.  
       function checkfile($input){
       $ext = array('mpg', 'wma', 'mov', 'flv', 'mp4', 'avi', 'qt', 'wmv', 'rm', 'mkv', 'MP4');
      $extfile = substr($input['name'],-4);
      $extfile = explode('.',$extfile);
      $good = array();
     @$extfile = $extfile[1];
      if(in_array($extfile, $ext)){
         $good['safe'] = true;
        $good['ext'] = $extfile;
    }else{
         $good['safe'] = false;
     }
        return $good;
    }

    // if the form was submitted process request if there is a file for uploading
    if(@$_FILES["profileimage99"]["size"] < 102400000000){
      //$live_dir is for videos after converted to flv
       $live_dir = "mem/$sid/video/";
     //$live_img is for the first frame thumbs.
       $live_img = "mem/$sid/img/";        
       $seed = rand(11111111111193,9999999999999929) * rand(3,9);
       $getEXT=substr(@$_FILES['profileimage99']['name'],-5);
       $upload = $seed.$getEXT;
       $uploadfile = $uploaddir .$upload;        

       $safe_file = checkfile(@$_FILES['profileimage99']);
       if($safe_file['safe'] == 1){
                   if (move_uploaded_file(@$_FILES['profileimage99']['tmp_name'], $uploadfile)) {
                   echo "Video uploaded.";

                   $base = basename($uploadfile, $safe_file['ext']);
                   $new_file = $base.'flv';
                   $new_image = $base.'jpg';
                   $new_image_path = $live_img.$new_image;
                   $new_flv = $live_dir.$new_file;

           require 'vendor/autoload.php';
           //ececute ffmpeg generate flv
           exec('ffmpeg -i '.$uploadfile.' -f flv -s 640x360 '.$new_flv.'');
           //execute ffmpeg and create thumb
           exec('ffmpeg  -i '.$uploadfile.' -f mjpeg -vframes 17 -s 426x240 -an '.$new_image_path.'');
           echo 'Thank You For Your Video!<br />';

       //create query to store video
       if(isset($_POST['title'])){$titlename=$_POST['title'];}else{$titlename='';}
       if(isset($_POST['desc'])){$desc=$_POST['desc'];}else{$desc='';}
       if(isset($_POST['catag'])){$catag=$_POST['catag'];}else{$catag='';}
       if(isset($_POST['channel'])){$channel=$_POST['channel'];}else{$channel='';}
       $dbentry_o=mysqli_query($conn,"insert into vids (uid,chid,ctid,vname,vdisc,duration,time,ip,src) values ('$sid','$channel','$catag','$titlename','$desc','00','00','$ipIP','$new_file')");
       echo "donr90909090";die;
            } else {
                   echo "Possible file upload attack!\n";
                   print_r($_FILES);
            }

       }else{

            echo 'Invalid File Type Please Try Again. You file must be of type
            .mpg, .wma, .mov, .flv, .mp4, .avi, .qt, .wmv, .rm'.$_FILES['profileimage99']['name'];

       }
    }else{
    echo 'Please choose a video';die;
    }
    ?>

    i am uploading a video by this code and gets error when uploaded fileseze is more then 20 or 30 mb the error says undefined $profileimage99 (i am uploading the file by ajax)

    i want the page to convert the file to such formats so that all the major browser supports us and the conversation time is also not very much as it takes a considerable time to just do the following task
    the main time taken by the page is by the ffmpeg code

    also please tell me is it good to use exec code in php ????

    Things that i want

    1.convert the video to flv,swf (other format if any which is supported by browesers )
    2.reduce the conversation time
    3.is it good to use exec here in php code
    4. take the frame (convert a jpg file out of the video) after half time of the video (like if the video is of 4 hrs then get the frame which is just after 2hrs)

    Please send me any link or related code or explain me something about ffmpeg

  • Merge commit '07a2b155949eb267cdfc7805f42c7b3375f9c7c5'

    21 octobre 2017, par James Almer
    Merge commit '07a2b155949eb267cdfc7805f42c7b3375f9c7c5'
    

    * commit '07a2b155949eb267cdfc7805f42c7b3375f9c7c5' :
    Bump major versions of all libraries

    A few API deprecated 2 years ago or more are also postponed here for
    varying reasons.

    FF_API_LOWRES :
    Since this functionality depends on AVStream->codec, i figure the two can
    be removed at the same time in the next bump or so.

    FF_API_AVCTX_TIMEBASE :
    Couldn't get this one to work. Not just libavcodec but apparently also
    libavformat and ffmpeg.c expect AVCodecContext->time_base to be set for
    decoding. Upon removal some tests report a different generic stream time
    base (like 1/25), and others lose packet duration values. I guess it's
    somehow tied to the AVStream->codec clusterfuck.
    It can be dealt with alongside FF_API_LAVF_AVCTX in the next bump.

    FF_API_OLD_FILTER_OPTS_ERROR :
    This one is meant to remain after FF_API_OLD_FILTER_OPTS is removed.
    Its purpose is displaying the corrected command line using the new syntax
    as a suggestion as part of the error message.

    Merged-by : James Almer <jamrial@gmail.com>

    • [DH] libavcodec/version.h
    • [DH] libavdevice/version.h
    • [DH] libavfilter/version.h
    • [DH] libavformat/version.h
    • [DH] libavresample/version.h
    • [DH] libavutil/version.h
    • [DH] libpostproc/version.h
    • [DH] libswresample/version.h
    • [DH] libswscale/version.h
    • [DH] tests/ref/fate/api-mjpeg-codec-param
    • [DH] tests/ref/fate/api-png-codec-param
  • Recording real-time video from images with FFmpeg

    17 juillet 2015, par Solarnum

    I am really not sure what else I could be doing to achieve this. I’m trying to record the actions in one of the views in my Android app so that it can be played back later and show the previous actions in real time. The major problem (among others, because there is no way I’m doing this optimally) is that the video takes at least 4 times longer to make than it does to playback. If I ask FFmpeg to create a 5 second video the process will run in the background for 20 seconds and output a greatly accelerated 5 second video.

    My current strategy is to use the -loop 1 parameter on a single image file and continuously write a jpeg to that image file. (If someone has a better idea than this for feeding continuously updated image information to FFmpeg let me know)

    encodingThread = new Thread(new Runnable() {
               private boolean running = true;
               @Override
               public void run() {
                   while (running) {
                       try {

                           Bitmap bitmap = makeBitmapFromView();

                           String filepath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/test.jpg";
                           File file = new File(filepath);
                           FileOutputStream fout = new FileOutputStream(file);
                           bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fout);
                           fout.flush();
                           fout.close();
                           Thread.sleep(50);
                       } catch (IOException e) {
                           e.printStackTrace();
                       } catch (InterruptedException e) {
                           running = false;
                       }
                   }
               }
           });
           startVideoMaking();
           encodingThread.start();

    The startVideoMaking method is as follows :

    private void startVideoMaking(){
       ffmpeg.killRunningProcesses();
               File outputFile = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/testout.mp4");
               String path = Environment.getExternalStorageDirectory().getAbsolutePath() + "/test.jpg";
               String output = Environment.getExternalStorageDirectory().getAbsolutePath() + "/testout.mp4";

               String command = "-loop 1 -t 5 -re -i " + path + " -c:v libx264 -loglevel verbose -vsync 0 -threads 0 -preset ultrafast -tune zerolatency -y -pix_fmt yuv420p " + output;
               executeFFM(command);
    }

    Just to make it clear, the FFmpeg command that I am executing is

    ffmpeg -loop 1 -re -i /storage/emulated/0/test.jpg -t 5 -c:v libx264 -loglevel verbose -vsync 0 -threads 0 -preset ultrafast -tune zerolatency -y -pix_fmt yuv420p /storage/emulated/0/testout.mp4

    The makeBitmapFromView() method takes about 50ms to process and writing the bitmap to the sd card takes around 200ms, which is not great.

    I’m pretty lost as to what other solutions there would be to creating a video of a single view in Android. I know there is the MediaCodec class, but I couldn’t get that to work and also it would raise my minimum sdk, which is not ideal. I’m also not sure that the MediaCodec class would even solve my problem.

    Is there some way that I can get FFmpeg to create a 5 second video that is equivalent to 5 seconds of real time ? I have also tried converting a single image, without updating it’s content continuously and had the same results.

    If my question isn’t clear enough let me know.