Recherche avancée

Médias (91)

Autres articles (64)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

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

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (4349)

  • unable to successfully close ffmpeg stream in node.js

    25 septembre 2022, par K. Russell Smith

    i'm trying to write a node video app that generates frames using the canvas api (via node-canvas, the project's only npm dependancy right now), and writes it to ffmpeg via a stream to generate a video :

    


    const { createCanvas } = require('canvas');
const { spawn } = require('child_process');
const fs = require('fs');
const canvas = createCanvas(1280, 720);

const ffmpeg = spawn('ffmpeg', [
    '-y',
    '-f', 'rawVideo',
    '-vcodec', 'rawVideo',
    '-pix_fmt', 'rgb24',
    '-s', `${ canvas.width }x${ canvas.height }`,
    '-r', '40',
    '-i', '-', '-f', 'mp4',
    '-q:v', '5',
    '-an', '-vcodec', 'mpeg4', 'output.mp4',
]);

const ctx = canvas.getContext('2d');
ctx.font = '30px Prime';
ctx.fillStyle = 'blue';
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.fillText('Hello Canvas', canvas.width / 2, canvas.height / 2);

for (let i = 0; i < 250; ++i)
{
    console.log(i);
    ffmpeg.stdin.write(Buffer.from(ctx.getImageData(0, 0, canvas.width, canvas.height).data));
}
ffmpeg.stdin.end();


    


    unfortunately, when i run it, the program throws this after writing the frames :

    


    node:events:368
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:98:16)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:164:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}

Node.js v17.1.0


    


    what am i doing wrong ?

    


  • FFmpeg command to draw text hindi font is working fine in windows command prompt but Batch script and simple CPP program in NOT working

    1er juillet 2022, par Abdullah Farweez

    Below ffmpeg command in working fine in command prompt

    


    ffmpeg -i video.mp4 -filter_complex "drawtext=fontfile=Khula-regular.ttf:fontsize=60:fontcolor=blue:text=अगला एपिसोड देखने के लिए जल्दी से फॉलो करें:x=30:y=200" output.mp4


    


    giving expected result
enter image description here

    


    But if we run it as a bat file, it is not giving the expected output

    


        ::bat script start 
    @echo off
    ffmpeg -i video.mp4 -filter_complex "drawtext=fontfile=Khula-Regular.ttf:fontsize=60:fontcolor=blue:text=अगला एपिसोड देखने के लिए जल्दी से फॉलो करें:x=30:y=200" output.mp4
:: bat script end


    


    This the CPP program which calling the ffmpeg command via system method

    


    #include <iostream>&#xA;#include <cstring>&#xA;#include &#xA;&#xA;using namespace std;&#xA;&#xA;int main()&#xA;{&#xA;  string command = "ffmpeg.exe -i video.mp4 -filter_complex \"drawtext=fontfile=Khula-Regular.ttf:fontsize=60:fontcolor=yellow:text=अगला एपिसोड देखने के लिए जल्दी से फॉलो करें:x=30:y=200\" output.mp4";&#xA;  system(command.c_str());&#xA;  return 0;&#xA;}&#xA;</cstring></iostream>

    &#xA;

    same behavior as bat script.

    &#xA;

    screenshot of the output video.&#xA;enter image description here

    &#xA;

    Here is the additional information for the references

    &#xA;

    Folder structure

    &#xA;

    .&#xA;|-- Khula-Regular.ttf&#xA;|-- cpp_program.exe&#xA;|-- command.cpp&#xA;|-- ffmpeg.exe&#xA;|-- ffplay.exe&#xA;|-- ffprobe.exe&#xA;|-- output.mp4&#xA;|-- run.bat&#xA;`-- video.mp4&#xA;&#xA;C:\bin&#xA;

    &#xA;

    FFmpeg info

    &#xA;

    $ ffmpeg&#xA;ffmpeg version N-107262-g4454142782-20220628 Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 11.2.0 (crosstool-NG 1.24.0.533_681aaef)&#xA;  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220628&#xA;  libavutil      57. 27.100 / 57. 27.100&#xA;  libavcodec     59. 34.100 / 59. 34.100&#xA;  libavformat    59. 25.100 / 59. 25.100&#xA;  libavdevice    59.  6.100 / 59.  6.100&#xA;  libavfilter     8. 41.100 /  8. 41.100&#xA;  libswscale      6.  6.100 /  6.  6.100&#xA;  libswresample   4.  6.100 /  4.  6.100&#xA;  libpostproc    56.  5.100 / 56.  5.100&#xA;Hyper fast Audio and Video encoder&#xA;usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...&#xA;&#xA;Use -h to get full help or, even better, run &#x27;man ffmpeg&#x27;&#xA;

    &#xA;

    PS : FFmpeg does not showing any error while processing in bat or cpp_program, but output is not giving in the specified font instead giving in random characters in the final output.mp4

    &#xA;

  • Error installing ffmpeg on Ubuntu 8.04 JeOS with Speex

    15 novembre 2011, par tubbo

    I'm having an issue installing ffmpeg with Speex support on Ubuntu 8.04 JeOS. After some wandering around in dependency hell I managed to secure the proper libspeex and ffmpeg versions, and it ./configured properly, but when I try to run make &amp;&amp; make install, it fails with the following error :

    ffmpeg.c: In function ‘opt_recording_timestamp’:
    ffmpeg.c:3080: warning: dereferencing type-punned pointer will break strict-aliasing rules
    ffmpeg.c: In function ‘opt_input_file’:
    ffmpeg.c:3312: warning: ‘loop_input’ is deprecated (declared at libavformat/avformat.h:919)
    ffmpeg.c: In function ‘opt_output_file’:
    ffmpeg.c:4086: warning: ‘loop_output’ is deprecated (declared at libavformat/avformat.h:895)
    ffmpeg.c: In function ‘opt_map’:
    ffmpeg.c:2873: warning: ‘sync_stream_idx’ may be used uninitialized in this function
    CC  cmdutils.o
    LD  ffmpeg_g
    libavcodec/libavcodec.a(libspeexdec.o): In function `libspeex_decode_close&#39;:
    /home/tom/src/ffmpeg/libavcodec/libspeexdec.c:144: undefined reference to `speex_header_free&#39;
    libavcodec/libavcodec.a(libspeexenc.o): In function `encode_init&#39;:
    /home/tom/src/ffmpeg/libavcodec/libspeexenc.c:224: undefined reference to `speex_header_free&#39;
    /home/tom/src/ffmpeg/libavcodec/libspeexenc.c:215: undefined reference to `speex_header_free&#39;
    collect2: ld returned 1 exit status
    make: *** [ffmpeg_g] Error 1

    I'm a complete noob to ffmpeg and speex, except for using the codec on Ventrilo back in the day. Can someone shed some light as to why this is happening ?