Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (98)

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

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (7080)

  • FFMPEG Combine multiple commands into one script

    16 février 2017, par ObeeWnn

    I need some help combining ffmpeg commands into a python or bash script :

    \Download
    Youtube-dl URL

    \Concatenate videos

    WD = "C:\"
    import glob
    files = glob.glob ('*.mp4')
    with open ('output.txt', 'w') as in_files:
       for eachfile in files: in_files.write('file \''+eachfile+'\'\n')

    ffmpeg -y -f concat -i output.txt -c copy input.mp4

    \Encode
    ffmpeg -y -threads 16 -i input.mp4 -c:a libfdk_aac -vbr 4 -c:v libx264 intermediate1.ts
    ffmpeg -y -threads 16 -i endscreen720.mp4 -c:a libfdk_aac -vbr 4 -c:v libx264 intermediate2.ts
    ffmpeg -y -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc tmp.mp4
    ffmpeg -y -i tmp.mp4 -itsoffset 00:00:20 -i lt1sub.avi -filter_complex overlay tmp1.mp4
    ffmpeg -y -i tmp1.mp4 -i intro.avi -filter_complex overlay tmp1a.mp4
    ffmpeg -y -i tmp1a.mp4 -i watermarkfile720.png -filter_complex "[0:v]drawtext=enable='between(n,30,116)' : 'fontfile=/Windows/Fonts/arial.ttf':text='TEXTGOESHERE':fontcolor=white:fontsize=50:x=150:y=(300)+th[text]; [text][1:v]overlay[filtered]" -map "[filtered]" -map 0:a -codec:v libx264 -codec:a copy tmp2.mp4
    ffmpeg -y -i tmp2.mp4 -r 60 -vf scale=1920:1080 output.mp4


    \Create Thumbnail
    ffmpeg -y -i tmp1.mp4 -vf drawtext="fontfile=/Windows/Fonts/arial.ttf': text='':fontcolor=white@1.0:fontsize=120:y=0:x=100" -ss 00:00:12 -vframes 1 out.png

    set /p input= Video #

    ffmpeg -y -i out.png  -i tnOverlay.png -filter_complex overlay,drawtext="fontfile=/Windows/Fonts/arial.ttf': text="%input%":fontcolor=white@1.0:fontsize=120:y=25:x=1190" out.png

    This is to download videos, place an intro video in the beginning, draw text over intro, concatenate the videos, apply watermark throughout video, apply outro, create thumbnail, etc.
    My FFmpeg compile :

    ffmpeg version N-83522-g6a37abc59a Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 6.3.0 (Rev1, Built by MSYS2 project)
     configuration:  --enable-avisynth --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-cuda --enable-cuvid --enable-schannel --enable-sdl2 --enable-decklink --enable-fontconfig --enable-frei0r --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmfx --enable-libmodplug --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwavpack --enable-libwebp --enable-libxavs --enable-libxvid --enable-libzimg --enable-openssl --enable-libsnappy --enable-gpl --enable-opencl --enable-opengl --enable-libcdio --enable-libfdk-aac --enable-libkvazaar --enable-librubberband --enable-libssh --enable-libtesseract --enable-libzvbi --enable-chromaprint --enable-libopenh264 --enable-libopenmpt --enable-netcdf --disable-w32threads --enable-version3 --enable-nonfree --enable-filter=frei0r --disable-debug
     libavutil      55. 47.100 / 55. 47.100
     libavcodec     57. 80.100 / 57. 80.100
     libavformat    57. 66.102 / 57. 66.102
     libavdevice    57.  2.100 / 57.  2.100
     libavfilter     6. 73.100 /  6. 73.100
     libswscale      4.  3.101 /  4.  3.101
     libswresample   2.  4.100 /  2.  4.100
     libpostproc    54.  2.100 / 54.  2.100

    Would like to use libfdk-aac and x264, or highest quality possible. The video source will be at 720p60fps and will be rendered to 1080p60fps.

  • youtube-dl sometime hangs with "[ffmpeg] Correcting container"

    20 mai 2018, par user292344

    Ubuntu 16.04

    /usr/local/bin/youtube-dl --version
    2018.05.09

    I have a bash script that attemts to download a youtube video. The output is below. The problem is that sometimes it works perfectly (completes quickly).
    But most of the time it hangs on "Correcting container....". Does anyone know why ?

    + /usr/local/bin/youtube-dl --verbose -x 'https://www.youtube.com/watch?v=8HVWitAW-Qg'

    [debug] System config: []

    [debug] User config: []

    [debug] Custom config: []

    [debug] Command-line args: [u'--verbose', u'-x', u'https://www.youtube.com/watch?v=8HVWitAW-Qg']

    [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8

    [debug] youtube-dl version 2018.05.09

    [debug] Python version 2.7.12 (CPython) - Linux-4.4.0-124-generic-x86_64-with-Ubuntu-16.04-xenial

    [debug] exe versions: avconv 2.8.14-0ubuntu0.16.04.1, avprobe 2.8.14-0ubuntu0.16.04.1, ffmpeg 2.8.14-0ubuntu0.16.04.1, ffprobe 2.8.14-0ubuntu0.16.04.1, rtmpdump 2.4

    [debug] Proxy map: {}

    [youtube] 8HVWitAW-Qg: Downloading webpage

    [youtube] 8HVWitAW-Qg: Downloading video info webpage

    [youtube] 8HVWitAW-Qg: Extracting video information

    [debug] Invoking downloader on u'https://r5---sn-5uaeznkl.googlevideo.com/videoplayback?expire=1526159728&source=youtube&key=yt6&mime=audio%2Fmp4&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cusequic%2Cexpire&keepalive=yes&lmt=1518142590597815&dur=231.131&mv=m&mt=1526137933&ms=au%2Conr&signature=18BB34F3716B412AC5757872DD2AF402B6EE20D2.43D2E68B5A5ED2E2D3076DF9264B9BB723484821&ip=71.81.217.251&c=WEB&initcwndbps=1583750&mn=sn-5uaeznkl%2Csn-p5qs7n7l&clen=3671757&gir=yes&id=o-AOxj8Rg2IuZek8KwvgPy-N7_FSGzxQ0Zl2HX1T4gepLf&ipbits=0&fvip=5&ei=EAX3WqbOH8fg4QSlkrGoAg&pl=20&mm=31%2C26&itag=140&usequic=no&requiressl=yes&ratebypass=yes'

    [download] Destination: Top 10 cute kitten videos compilation-8HVWitAW-Qg.m4a

    [download] 100% of 3.50MiB in 00:00

    [ffmpeg] Correcting container in "Top 10 cute kitten videos compilation-8HVWitAW-Qg.m4a"

    [debug] ffmpeg command line: avconv -y -i 'file:Top 10 cute kitten videos compilation-8HVWitAW-Qg.m4a' -c copy -f mp4 'file:Top 10 cute kitten videos compilation-8HVWitAW-Qg.temp.m4a'

    ^C
    ERROR: Interrupted by user
  • FFMPEG MP4 conversion takes so long its not practical

    30 avril 2018, par Chrisco420365

    I want to start out by saying that I’m not just stating the fact that FFMPEG to MP4 conversion is so slow, but I’m hoping someone here can help me with this as I’ve searched around and haven’t really found out what to do in order to fix my problem.

    So I found a script that seems to do the job for me, it inputs several video file formats and will in turn convert to MP4 which I will later allow the web user to watch online.

    Two main things are done in this script by FFMPEG, a still image is captured in .jpg format and the video is converted to MP4. After some tweaking the script seems to work but at first I thought that it wasn’t working, that it was simply halting my server.

    Let me back up for a minute... I am using FFMPEG on my development server, which is really just my crappy laptop with XAMPP installed on Windows 10 and only 2GB of RAM. Once I have the site working perfectly I will move from my crappy laptop development environment to probably a entry level dedicated server hosting plan from Godaddy or other, since at first I expect the traffic to my website to be very low.

    The problem I am having is I am testing out the script that I will show you, and even with a 10MB video, it takes over 2 minutes to finish. Meanwhile the upload progress bar shows 100% since the upload is in fact complete, but no message for the user to know that something is going on behind the scenes. Obviously that I can figure out how to fix myself, maybe even just put a message letting them know that it will be a few minutes. When I tried a video that is 120MB, it took over 5 minutes which means I had to not only modify my php.ini file to allow for such script execution times, but it also makes it so that I can do nothing on the website while this is happening.

    Not only can I not even so much as scroll the page up or down, but if I try to open another tab and load my website it just sits there with a blank screen as if its trying to access my site. Obviously it’s because FFMPEG is using up all system resources during its conversion of the video file. If I open file explorer and click once on the video file that is being created, and continue clicking once on it I’ll see the file size of this file slowly get larger and larger, which is obvious since the file is being filled. This problem of course is with no users on it other than myself since its in its development stage, so I wonder what it will be like on a dedicated server with users online. Will the other users not be able to do anything for however many minutes until whoever is uploading a video has their video finished ?

    Should it be necessary for me to increase the max execution time in the php.ini file to more than 5 minutes for a 120MB file ? What will happen if a user tries to upload a file larger than 120MB ? Should I cut them off at 500MB perhaps ?

    I love the fact that my users will be able to upload videos and I can get thumbnails and even convert to MP4 to display using HTML5 but not thrilled if noone, including the user uploading the video, can use the site as the system resources are pegged. The last time I uploaded a video on YouTube I think I remember a message saying that it would take several minutes to finish but I don’t remember the website just completely stopping for several minutes. Perhaps this is because I’m running on my insignificant laptop ?

    While searching for answers to this I did come across some people complaining about it being slow but didn’t find any solutions and in fact don’t think I saw people saying it completely locked up the website until finished. As I said, I’d hate for others not to be able to get to my website or be kicked off simply because someone is uploading a video.

    Perhaps this is a common issue that can be resolved with a powerful enough dedicated server once I move to production ? I would greatly appreciate any and all suggestions on how to resolve this so the user may at least continue using other areas of our website, while the conversion is taking place. I can send them an alert once the conversion is finished. If there are any suggestions as to a minimum dedicated server specs that would help alleviate this from happening, I am all ears ! :) Thanks !

    Here is the script that I’m currently using :

    <?php
    include_once($_SERVER['DOCUMENT_ROOT'].'/includes/dbc.php');
    // size input prevents buffer overrun exploits.
      function sizeinput($input, $len){
           (int)$len;
        (string)$input;
        $n = substr($input, 0,$len);
        $ret = trim($n);
        $out = htmlentities($ret, ENT_QUOTES);
        return $out;
    }

    //Check the file is of correct format.  
    function checkfile($input){
       $ext = array('mpg', 'wma', 'mov', 'flv', 'mp4', 'avi', 'qt', 'wmv', 'rm');
       $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;
    }

    $user_id = $_SESSION['user_id'];
    // if the form was submitted process request if there is a file for uploading
    if($_POST && array_key_exists("vid_file", $_FILES)){
                              //$uploaddir is for videos before conversion
                             $uploaddir = 'temp/';
                              //$live_dir is for videos after converted to flv
           $live_dir = 'library/';
                               //$live_img is for the first frame thumbs.
           $live_img = 'thumbs/';      
                              $seed = time();      
           $upload = $seed;
           $uploadfile = 'temp/'.$upload.'.mp4';        
           $vid_title = sizeinput($_POST['vidTitle'], 50);
           $vid_title = sanitizeString($vid_title);
           $vid_desc = sizeinput($_POST['vidDesc'], 2000);
           $vid_desc = sanitizeString($vid_desc);
           $vid_cat = (int)$_POST['vidCat'];
           $safe_file = checkfile($_FILES['vid_file']);
           if($safe_file['safe'] == 1){
               if (move_uploaded_file($_FILES['vid_file']['tmp_name'], 'temp/'.$upload.'.mp4')) {
                      echo "File was successfully uploaded.<br />";
                       //$base = basename($uploadfile, $safe_file['ext']);
                       $new_file = $seed.'.mp4';
                       $new_image = $seed.'.jpg';
                       $new_image_path = "thumbs/".$seed.'.jpg';
                       $new_flv = "library/".$new_file;
                       //exec('ffmpeg -i '.$uploadfile.' -an -ss 00:00:01-r 1 -vframes 1 -f mjpeg -y '.$new_image_path);
                       exec('ffmpeg  -i '.$uploadfile.' -f mjpeg -vframes 1 -s 300x300 -an '.$new_image_path.'');
                       //ececute ffmpeg generate flv
                         exec('ffmpeg -i '.$uploadfile.' -f mp4 '.$new_flv);
                          //execute ffmpeg and create thumb


               echo 'Thank You For Your Video!<br />';
                          //create query to store video

           $sql = "INSERT INTO videos (`user_id`, `title`,`desc`, `file`, `thumb`) VALUES('".$user_id."','".$vid_title."','".$vid_desc."','".$new_file."','".$new_image."')";


                       echo '<img src="http://stackoverflow.com/feeds/tag/&#039;.$new_image_path.&#039;" style='max-width: 300px; max-height: 300px' /><br />
                             <h3>'.$vid_title.'</h3>';
                       mysqli_query($link, $sql) or die(mysqli_error($mysql));
                } 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';

           }
    }
    ?>