Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (100)

  • MediaSPIP en mode privé (Intranet)

    17 septembre 2013, par

    À partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
    Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
    Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)

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

  • 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 (12228)

  • FFmpeg - generate x264 CBR video transport stream with C-API

    6 juillet 2020, par ZeroDefect

    Using various posts sprinkled around the Internet, including this one here on SO, I've been able to understand how to use the FFmpeg cli to generate a CBR video bitrate using the x264 codec (wrapped in an MPEG-2 transport stream). Note : I'm concerned with the video bitrate - nothing else.

    


    ffmpeg -i cbr_test_file_input.mp4 -c:v libx264 -pix_fmt yuv420p -b:v 6000000 -preset fast -tune film -g 25 -x264-params vbv-maxrate=6000:vbv-bufsize=6000:force-cfr=1:nal-hrd=cbr -flags +ildct+ilme x264_cbr_test_output.ts


    


    However, I'm trying to approach this from an FFmpeg C-API point of view. I'm having issues. I've knocked together some code to try do something very similar to what is being done in the FFmpeg CLI. I can generate a transport stream of what I think should be CBR, but the profile of the video bitrate is very different from what I thought was the FFmpeg cli equivalent :

    


    The initialisation of the AVCodecContext looks something like :

    


          av_dict_set(&amp;pDict, "preset", "faster", 0);&#xA;      av_dict_set(&amp;pDict, "tune", "film", 0);&#xA;      av_dict_set_int(&amp;pDict, "rc-lookahead", 25, 0);&#xA;&#xA;      pCdcCtxOut->width = pCdcCtxIn->width;&#xA;      pCdcCtxOut->height = pCdcCtxIn->height;&#xA;      pCdcCtxOut->pix_fmt = AV_PIX_FMT_YUV420P;&#xA;      pCdcCtxOut->gop_size = 25;&#xA;&#xA;      // Going for 6Mbit/s&#xA;      pCdcCtxOut->bit_rate = 6000000;&#xA;      //pCdcCtxOut->rc_min_rate = pCdcCtxOut->bit_rate;&#xA;      pCdcCtxOut->rc_max_rate = pCdcCtxOut->bit_rate;&#xA;      pCdcCtxOut->rc_buffer_size = pCdcCtxOut->bit_rate;&#xA;      pCdcCtxOut->rc_initial_buffer_occupancy = static_cast<int>((pCdcCtxOut->bit_rate * 9) / 10);&#xA;&#xA;      std::string strParams = "vbv-maxrate="&#xA;                              &#x2B; std::to_string(pCdcCtxOut->bit_rate / 1000)&#xA;                              &#x2B; ":vbv-bufsize="&#xA;                              &#x2B; std::to_string(pCdcCtxOut->bit_rate / 1000)&#xA;                              &#x2B; ":force-cfr=1:nal-hrd=cbr";&#xA;&#xA;      av_dict_set(&amp;pDict, "x264-params", strParams.c_str(), 0);&#xA;&#xA;      pCdcCtxOut->field_order = AV_FIELD_TT;&#xA;      pCdcCtxOut->flags = (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME | AV_CODEC_FLAG_CLOSED_GOP);&#xA;&#xA;      // WARN: Make some assumptions here!&#xA;      pCdcCtxOut->time_base = AVRational{1,25};&#xA;      pCdcCtxOut->framerate = AVRational{25,1};&#xA;      pCdcCtxOut->sample_aspect_ratio = AVRational{64,45};&#xA;</int>

    &#xA;

    The output graphs appear very different :

    &#xA;

    FFmpeg CLI output

    &#xA;

    Above is the FFmpeg CLI output - video bitrate holds fairly steady.

    &#xA;

    enter image description here

    &#xA;

    Above is the output of my sample application - some significant dips in the video bitrate.

    &#xA;

    I've taken this a step further and created a git repo consisting of :

    &#xA;

      &#xA;
    • Code of sample application
    • &#xA;

    • Test input file (.mp4)
    • &#xA;

    • Outputs (.ts file) of tests
    • &#xA;

    • Graphs of output bitrates.
    • &#xA;

    &#xA;

  • FFmpeg subtitle filter set start time

    31 décembre 2020, par CasualDemon

    I am trying to burn-in subtitles for a shorter section of a video, but using the subtitles filter always starts from the beginning of the subtitle stream, not at the specified start time, even when copying from the same video.

    &#xA;

    So for example if I start an encode 10 minutes in to a film, the video will properly be set from there, but the subtitles will start from the beginning (10 minute offset in this case).

    &#xA;

    ffmpeg -y -ss 600.0 -to 660.0 -i movie.mkv -filter_complex "[0:0]subtitles=&#x27;movie.mkv&#x27;:si=1[v]" -map "[v]" -c:v libx265 -crf 22 output.mkv&#xA;

    &#xA;

    This is not a problem when using picture based subtitles and the overlay filter, such as :

    &#xA;

    -filter_complex "[0:0][0:2]overlay[v]"&#xA;

    &#xA;

    It seems to only affect text based subtitles. I don't know if this is just not possible and will require another solution, or if I am approaching it wrong. Any help is appreciated !

    &#xA;

  • FFMpeg + Beanstalk : How to pass the processes to it

    14 juillet 2012, par Ilia Rostovtsev

    I'm working around on the video web site ! I have a simple PHP function that is used to start complicated conversion processes. The problem is that FFMpeg and Mencoder are extremely resourceful and having one process of it is something that makes httpd slow down but multiple processes just hang it completely. I want to my conversion processes with Beanstalk (or anything else). Everything is working well right now : converting, logging and etc.

    My concrete question is : How to transfer my current jobs to Beanstalk ?

    I have very simple PHP code :

    RunInBackground(&#39;convert.php&#39;, array($initial_file_name, $vid), $LogFilePath);

    And the function looks also quite clear :

    function RunInBackground($sPHPFile, $aParam = array(), $sLogFile = &#39;&#39;)
    {
       global $config;

       $sCmd = $config[&#39;phppath&#39;] . &#39; &#39; . $config[&#39;BASE_DIR&#39;] . &#39;/&#39; . $sPHPFile;
       foreach ($aParam as $s)
       {
           $sCmd .= &#39; &#39; . $s;
       }


           $sCmd .= &#39; > &#39; . ($sLogFile != &#39;&#39; ? $config[&#39;BASE_DIR&#39;] . &#39;/&#39; . $sLogFile : &#39;/dev/null&#39;);

           if ( iBgProc($sCmd) )
           {
               return true;
           }
           else
           {
               return false;
           }

    }

    function iBgProc($sCmd, $iPrio = 0)
    {
       if ($iPrio)
       {
           $iPID = shell_exec("nohup nice -n $iPrio $sCmd 2> /dev/null &amp; echo $!");
       }
       else
       {
           $iPID = shell_exec("nohup $sCmd 2> /dev/null &amp; echo $!");
       }

       return($iPID);
    }

    Now what would Beanstalk correct code would look like so these processes would NOT start all at the same time if multiple videos are uploaded ?

    If you believe that for my needs is better to use something else but Beanstalk and you know how to implement it, I would be still happy to see it !

    Thanks !