Recherche avancée

Médias (91)

Autres articles (10)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

Sur d’autres sites (3322)

  • ffmpeg - extract exact number of frames from video

    29 mars 2017, par Michael B

    I want to create a maximum of 30 images from a video (and tile them for a sprite sheet).

    I’ve tried using the ’select’ with ’mod’ but if the total number of frames does not fit neatly into the desired number of images (30) then I sometimes end up with more images, sometimes less.

    For example if my video is 72 frames long, my ’mod’ would be 72 / 30, which is 2.4.

    I’m running this from a python script so i’m doing something like the following for the filter :

    select='not(mod(n\," + str(mod) + "))'

    I think the mod has to be an integer (?) so I could either round down and use 2 which gives me 36 images or round up which gives me 24 images

    Whats the best way to get exactly 30 ? - obviously the interval wouldn’t be identical but thats fine.

    Maybe I could use a for loop to generate a list of the frames closest to the desired interval and then pass that in as the select filter ?

    e.g. to get the frames I would do something like this :

    nframes = 72 # number of frames in video
    outImages = 30 # number of images I want
    mod = float(nframes) / outImages # 2.4

    frames = []

    idx = 1

    while i < nframes:
       print str(idx) + ": " + str(math.floor(i+0.5))
       frames.append(int(math.floor(i+0.5)))
       idx += 1
       i += mod

    Then am I able to pass that (the frames list) into the ffmpeg command ? Or can I tell ffmpeg to do something similar ?

  • ffmpeg Progress Bar - Encoding Percentage in PHP

    11 juillet 2016, par Jimbo

    I’ve written a whole system in PHP and bash on the server to convert and stream videos in HTML5 on my VPS. The conversion is done by ffmpeg in the background and the contents is output to block.txt.

    Having looked at the following posts :

    Can ffmpeg show a progress bar ?

    and

    ffmpeg video encoding progress bar

    amongst others, I can’t find a working example.

    I need to grab the currently encoded progress as a percentage.

    The first post I linked above gives :

    $log = @file_get_contents('block.txt');

    preg_match("/Duration:([^,]+)/", $log, $matches);
    list($hours,$minutes,$seconds,$mili) = split(":",$matches[1]);
    $seconds = (($hours * 3600) + ($minutes * 60) + $seconds);
    $seconds = round($seconds);

    $page = join("",file("$txt"));
    $kw = explode("time=", $page);
    $last = array_pop($kw);
    $values = explode(' ', $last);
    $curTime = round($values[0]);
    $percent_extracted = round((($curTime * 100)/($seconds)));

    echo $percent_extracted;

    The $percent_extracted variable echoes zero, and as maths is not my strong point, I really don’t know how to progress here.

    Here’s one line from the ffmpeg output from block.txt (if it’s helpful)

    time=00:19:25.16 bitrate= 823.0kbits/s frame=27963 fps= 7 q=0.0 size=
    117085kB time=00:19:25.33 bitrate= 823.1kbits/s frame=27967 fps= 7
    q=0.0 size= 117085kB time=00:19:25.49 bitrate= 823.0kbits/s
    frame=27971 fps= 7 q=0.0 size= 117126kB

    Please help me output this percentage, once done I can create my own progress bar. Thanks.

  • ffmpeg Progress Bar - Encoding Percentage in PHP

    24 mars 2019, par Jimbo

    I’ve written a whole system in PHP and bash on the server to convert and stream videos in HTML5 on my VPS. The conversion is done by ffmpeg in the background and the contents is output to block.txt.

    Having looked at the following posts :

    Can ffmpeg show a progress bar ?

    and

    ffmpeg video encoding progress bar

    amongst others, I can’t find a working example.

    I need to grab the currently encoded progress as a percentage.

    The first post I linked above gives :

    $log = @file_get_contents('block.txt');

    preg_match("/Duration:([^,]+)/", $log, $matches);
    list($hours,$minutes,$seconds,$mili) = split(":",$matches[1]);
    $seconds = (($hours * 3600) + ($minutes * 60) + $seconds);
    $seconds = round($seconds);

    $page = join("",file("$txt"));
    $kw = explode("time=", $page);
    $last = array_pop($kw);
    $values = explode(' ', $last);
    $curTime = round($values[0]);
    $percent_extracted = round((($curTime * 100)/($seconds)));

    echo $percent_extracted;

    The $percent_extracted variable echoes zero, and as maths is not my strong point, I really don’t know how to progress here.

    Here’s one line from the ffmpeg output from block.txt (if it’s helpful)

    time=00:19:25.16 bitrate= 823.0kbits/s frame=27963 fps= 7 q=0.0 size=
    117085kB time=00:19:25.33 bitrate= 823.1kbits/s frame=27967 fps= 7
    q=0.0 size= 117085kB time=00:19:25.49 bitrate= 823.0kbits/s
    frame=27971 fps= 7 q=0.0 size= 117126kB

    Please help me output this percentage, once done I can create my own progress bar. Thanks.