Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (52)

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

Sur d’autres sites (4660)

  • Automatic encoder selection failed for output stream #0:1

    9 juin 2018, par Rafael Lima

    I’m trying to use ffmpeg for edit some videos on android...
    It is working fine but if I try to use drawtext i get error

    the command is :

    path/ffmpeg -y -i /path/asd.mp4 -map 0 -segment_time 15 -f segment -c:v libx264 -preset veryfast -crf 30 -vf "drawtext=text='test message ':fontfile=/path/arial.ttf:box=1:boxborderw=30:boxcolor=0xE86F67@0.7:fix_bounds=true:fontcolor=0x2A363B:fontsize=32:x=0:y=h" -r 30 -force_key_frames expr:gte(t,n_forced*15) -an /path/temp%03d.mp4

    and the error is :

    ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
     built with Android (4691093 based on r316199) clang version 6.0.2 (https://android.googlesource.com/toolchain/clang 183abd29fc496f55536e7d904e0abae47888fc7f) (https://android.googlesource.com/toolchain/llvm 34361f192e41ed6e4e8f9aca80a4ea7e9856f327) (based on LLVM 6.0.2svn)
    configuration: --prefix=/home/rafa/Desktop/m4/build --target-os=linux --arch=i686 --cpu=i686 --cross-prefix=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/i686-linux-android- --enable-cross-compile --cc=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/clang --cxx=/home/rafa/Desktop/m4/ndk/toolchain/i686/bin/clang++ --sysroot=/home/rafa/Desktop/m4/ndk/toolchain/i686/sysroot --pkg-config=/usr/bin/pkg-config --pkg-config-flags=--static --enable-pic --enable-gpl --enable-nonfree --enable-static --disable-shared --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-doc --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libx264 --enable-libfdk-aac --enable-bsf=aac_adtstoasc --enable-librtmp --enable-zlib --enable-libfreetype --enable-openssl --enable-libfontconfig --disable-asm --disable-devices --extra-cflags=-mno-stackrealign
     libavutil      56. 14.100 / 56. 14.100
    libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavdevice    58.  3.100 / 58.  3.100
        libavfilter     7. 16.100 /  7. 16.100
       libswscale      5.  1.100 /  5.  1.100
        libswresample   3.  1.100 /  3.  1.100
        libpostproc    55.  1.100 / 55.  1.100



      major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        title           : 20180226 174005
        artist          : Rafael Lima
        date            : 2018
        encoder         : Lavf55.49.100
        comment         : https://www.youtube.com/watch?v=bkzc9mLyCyo
      Duration: 00:03:26.94, start: 0.000000, bitrate: 4156 kb/s
        Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 4025 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
        Metadata:
          handler_name    : VideoHandler
        Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
        Metadata:
          handler_name    : SoundHandler
    Automatic encoder selection failed for output stream #0:1. Default encoder for format segment (codec none) is probably disabled. Please choose an encoder manually.
    Error selecting an encoder for stream 0:1

    things to considere :
    1. I’ve checked 3 times all the paths are valid
    2. I’ve tested the same command on ffmpeg 4.0 on windows and it works [with the same video]
    3. If I remove the drawtext filter it works fine...

    I tought it ffmpeg was built without drawtext or with some error so i spent 10 days in order to build it bymyself and guarantee every dependency is ok... but at end i got the same error

    does anyone have any idea please

    ==============================
    UPDATE

    I keep testing and if I remove the quotes from the filter and use a text without spacing it works

    ex :
    drawtext=text='test_message':fontfile=/path/arial.ttf:box=1:boxborderw=30:boxcolor=0xE86F67@0.7:fix_bounds=true:fontcolor=0x2A363B:fontsize=32:x=0:y=h

    so I believe there is something related to how android is escapes quotes and simple quotes because i compiled ffmpeg with same parameters and it runs on ubuntu with spaces at the text (just need to use simple quotes)

    does anyone know about it ?

  • ffmpeg scaling not working for video

    15 mai 2018, par Neer Patel

    I am trying to change the dimensions of the video file through FFMPEG.
    I want to convert any video file to 480*360 .

    This is the command that I am using...

    ffmpeg -i oldVideo.mp4 -vf scale=480:360 newVideo.mp4

    After this command 1280*720 dimensions are converted to 640*360.

    I have also attached video. it will take less than minute for any experts out there. Is there anything wrong ?

    You can see here. (in Video, after 20 seconds, direclty jump to 1:35 , rest is just processing time).

    UPDATE :

    I found the command from this tutorial

  • 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';

           }
    }
    ?>