Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (70)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Diogene : création de masques spécifiques de formulaires d’édition de contenus

    26 octobre 2010, par

    Diogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
    A quoi sert ce plugin
    Création de masques de formulaires
    Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
    Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (6858)

  • ffmpeg - Encoding Percentage in PHP

    13 juillet 2012, 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 have always struggled with the regexes and maths, and 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.

  • avformat_close_input memory leak ?

    20 janvier 2021, par Keen Jackdaw

    I developed an app to push live stream with ffmpeg. When I checked the app with leaks --atExit -- <the app="app"></the> (I'm on mac), I found some memory leak with AVFormatContext.

    &#xA;

    The minimized code are provided below :

    &#xA;

    #include <iostream>&#xA;&#xA;extern "C" {&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavdevice></libavdevice>avdevice.h>&#xA;}&#xA;&#xA;void foo() {&#xA;    avdevice_register_all();&#xA;&#xA;    AVFormatContext *avInputFormatContext = avformat_alloc_context();&#xA;    AVInputFormat *avInputFormat = av_find_input_format("avfoundation");&#xA;    std::cout &lt;&lt; "open input" &lt;&lt; std::endl;&#xA;    int ret = avformat_open_input(&amp;avInputFormatContext, "Capture screen 0", avInputFormat, nullptr);&#xA;    if (ret &lt; 0) { std::cout &lt;&lt; "open input failed: " &lt;&lt; ret &lt;&lt; std::endl; return;}&#xA;&#xA;    avformat_close_input(&amp;avInputFormatContext);&#xA;&#xA;}&#xA;&#xA;int main() {&#xA;    foo();&#xA;    return 0;&#xA;}&#xA;&#xA;</iostream>

    &#xA;

    The output is

    &#xA;

    Process:         ffmpegtest [87726]&#xA;Path:            /Users/USER/*/ffmpegtest&#xA;Load Address:    0x10a752000&#xA;Identifier:      ffmpegtest&#xA;Version:         ???&#xA;Code Type:       X86-64&#xA;Platform:        macOS&#xA;Parent Process:  leaks [87725]&#xA;&#xA;Date/Time:       2021-01-20 15:44:57.533 &#x2B;0800&#xA;Launch Time:     2021-01-20 15:44:55.760 &#x2B;0800&#xA;OS Version:      macOS 11.1 (20C69)&#xA;Report Version:  7&#xA;Analysis Tool:   /Applications/Xcode.app/Contents/Developer/usr/bin/leaks&#xA;Analysis Tool Version:  Xcode 12.3 (12C33)&#xA;&#xA;Physical footprint:         9.9M&#xA;Physical footprint (peak):  10.6M&#xA;----&#xA;&#xA;leaks Report Version: 4.0&#xA;Process 87726: 14143 nodes malloced for 2638 KB&#xA;Process 87726: 1 leak for 32 total leaked bytes.&#xA;&#xA;    1 (32 bytes) ROOT LEAK: 0x7f8c61e1b040 [32]  length: 16  "Capture screen 0"&#xA;

    &#xA;

    Did I miss something ?

    &#xA;

  • split videos with ffmpeg

    23 novembre 2020, par 5Diraptor

    I'm trying to create a script that scans a directory, and for all videos larger then X size, splits them down into smaller chunks.

    &#xA;

    There are two similar questions :

    &#xA;

    &#xA;

    Neither of these work in the way I want. The first you have to manually input every file that you want to process. The second doesn't check for filesize, or output the files in the way I want.

    &#xA;

    So far, this is the contents of the .bat file :

    &#xA;

    %~d1&#xA;&#xA;for %%a in (*.MOV) do (&#xA;&#xA;if %%~za GTR 2000000000 (&#xA;&#xA;REM usage %%a <filename>&#xA;set "_filename=%~n1"&#xA;set "_tally=.SPLIT-%03d"&#xA;set "_extension=%~x1"&#xA;&#xA;set "_outputname=%_filename%%_tally%%_extension%"&#xA;&#xA;&#xA;    ffmpeg -i "%%a" ^&#xA;        -crf 0 -c copy -map 0 -segment_time 00:00:30 -f segment -reset_timestamps 1 ^&#xA;        %_outputname%&#xA;)&#xA;)&#xA;pause&#xA;</filename>

    &#xA;

    My aim is for the script to work in the following way :

    &#xA;

      &#xA;
    1. Drag a video (from a folder of videos) onto the .bat file.
    2. &#xA;

    3. Script opens up, and targets each file ending .MOV, and is greater then 2GB
    4. &#xA;

    5. ffmpeg splits the video down into >2GB chunks. (I know it's currently split down in 30 second chunks, still working on understanding how to use the -fs parameter).
    6. &#xA;

    7. Each chunk gets saved with the original filename and extension, but the filename is suffixed with ".SPLIT" and then a unique number that relates to which file it is - first file is 000 and second is 001 etc.
    8. &#xA;

    &#xA;

    Problems :

    &#xA;

      &#xA;
    • Firstly, I want to split by filesize and not time, but I don't understand how to use the -fs parameter in this case. I guess I could use something like ffprobe -i input.file -show_format -v quiet | sed -n &#x27;s/duration=//p&#x27; in conjunction with it but I'm not confident...
    • &#xA;

    • Secondly, I'm getting a problem with %03d in the .bat. Think I'm mixing up languages ? It retrieves the filepath of the .bat file instead of counting number of loops.
    • &#xA;

    &#xA;

    Any help really appreciated !

    &#xA;