Recherche avancée

Médias (91)

Autres articles (50)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (5400)

  • ffmpeg audio output in iOS

    19 septembre 2015, par user3249421

    Good day,

    I have own project which using iFrameExtraktor (https://github.com/lajos/iFrameExtractor). I modified initWithVideo method to :

    -(id)initWithVideo:(NSString *)moviePath imgView: (UIImageView *)imgView {
    if (!(self=[super init])) return nil;

    AVCodec         *pCodec;
    AVCodec         *aCodec;

    // Register all formats and codecs
    avcodec_register_all();
    av_register_all();

    imageView = imgView;

    // Open video file
    if(avformat_open_input(&pFormatCtx, [moviePath cStringUsingEncoding:NSASCIIStringEncoding], NULL, NULL) != 0) {
       av_log(NULL, AV_LOG_ERROR, "Couldn't open file\n");
       goto initError;
    }

    // Retrieve stream information
    if(avformat_find_stream_info(pFormatCtx,NULL) < 0) {
       av_log(NULL, AV_LOG_ERROR, "Couldn't find stream information\n");
       goto initError;
    }

    // Find the first video stream
    if ((videoStream =  av_find_best_stream(pFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, &pCodec, 0)) < 0) {
       av_log(NULL, AV_LOG_ERROR, "Cannot find a video stream in the input file\n");
       goto initError;
    }

    if((audioStream = av_find_best_stream(pFormatCtx, AVMEDIA_TYPE_AUDIO, -1, -1, &aCodec, 0)) < 0 ){
       av_log(NULL, AV_LOG_ERROR, "Cannot find a audio stream in the input file\n");
       goto initError;
    }

    // Get a pointer to the codec context for the video stream
    pCodecCtx = pFormatCtx->streams[videoStream]->codec;
    aCodecCtx = pFormatCtx->streams[audioStream]->codec;

    // Find the decoder for the video stream
    pCodec = avcodec_find_decoder(pCodecCtx->codec_id);
    if(pCodec == NULL) {
       av_log(NULL, AV_LOG_ERROR, "Unsupported video codec!\n");
       goto initError;
    }

    aCodec = avcodec_find_decoder(aCodecCtx->codec_id);
    if(aCodec == NULL) {
       av_log(NULL, AV_LOG_ERROR, "Unsupported audio codec!\n");
       goto initError;
    }

    // Open codec
    if(avcodec_open2(pCodecCtx, pCodec, NULL) < 0) {
       av_log(NULL, AV_LOG_ERROR, "Cannot open video decoder\n");
       goto initError;
    }

    if(avcodec_open2(aCodecCtx, aCodec, NULL) < 0){
       av_log(NULL, AV_LOG_ERROR, "Cannot open audio decoder\n");
       goto initError;
    }

    // Allocate video frame
    pFrame = av_frame_alloc();

    outputWidth = pCodecCtx->width;
    self.outputHeight = pCodecCtx->height;

    lastFrameTime = -1;
    [self seekTime:0.0];

    return self;

    initError:
       //[self release];
       return nil;
    }

    Video rendering works fine, but I don’t know how play audio to device output.

    Thanks for any tips.

  • avcodec : add external enc libvvenc for H266/VVC

    5 juin 2024, par Thomas Siedel
    avcodec : add external enc libvvenc for H266/VVC
    

    Add external encoder VVenC for H266/VVC encoding.
    Register new encoder libvvenc.
    Add libvvenc to wrap the vvenc interface.
    libvvenc implements encoder option : preset,qp,qpa,period,
    passlogfile,stats,vvenc-params,level,tier.
    Enable encoder by adding —enable-libvvenc in configure step.

    Co-authored-by : Christian Bartnik chris10317h5@gmail.com
    Signed-off-by : Thomas Siedel <thomas.ff@spin-digital.com>

    • [DH] Changelog
    • [DH] configure
    • [DH] doc/encoders.texi
    • [DH] fftools/ffmpeg_mux_init.c
    • [DH] libavcodec/Makefile
    • [DH] libavcodec/allcodecs.c
    • [DH] libavcodec/libvvenc.c
    • [DH] libavcodec/version.h
  • HTML Video Exporting Using MediaRecorder vs ffmpeg.js

    3 octobre 2020, par Owen Ovadoz

    TLDR

    &#xA;

    Imagine I have one video and one image. I want to create another video that overlays the image (e.g. watermark) at the center for 2 seconds in the beginning of the video and export it as the final video. I need to do this on the client-side only. Is it possible to use MediaRecorder + Canvas or should I resort to using ffmpeg.js ?

    &#xA;

    Context

    &#xA;

    I am making a browser-based video editor where the user can upload videos and images and combine them. So far, I implemented this by embedding the video and images inside a canvas element appropriately. The data representation looks somewhat like this :

    &#xA;

    video: {&#xA;  url: &#x27;https://archive.com/video.mp4&#x27;,&#xA;  duration: 34,&#xA;},&#xA;images: [{&#xA;  url: &#x27;https://archive.com/img1.jpg&#x27;,&#xA;  start_time: 0,&#xA;  end_time: 2,&#xA;  top: 30,&#xA;  left: 20,&#xA;  width: 50,&#xA;  height: 50,&#xA;}]&#xA;

    &#xA;

    Attempts

    &#xA;

      &#xA;
    1. I play the video and show/hide images in the canvas. Then, I can use the MediaRecorder to capture the canvas' stream and export it as a data blob at the end. The final output is as expected, but the problem with this approach is I need to play the video from the beginning to the end for me to capture the stream from the canvas. If the video is 60 seconds, exporting it also takes 60 seconds.
    2. &#xA;

    &#xA;

    &#xD;&#xA;
    &#xD;&#xA;
    function record(canvas) {&#xA;  return new Promise(function (res, rej) {&#xA;    const stream = canvas.captureStream();&#xA;    const mediaRecorder = new MediaRecorder(stream);&#xA;    const recordedData = [];&#xA;&#xA;    // Register recorder events&#xA;    mediaRecorder.ondataavailable = function (event) {&#xA;      recordedData.push(event.data);&#xA;    };&#xA;    mediaRecorder.onstop = function (event) {&#xA;      var blob = new Blob(recordedData, {&#xA;        type: "video/webm",&#xA;      });&#xA;      var url = URL.createObjectURL(blob);&#xA;      res(url);&#xA;    };&#xA;&#xA;    // Start the video and start recording&#xA;    videoRef.current.currentTime = 0;&#xA;    videoRef.current.addEventListener(&#xA;      "play",&#xA;      (e) => {&#xA;        mediaRecorder.start();&#xA;      },&#xA;      {&#xA;        once: true,&#xA;      }&#xA;    );&#xA;    videoRef.current.addEventListener(&#xA;      "ended",&#xA;      (e) => {&#xA;        mediaRecorder.stop();&#xA;      },&#xA;      {&#xA;        once: true,&#xA;      }&#xA;    );&#xA;    videoRef.current.play();&#xA;  });&#xA;}

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;

      &#xA;
    1. I can use ffmpeg.js to encode the video. I haven't tried this method yet as I will have to convert my image representation into ffmpeg args (I wonder how much work that is).
    2. &#xA;

    &#xA;