Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (89)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

Sur d’autres sites (5331)

  • ffmpeg : How to get list of available codecs with PHP ?

    9 août 2013, par IIIOXIII

    Problem is, I am trying to convert (through php), a .3gp (or any video format) file to ogg.

    When I do not specify -vcodec and -acodec, the video is converted, but does not have any audio.

    I had read here and other places that I need to specify -acodec libvorbis, however, when I specify the codec as libvorbis, the conversion fails : video converts to 0byte file.

    Basically, I am trying to determine if the codec specified is actually part of the ffmpeg build I am using as a process of narrowing down my issue.

    Code that produces full length video without sound :

    $srcFile = 'anyvideo.3gp';
    $destFile = 'anyvideo.ogg';
    $ffmpegPath = 'path/to/ffmpeg.exe';
    $ffmpegObj = new ffmpeg_movie($srcFile);
    $srcWidth = makeMultipleTwo($ffmpegObj->getFrameWidth());
    $srcHeight = makeMultipleTwo($ffmpegObj->getFrameHeight());
    $srcFPS = $ffmpegObj->getFrameRate();
    $srcAB = intval($ffmpegObj->getAudioBitRate()/1000);
    $srcAR = $ffmpegObj->getAudioSampleRate();
    $srcLen = $ffmpegObj->getDuration();

    exec($ffmpegPath." -i ".$srcFile." -ar ".$srcAR." -s ".$srcWidth."x".$srcHeight." ". $destFile);

    And the code that produces 0byte file :

    exec($ffmpegPath." -i ".$srcFile." -acodec libvorbis -ar ".$srcAR." -s ".$srcWidth."x".$srcHeight." ".$destFile);

    So, my question is, how do I determine the codec's available to ffmpeg using PHP ? Can it even be done ?

    UPDATED - ANSWER BELOW

  • PHP and FFMPEG - Performing intelligent video conversion

    24 décembre 2012, par Andrew

    I have an oddly difficult task to perform. I thought it would be easy, but all my efforts have been fruitless.

    I'm converting videos uploaded to a php script from various formats (.avi, .mpg, .wmv, .mov, etc.) to a single .flv format. The conversion is working great but what I'm having trouble with is the resolution of the videos.

    This is the command I'm currently running (with PHP vars) :

    ffmpeg -i $original -ab 96k -b 700k -ar 44100 -s 640x480 -acodec mp3 $converted

    Both $original and $converted contain the full paths to those files. My problem is that this always converts to 640x480 (like I'm telling it to) even when the source is smaller. Obviously, this is a waste of disk space and bandwidth when the video is downloaded. Also, this doesn't account for input videos being in any aspect ratio other than 4:3, resulting in a "squished" conversion if I upload a 16:9 video.

    There are 3 things I need to do :

    1. Determine the aspect ratio of the original video.
    2. If not 4:3, pad top and bottom with black bars.
    3. Convert to 640x480 if either dimension of the original is larger or a 4:3 aspect ratio relating to the width/height of the original (whichever is closer to 640x480).

    I've run ffmpeg -i on a few videos, but I don't see a consistent format or location to find the original's resolution from. Once I'm able to figure that out, I know I can "do the math" to figure out the right size and specify padding to fix the aspect ratio with -padttop, -padbottom, etc.

  • Why do we need a buffer while converting AVFrame from one format to another ?

    2 mars 2016, par jsp99

    I am referring to this source code . The code snippets provided here are from lines (114-138) in the code . This is using the ffmpeg library . Can anyone explain why is the following code required in the program ?

    // Determine required buffer size and allocate buffer
    numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width,
                 pCodecCtx->height);
    buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));

    In a sense I understand that the following function is associating the destination frame to the buffer . But what is the necessity ?

    avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);  

    PS : I tried removing the buffer and compiling the program . It got compiled . But it is showing the following run time error .

    [swscaler @ 0xa06d0a0] bad dst image pointers
    Segmentation fault (core dumped)