Recherche avancée

Médias (91)

Autres articles (110)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

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

  • dnn/vf_dnn_detect.c : add tensorflow output parse support

    6 mai 2021, par Ting Fu
    dnn/vf_dnn_detect.c : add tensorflow output parse support
    

    Testing model is tensorflow offical model in github repo, please refer
    https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md
    to download the detect model as you need.
    For example, local testing was carried on with 'ssd_mobilenet_v2_coco_2018_03_29.tar.gz', and
    used one image of dog in
    https://github.com/tensorflow/models/blob/master/research/object_detection/test_images/image1.jpg

    Testing command is :
    ./ffmpeg -i image1.jpg -vf dnn_detect=dnn_backend=tensorflow:input=image_tensor:output=\
    "num_detections&detection_scores&detection_classes&detection_boxes":model=ssd_mobilenet_v2_coco.pb,\
    showinfo -f null -

    We will see the result similar as below :
    [Parsed_showinfo_1 @ 0x33e65f0] side data - detection bounding boxes :
    [Parsed_showinfo_1 @ 0x33e65f0] source : ssd_mobilenet_v2_coco.pb
    [Parsed_showinfo_1 @ 0x33e65f0] index : 0, region : (382, 60) -> (1005, 593), label : 18, confidence : 9834/10000.
    [Parsed_showinfo_1 @ 0x33e65f0] index : 1, region : (12, 8) -> (328, 549), label : 18, confidence : 8555/10000.
    [Parsed_showinfo_1 @ 0x33e65f0] index : 2, region : (293, 7) -> (682, 458), label : 1, confidence : 8033/10000.
    [Parsed_showinfo_1 @ 0x33e65f0] index : 3, region : (342, 0) -> (690, 325), label : 1, confidence : 5878/10000.

    There are two boxes of dog with cores 94.05% & 93.45% and two boxes of person with scores 80.33% & 58.78%.

    Signed-off-by : Ting Fu <ting.fu@intel.com>
    Signed-off-by : Guo, Yejun <yejun.guo@intel.com>

    • [DH] libavfilter/vf_dnn_detect.c
  • php stream any mp4

    3 avril 2012, par GRaecuS

    I'm developing a web app that converts videos and allows to play them through Flowplayer.

    On the current status, I use ffmpeg to convert the videos to mp4 and qtfaststart to fix their metadata for streaming. Everything is working smoothly as I can download any converted mp4 and view it correctly.

    For serving the videos to Flowplayer, I use a php file which contains the following (summarized) code :

    header("Content-Type: {$mediatype}");

    if ( empty($_SERVER[&#39;HTTP_RANGE&#39;]) )
    {
       if ( $filetype == &#39;flv&#39; &amp;&amp; $seekPos != 0 )
       {
           header("Content-Length: " . ($filesize + 13));
           print(&#39;FLV&#39;);
           print(pack(&#39;C&#39;, 1));
           print(pack(&#39;C&#39;, 1));
           print(pack(&#39;N&#39;, 9));
           print(pack(&#39;N&#39;, 9));
       }
       else
       {          
           header("Content-Length: {$filesize}");
       }

       $fh = fopen($filepath, "rb") or die("Could not open file: {$filepath}");

       # seek to requested file position
       fseek($fh, $seekPos);

       # output file
       while(!feof($fh))
       {
           # output file without bandwidth limiting
           echo fread($fh, $filesize);
       }
       fclose($fh);
    }
    else //violes rfc2616, which requires ignoring  the header if it&#39;s invalid
    {  
       $fp = @fopen($file, &#39;rb&#39;);

       $size   = filesize($file); // File size
       $length = $size;           // Content length
       $start  = 0;               // Start byte
       $end    = $size - 1;       // End byte
       // Now that we&#39;ve gotten so far without errors we send the accept range header
       /* At the moment we only support single ranges.
        * Multiple ranges requires some more work to ensure it works correctly
        * and comply with the spesifications: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.2
        *
        * Multirange support annouces itself with:
        * header(&#39;Accept-Ranges: bytes&#39;);
        *
        * Multirange content must be sent with multipart/byteranges mediatype,
        * (mediatype = mimetype)
        * as well as a boundry header to indicate the various chunks of data.
        */
       header("Accept-Ranges: 0-$length");
       // header(&#39;Accept-Ranges: bytes&#39;);
       // multipart/byteranges
       // http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.2
       if (isset($_SERVER[&#39;HTTP_RANGE&#39;]))
       {
           $c_start = $start;
           $c_end   = $end;
           // Extract the range string
           list(, $range) = explode(&#39;=&#39;, $_SERVER[&#39;HTTP_RANGE&#39;], 2);
           // Make sure the client hasn&#39;t sent us a multibyte range
           if (strpos($range, &#39;,&#39;) !== false)
           {
               // (?) Shoud this be issued here, or should the first
               // range be used? Or should the header be ignored and
               // we output the whole content?
               header(&#39;HTTP/1.1 416 Requested Range Not Satisfiable&#39;);
               header("Content-Range: bytes $start-$end/$size");
               // (?) Echo some info to the client?
               exit;
           }
           // If the range starts with an &#39;-&#39; we start from the beginning
           // If not, we forward the file pointer
           // And make sure to get the end byte if spesified
           if ($range0 == &#39;-&#39;)
           {

               // The n-number of the last bytes is requested
               $c_start = $size - substr($range, 1);
           }
           else
           {
               $range  = explode(&#39;-&#39;, $range);
               $c_start = $range[0];
               $c_end   = (isset($range[1]) &amp;&amp; is_numeric($range[1])) ? $range[1] : $size;
           }
           /* Check the range and make sure it&#39;s treated according to the specs.
            * http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
            */
           // End bytes can not be larger than $end.
           $c_end = ($c_end > $end) ? $end : $c_end;
           // Validate the requested range and return an error if it&#39;s not correct.
           if ($c_start > $c_end || $c_start > $size - 1 || $c_end >= $size)
           {
               header(&#39;HTTP/1.1 416 Requested Range Not Satisfiable&#39;);
               header("Content-Range: bytes $start-$end/$size");
               // (?) Echo some info to the client?
               exit;
           }
           $start  = $c_start;
           $end    = $c_end;
           $length = $end - $start + 1; // Calculate new content length
           fseek($fp, $start);
           header(&#39;HTTP/1.1 206 Partial Content&#39;);
       }

       // Notify the client the byte range we&#39;ll be outputting
       header("Content-Range: bytes $start-$end/$size");
       header("Content-Length: $length");

       // Start buffered download
       $buffer = 1024 * 8;
       while(!feof($fp) &amp;&amp; ($p = ftell($fp)) &lt;= $end)
       {
           if ($p + $buffer > $end)
           {
               // In case we&#39;re only outputtin a chunk, make sure we don&#39;t
               // read past the length
               $buffer = $end - $p + 1;
           }
           set_time_limit(0); // Reset time limit for big files
           echo fread($fp, $buffer);
           flush(); // Free up memory. Otherwise large files will trigger PHP&#39;s memory limit.
       }

       fclose($fp);
    }

    Unfortunately, it is working only for the majority of the videos. For some of them, Flowplayer keeps returning Error 200, even though they were encoded correctly.

    How can I fix this ? Is it a coding problem or those videos are faulty ?

  • ffmpeg have unmet dependencies (Ubuntu20) [closed]

    10 août 2024, par mojiang

    when installing ffmpeg with ubuntu20(fosal), it have conflict dependencies :

    &#xA;

    # sudo apt-get install ffmpeg&#xA;Reading package lists... Done&#xA;Building dependency tree       &#xA;Reading state information... Done&#xA;Some packages could not be installed. This may mean that you have&#xA;requested an impossible situation or if you are using the unstable&#xA;distribution that some required packages have not yet been created&#xA;or been moved out of Incoming.&#xA;The following information may help to resolve the situation:&#xA;&#xA;The following packages have unmet dependencies:&#xA; ffmpeg : Depends: libavdevice58 (= 7:4.2.7-0ubuntu0.1) but it is not going to be installed&#xA;          Depends: libavfilter7 (= 7:4.2.7-0ubuntu0.1)&#xA;          Depends: libavformat58 (= 7:4.2.7-0ubuntu0.1) but it is not going to be installed&#xA;E: Unable to correct problems, you have held broken packages.&#xA;

    &#xA;

    I solved it by install the reason of conflit library with a specific version, may be someone will need the solution.

    &#xA;

    step 1. fix-broken

    &#xA;

    sudo apt --fix-broken install&#xA;Reading package lists... Done&#xA;Building dependency tree       &#xA;Reading state information... Done&#xA;

    &#xA;

    step2. find the reason of unmet dependencies :

    &#xA;

    # sudo apt install libavdevice58=7:4.2.7-0ubuntu0.1 libavfilter7=7:4.2.7-0ubuntu0.1 libavformat58=7:4.2.7-0ubuntu0.1&#xA;Reading package lists... Done&#xA;Building dependency tree       &#xA;Reading state information... Done&#xA;Some packages could not be installed. This may mean that you have&#xA;requested an impossible situation or if you are using the unstable&#xA;distribution that some required packages have not yet been created&#xA;or been moved out of Incoming.&#xA;The following information may help to resolve the situation:&#xA;&#xA;The following packages have unmet dependencies:&#xA; libavformat58 : Depends: libchromaprint1 (>= 1.3.2) but it is not going to be installed&#xA;E: Unable to correct problems, you have held broken packages.&#xA;

    &#xA;

    Here the problem is from libchromaprint1

    &#xA;

    step3. find candidate versions of libchromaprint1(conflict reason)

    &#xA;

    # apt-cache policy libchromaprint1&#xA;libchromaprint1:&#xA;  Installed: (none)&#xA;  Candidate: 1.5.1-1~20.04.sav0&#xA;  Version table:&#xA;     1.5.1-1~20.04.sav0 500&#xA;        500 http://ppa.launchpad.net/savoury1/multimedia/ubuntu focal/main amd64 Packages&#xA;     1.4.3-3build1 500&#xA;        500 http://mirrors.cloud.aliyuncs.com/ubuntu focal/universe amd64 Packages&#xA;        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages&#xA;

    &#xA;

    step4. install the old version of libchromaprint1 to solve the conflicts

    &#xA;

    # sudo apt install libchromaprint1=1.4.3-3build1&#xA;Reading package lists... Done&#xA;Building dependency tree       &#xA;Reading state information... Done&#xA;The following NEW packages will be installed:&#xA;  libchromaprint1&#xA;0 upgraded, 1 newly installed, 0 to remove and 223 not upgraded.&#xA;Need to get 37.6 kB of archives.&#xA;

    &#xA;

    step5. reinstall ffmpeg

    &#xA;

    # sudo apt install ffmpeg&#xA;Reading package lists... Done&#xA;Building dependency tree       &#xA;Reading state information... Done&#xA;

    &#xA;

    Done. the reason of conflict is that the latest version of libraries have conflict, by install old version of the conflicted ones to solve it.

    &#xA;