Recherche avancée

Médias (3)

Mot : - Tags -/Valkaama

Autres articles (22)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (4871)

  • PHP shell_exec wait for script to done ? [duplicate]

    6 mars 2016, par Melih Büyükbayram

    This question already has an answer here :

    I have a PHP script that queries a database for a list of jobs to be done and fires off other PHP scripts based on what it finds in the database (basically a process queue).

    Some of the scripts that the queue runner script executes may take 30 seconds or so to finish running (convert video, resizing images, etc).

    The problem is that shell_exec() in the queue runner script calls the processing scripts, but then doesn’t wait for them to finish, resulting in the queue not being completed.

    Queue runner script :

    #!/usr/bin/php
    <?php
       // Loop through database and find jobs to be done
       shell_exec("nohup $command > /dev/null 2> /dev/null & echo $! &");
    ?>

    Running the job script directly from the command line works and the PDF is created.

    Any ideas on how to fix this ? Or a better way to run a process queue ?

  • 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 usage corrupts pointer to filenames

    1er décembre 2014, par user296612

    Say I have 2 files in a folder named ’jack.aac’ and ’jill.aac’, and I run the following script ;

    ls -f -tr *.aac |
    while read i; do
    echo $i
    done
    • I get ’jack.aac’ and ’jill.aac’ printed as expected. If however I include ’ffmpeg -i "$i" -f ffmetadata metadata.txt’ in the while-loop, the second filename to be ’read’ ends up missing a character - ’ack.aac’ (instead of ’jack.aac’) for instance. ffmpeg-usage somehow seems to alter the pointer-to-filenames value. Can anyone tell me how to get around this ?