Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (46)

  • 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 (5264)

  • website performance issues when using ffmpeg on separate server

    10 décembre 2018, par Rich

    I am currently working on a site that uses wordpress and ffmpeg. I have it setup so that I have 3 servers - main, database, ffmpeg. So far I have it all working, however I am still running into issues when I am trying to encode a video.

    Whenever I start encoding a video, if I try opening any other links in a new tab, it gets stuck on loading until ffmpeg is done. I dont understand why, since im using multiple servers.

    My specs for my servers —

    Main (web server) - 4 vCPUs / 8GB RAM / 160GB Disk

    Database server - 2 vCPUs / 4GB RAM / 80GB Disk

    Ffmpeg server - 8 vCPUs / 32GB / 640GB Disk

    They are all in the same region as well, and I have private IPs as public for them. Public IPs uses IPv4.

    On my template page I have a form that the users fills out and uploads images, then using ajax it sends the info to my ffmpeg functions in my functions.php file.

    Images are uploaded to the main server and then on that server in my functions.php file I use ssh2 to login to the ffmpeg server and run different commands, for example —

    $server   = "FFMPEG SERVER IP"; // server IP/hostname of the SSH server
    $username = "user"; // username for the user you are connecting as on the SSH server
    $password = "pass"; // password for the user you are connecting as on the SSH server
    // Establish a connection to the SSH Server. Port is the second param.
    $connection = ssh2_connect($server, 22);
    // Authenticate with the SSH server
    ssh2_auth_password($connection, $username, $password);
    $sftp = ssh2_sftp($connection);
    ssh2_sftp_mkdir($sftp, $thepathw);

    $command = '/usr/local/bin/ffmpeg -threads 1 -i '.$thepath .'/audio.mp3 -safe 0 -f concat -i '.$thepath.'/paths.txt -vf "scale=1280:720,setsar=1" -pix_fmt yuv420p -c:a aac -af "volume=-5dB" -c:v libx264 -movflags +faststart '.$fixedtime.' -y '.$output.' 2>&1';

    // Execute a command on the connected server and capture the response
    $stream = ssh2_exec($connection, $command);
    // Sets blocking mode on the stream
    stream_set_blocking($stream, true);
    // Get the response of the executed command in a human readable form
    $output1 = stream_get_contents($stream);
    // echo output
    echo $output1;

    The video file that is created is then saved to the ffmpeg server.

    This all works as should and Im able to create videos, but the rest of the site doesnt seem to respond/load until ffmpeg is done. This is a big problem since I plan on having multiple users at once on the site.

    So how can I improve this setup so that the ffmpeg server doesnt slow down the main server, and multiple users can safely use the site ?

    Im also open to the idea of getting another server to upload my images to, instead of on the main. Im not sure if that would help though cause it seems like a lot of pulling/sending data between multiple sources/IPs may slow down the response time.

    Any suggestions is appreciated, thanks.

  • Use ffmpeg to compile RGBA image sequence into two separate videos (RGB + Alpha)

    27 novembre 2018, par MirceaKitsune

    I plan on using Blender to render animated sequences for a game. I need the videos to have transparent backgrounds in the format expected by its engine. This format involves the transparency being defined as a separate grayscale video of equal FPS and duration. Since splitting the RGB and Alpha channels in Blender is more complicated, I’d prefer doing this directly from ffmpeg.

    The input directory contains an image sequence of png files in RGBA format (eg : 0000.png to 0100.png). What I need ffmpeg to do is compile them into two separate videos : One containing only the RGB channels (leave transparency black) and another containing only the grayscale alpha channel. In the end I’d have something like my_video.mp4 + my_video_mask.mp4.

    I’m familiar with compiling non-transparent image sequences into video using :

    ffmpeg -f image2 -i /path/to/sequence/%04d.png output.mp4

    But I don’t know how to extract the alpha channel and make it a separate video file. What is the simplest ffmpeg command to achieve this result ?

  • Windows ffmpeg batch to find folder containing VOBs, concatenate and convert, move to next folder [on hold]

    27 novembre 2018, par Daniel Cooper

    All,

    I am in need of help that is beyond my capabilities. I need to run a batch command in Windows that finds VOB files in a folder, concatenates and converts them using ffmpeg, and then continues the recursive search for more folders containing VOBs.

    The idea is that the cmd file would be copied into the root that the command should look under when running. I have found commands that find VOBs and I have found ffmpeg scripts that concatenate and convert, but combining these functionalities together in the way I need is proving above my level.

    Thank you all in advance.

    EDIT :
    The computer I am running this code on is off the network so I had to manually retype. Any typo’s here are therefore likely from the retyping since the codes seem to function as intended originally...

    This code creates a list of folders that contain VTS*.VOB (as opposed to just all *.VOBs because that would include a certain useless VOB that is present in each folder).

    for /r %%a in (.) do @if exist "%%~fa\VTS*.VOB" echo %%~fa >> folderlist.txt

    This piece combines VTS*.VOBs and then converts them to MP4

    @ECHO OFF
    md ffmpeg_output
    for %%f in (VTS*.VOB) do echo file '%%f' >> filelist.txt
    ffmpeg -f concat -i filelist.txt -c copy "ffmpeg_output\Total.VOB"
    ffmpeg -i "ffmpeg_output\Total.VOB" -c:v libx264 -pix_fmt yuv420p -c:a copy "ffmpeg_output\Converted.mp4"

    I attempted to essentially nest the for loops with the idea that the first snippet above would produce a txt file, which I could then "for /f" through each line to direct the second snippet of code for concatenation and conversion of the VOB files. However this plan never got off the ground as I am unable to figure out the viability or syntax of nesting for loops in this way.