Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (28)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (4951)

  • Mute parts of Wave file using Python/FFMPEG/Pydub

    20 avril 2020, par Adil Azeem

    I am new to Python, please bear with me. I have been able to get so far with the help of Google/StackOverflow and youtube :). So I have a long (2 hours) *.wav file. I want to mute certain parts of that file. I have all of those [start], [stop] timestamps in the "Timestamps.txt" file in seconds. Like this :

    



       0001.000 0003.000
   0744.096 0747.096
   0749.003 0750.653
   0750.934 0753.170
   0753.210 0754.990
   0756.075 0759.075
   0760.096 0763.096
   0810.016 0811.016
   0815.849 0816.849


    



    What I have been able to do is read the file and isolate each tuple. I have just output the first tuple and printed it to check if everything looks good. It seems that the isolation of tuple works :) I plan to count the number of tuples (which is 674 in this case) and put in a 'for loop' according to that count and change the start and stop time according to the tuple. Perform the loop on that single *.wav file and output on file with muted sections as the timestamps. I have no idea how to implement my thinking with FFMPEG or any other utility in Python e.g pydub. Please help me.

    



       with open('Timestamps.txt') as f:
   data = [line.split() for line in f.readlines()]
   out = [(float(k), float(v)) for k, v in data]

   r = out[0] 
   x= r[0]
   y= r[1]
   #specific x and y values
   print(x)
   print(y)


    


  • imageJpeg and FFMPEG in windows vs linux

    25 janvier 2020, par Tanmay Gawankar

    I have a working code for converting image to a 5 seconds video using FFMPEG.

    The problem is, The code only works for downloaded images, FFMPEG doesn’t convert image to video when image is generated programmatically ONLY IN LINUX.

    PHP code

    <?php
       $downloadedF="folder/d.jpg";
       $downloadedV="folder/d.mp4";
       $renderedF="folder/r.jpg";
       $renderedV="folder/r.mp4";

       $op_d=shell_exec("ffmpeg -r 1/5 -i ".$downloadedF." -c:v libx264 -vf fps=25 -pix_fmt yuv420p ".$downloadedV);
       $op_r=shell_exec("ffmpeg -r 1/5 -i ".$renderedF." -c:v libx264 -vf fps=25 -pix_fmt yuv420p ".$renderedV);

       echo "Errors:<br />".$op_d."<br /><br />".$op_r;
    ?>

    The d.mp4(or output for downloaded image) is getting generated for both Windows and Linux
    The r.mp4(or output for rendered image) gets generated only in Windows and 48 bytes empty file is getting created in Linux

    System :

    XAMPP on Windows 10(Development)
    Godaddy Starter plan hosting - Linux(Probably redhat)(Production)

    File Structure

    root folder
       |-index.php
       |-ffmpeg (will be ffmpeg.exe in Windows)
       |-folder
           |-d.jpg (random downloaded image from google)
           |-d.mp4 (Will be created - video converted from downloaded image)
           |-r.jpg (rendered image using php imagejpg)
           |-r.mp4 (Will be created - video converted from rendered image)

    Rendered Image Code :

    $imgFF = imagecreatetruecolor($videoWidth, $videoHeight);
    //---adding many text using imagettftext();
    imagejpeg($imgFF, $path."-000.jpg");  //for this example, I copied output to folder as r.jpg

    Edit 1 :

    The return value of shell_exec has no error/output even after adding

    error_reporting(E_ALL);
    ini_set('display_errors', 1);

    Edit 2 :

    The log for successful conversion can be found at Here
    The log for unsuccessful conversion of rendered image can be found at Here

    Note :

    • The scenario here is minimized and code is separated from long code.
    • In Linux command i add ./ for FFMPEG

  • Converting multiple RTP Streams into gRPC Stream

    20 janvier 2020, par GJ.

    I am receiving multiple RTP streams(g711 ulaw/alaw) which may be coming on TCP or UDP, I want to terminate the RTP and get the raw media from the RTP stream and stream it to a different destination by using Google gRPC protocol.

    Currently I have a RTP processing engine which does this and give me the raw stream from RTP stack which i further stream to gRPC destination, but this solution does not scale beyond 1000 streams on one host and is difficult to maintain.

    I want to replace this with some highly scalable solution where i can scale to several thousand of streams and does not need to be maintained.

    I am exploring option to Use ffmpeg / gstreamer for getting raw packets from RTP stream. Not sure how scalable it would be and how do i get hold of the stream so that i can stream it over gRPC.

    I have following questions :

    1. Is this good option to use ffmpeg / gstreamer for this purpose.
    2. How do i work with multiple streams any suggestions or sample.
    3. Any details about the scalability of ffmpeg / gstreamer.
    4. I plan to use Java for my application, which java wrapper would be good e.g. Xuggle / ffmpeg-cli-wrapper for ffmpeg.