Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (93)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

Sur d’autres sites (3361)

  • Custom real-time input for ffmpeg in C

    10 août 2016, par Victor.dMdB

    I’m implementing a custom io with avformat_alloc_context and avio_alloc_context to be able to read the output of another function in real-time. A buffer is populated by this function in a boost asio thread, while ffmpeg is reading this buffer from another thread.

    I initialise an io buffer where this function writes into, and which ffmpeg reads :

    BufferData input_buffer = {0};
    input_buffer.size = 65536;
    input_buffer.ptr = (uint8_t *) av_malloc(buf_size);
    memset(input_buffer.ptr,'0',100);

    fprintf(stdout, "initialisation: buffer pointer %p buffer data pointer: %p\n", &input_buffer, input_buffer.ptr);

    Why i do the memset is explained here.
    Then to test out the pointer address I did :

    BufferData * decode_buffer;
    decode_buffer->size = 65536;
    decode_buffer->ptr = (uint8_t *) av_malloc(decode_buffer->size);

    AVIOContext * av_io_ctx = avio_alloc_context(decode_buffer->ptr, decode_buffer->size, 0, &input_buffer, &read_function, NULL, NULL);

    AVFormatContext *av_fmt_ctx = avformat_alloc_context();
    av_fmt_ctx->pb = av_io_ctx;


    BufferData * tmpPtr = (BufferData * ) video_input_file->av_io_ctx->opaque;

    fprintf(stdout, "video decoder before: buffer pointer %p, buffer data pointer: %p\n", tmpPtr, tmpPtr->ptr);

    open_res = avformat_open_input(&av_fmt_ctx, "anyname", in_fmt, options ? &options : NULL);

    fprintf(stdout, "video decoder after: buffer pointer %p, buffer data pointer: %p\n", tmpPtr, tmpPtr->ptr);

    For reference

    typedef struct {
       uint8_t *ptr;
       size_t size;
    } BufferData;

    The read function

    static int read_function(void* opaque, uint8_t* buf, int buf_size) {
       BufferData *bd = (BufferData *) opaque;
       buf_size = FFMIN(buf_size, bd->size);
       memcpy(buf, bd->ptr, buf_size);
       bd->ptr  += buf_size; //This seemed to cause the problem
       bd->size -= buf_size;
       return buf_size;
    }

    And the result will be :

    initialisation: buffer pointer 0x7f2c4a613620, buffer data pointer: 0x7f2c48c56040

    video decoder before: buffer pointer 0x7f2c4a613620, buffer data pointer: 0x7f2c48c56040

    video decoder after: buffer pointer 0x7f2c4a613620, buffer data pointer: 0x7f2c49e24b50

    Is it a normal behaviour that the buffer data ptr is changed by avformat_open_input ? since I would like to keep the initial pointer address given I am using it in another function, and have malloced it the required memory.

  • How to plot animated time series in R ?

    28 août 2016, par pOrlando

    I am trying use the ’animation’ package in R to plot an animated time series.

    My dataset consists of a time vector and a value vector, each with 1800 rows.

    I keep getting an error message after running the loop which reads :

    Error in jpeg(gname[i]) : unable to start jpeg() device
    In addition: Warning messages:
    1: In jpeg(gname[i]) : unable to open file 'g11:30:00.jpg' for writing
    2: In jpeg(gname[i]) : opening device failed

    Here’s the source code

    timemax<-1800
    setwd("~/Documents/Animation/")
    graphdata<-read.csv("filling_line_data_construction_v2.csv")
    attach(graphdata)
    gname<-paste("g",time, ".jpg", sep="")
    for (i in 1:timemax){
       jpeg(gname[i])
       plot(time[1],value[1],type="l",ylim=c(0,35), xlim=c(0,100),
         ylim = c(0, 35),ylab = "", xlab="time")
       lines(time[1:i],value[1:i])
       dev.off(dev.cur())
    }

    The end goal is to string together these 1800 plots as a stop animation video by calling the ffmpeg shell :

    shell("C:/ffmpeg/bin/ffmpeg.exe -report -i g%d.jpg -b:v 2048k fillin_lineR.mpg",mustWork=FALSE)

    This is code that I’ve been trying to adapt from http://www.animatedgraphs.co.uk/LondonR.html#slide-30, but this example uses a .tif file instead of .jpg, and my computer gives me 1800 error messages when trying to make a video from .tif files...

    Thanks in advance !

  • Add watermark to all videos in a folder and enable it only during certain time intervals

    20 octobre 2016, par Neo Herakles

    I’m making a batch file to watermark all my videos in a folder using FFMPEG, I have to place the watermark at 1/3 of the duration of the video, I currently have this, it worked individually but I can’t seem to make it work for the whole folder, what am I doing wrong ? Also, is there a way to enable the watermark multiple times ? once at 1/3 of the duration, another at 2/3 of the duration.

    @echo off
    setlocal
    for %%I in ("%~dp0\water\*.mp4") do (
      for /F "delims=" %%I in ('ffprobe.exe -v error -show_entries format^=duration -of default^=noprint_wrappers^=1:nokey^=1 %%I.mp4 2^>^&1') do set "duration=%%I"
      'ffmpeg.exe -i "%%I" -i Watermark.png -filter_complex "[0:v]scale=iw:ih[v0];[1:v][v0]scale2ref=iw/6:ih/10[logo][0v];[0v][logo]overlay=W-w-3:H-h-3:enable='between(t,%duration%/3,(%duration%/3)+2)'[v]" -map "[v]" -map 0:a -codec:v libx264 -preset ultrafast -crf 23 -codec:a copy "%~dp0\out\%%~nI.mp4"'
    )
    endlocal
    pause

    Thanks a lot for all the help I’ve received during these days, it really helped me to improve, although I still have a long way to go.