Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (40)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (4317)

  • Is it possible to generate a keyframe to start a spliced H.264 video segment ?

    3 janvier 2015, par Ethan T

    When segmenting files with ffmpeg, I am currently only able to splice on keyframe boundaries if I don’t want to reencode. This presents issues if I want to control timing down to a specific frame. To my knowledge, you can only start on a keyframe if you’re performing a stream copy. If you want to start on an arbitrary frame, you must reencode.

    However, for codecs that ffmpeg understands (like H.264), it seems like it would be technically possible to replace the desired first frame with a newly created keyframe without reencoding the rest of the video. This would represent a "smart copy" sort of behavior. For example, say my video consists of these frames and types :

    Frame number:  0         1         2         3
                  0123456789012345678901234567890123
    Frame type:    IppbppbppbppbIppbppbppbppbIppbppbp
    Keyframes:     ^            ^            ^

    (I frames are keyframes while p and b frames are not)

    Currently, if I want to remove the first few frames and start on exactly frame 20, I must reencode the entire stream beginning with that input frame. This would cause an undesired degradation in quality. Instead, if I perform a copy, ffmpeg would begin at the most recent keyframe :

    Frame number:  0         1         2         3
                  0123456789012345678901234567890123
    Frame type:    IppbppbppbppbIppbppbppbppbIppbppbp
    Desired start:                     ^
    Actual start:               ^

    Why can’t ffmpeg seek to frame 13 (the last complete keyframe prior to the cut point), fully calculate frame 20, and recreate frame 20 as an I frame ? It would then copy the remaining frames as before. Like this :

    Frame number:  0         1         2         3
                  0123456789012345678901234567890123
    Input type:    IppbppbppbppbIppbppbppbppbIppbppbp
    Output type:                       IpbppbIppbppbp

    It seems like this would be a very useful feature for splicing videos without losing quality. Is there any technical barrier (e.g. the H.264 spec or any other common codec) that prevents this approach ?

  • ffmpeg change video stream resolution

    10 décembre 2014, par skorpionet

    I have an MKV with a video stream with wrong resolution of 1920x800, but the inside film is 1920x1080 so my main video player, an LG Smart TV, shows a flattened image. I can easily change resolution in container metadata but LG TV ignores this data and read only video stream data.

    First question : only way to change video stream resolution data is scale the video ?

    To scale with ffmpeg I used this command :

    ffmpeg -i input.mkv -map 0 -c:a copy -c:s copy -c:v libx264 -preset slow -crf 17 -vf scale=1920:1080,setdar=16/9 output.mkv

    Now the mkv is fine, my LG TV read it, looks awesome but..... size went from 3,3Gb to 12Gb !!
    Overall bit rate of 3,3Gb video is 2.704 Kbps, 12Gb is 9.829 Kbps. I think that 7000Kbps more are useless, in original video there aren’t info to raise quality.

    Second question : Why this huge size change ? What is my mistake ?

    Best Regards

  • Improve ffmpeg performance

    8 décembre 2014, par hitesh

    I am using ffmpeg to take screen shot from video , it is video from CDN.

    I am doing below steps

    1.Upload video to CDN using html file tag.

    2.Get CDN url and use it for creating screen shot using ffmpeg.

    3.Upload the screenshot in CDN.

    4.Save video and screenshot CDN url to DB

    the whole process is really time consuming, even if I put loader it is really slow.

    This is code of POC I did for ffmpeg :

    $imageFile = realpath("./videos") . '/test5.png';
    $imageFile2 = realpath("./videos") . '/test6.png';
    $size = "230x155";
    $getfromsecond = 8;

    if (isEnabled('shell_exec')) {
       echo "Shall_exec is enabled " . "<br />";
       shell_exec('echo "hello world"');
       echo "<br />";
    } else {
       echo "shall exec command is not allowed";
    }

    $cmd = "ffmpeg -i $vid -an -ss $getfromsecond -s $size -vframes 1 $imageFile";
    $cmd2 = "ffmpeg -i $remoteVideo -an -ss $getfromsecond -s $size -vframes 1 $imageFile2";

    echo 'command 1 - local Image : ' . $cmd . "<br />";
    echo 'command 2 - remote video : ' . $cmd2 . "<br />";
    echo "<br />command 2 - remote video shell_exec output : " . shell_exec($cmd) . "<br />";
    echo '<br />command 2 - remote video shell_exec output : ' . shell_exec($cmd2) . "<br />";

    if (!shell_exec($cmd)) {
       echo " video Thumbnail created" . "<br />";
    } else {
       echo "Error Creating video thumbnail" . "<br />";
    }
    if (!shell_exec($cmd2)) {
       echo "Remote video Thumbnail created" . "<br />";
    } else {
       echo "Error Creating Remote video thumbnail" . "<br />";
    }

    function isEnabled($func) {
       return is_callable($func) &amp;&amp; false === stripos(ini_get('disable_functions'), $func);
    }  

    Is there some way to improve ffmpeg performance ?

    Thanks