Recherche avancée

Médias (91)

Autres articles (6)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

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

  • Les thèmes de MediaSpip

    4 juin 2013

    3 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
    Thèmes MediaSPIP
    3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...)

Sur d’autres sites (1524)

  • Trim video length in Android with javacv and ffmpeg

    11 juillet 2017, par Morya Yaroslav

    I’m trying to trim video length with ffmpeg implementation of FrameGrabber and FrameRecorder, but getting corrupted file of smaller size then it’s going to be. Maybe there is other way to trim video from start time to end time, also updating trim progress. Seems like it’s not recording changes between frames. Maybe there are some other ways to trim videos of different formats like mp4, flv and others. Here is code snippet :

           FrameGrabber grabber = new FFmpegFrameGrabber(mClip.getPath());
           grabber.start();
           grabber.setTimestamp(mClip.getClipStartMs()); // Write from specific moment

           File out = new File(mClip.getOutPutPath(params[0])); // Set destination to write
           FrameRecorder recorder = new FFmpegFrameRecorder(out, grabber.getImageWidth(), grabber.getImageHeight());


           recorder.setFormat(grabber.getFormat());
           recorder.setFrameRate(grabber.getFrameRate());
           recorder.setSampleRate(grabber.getSampleRate());
           recorder.setAspectRatio(grabber.getAspectRatio());
           recorder.setSampleFormat(grabber.getSampleFormat());

           recorder.setAudioCodec(grabber.getAudioCodec());
           recorder.setAudioBitrate(grabber.getAudioBitrate());
           recorder.setAudioChannels(grabber.getAudioChannels());

           recorder.setVideoCodec(grabber.getVideoCodec());
           recorder.setVideoBitrate(grabber.getVideoBitrate());

           recorder.start();

           Frame frame;
           Long timestamp;
           Long fullLength = mClip.getClipEndMs() - mClip.getClipStartMs();
           double percent = 0d, oldPercent = 0d;

           while ((frame = grabber.grabFrame()) != null && (timestamp = grabber.getTimestamp()) <= mClip.getClipEndMs()) {
               Log.d(ASYNC_SAVE_TAG, "Started command : ffmpeg " + mClip.toString());

               if (timestamp != 0d) {
                   oldPercent = percent;
                   percent = timestamp.doubleValue() / fullLength.doubleValue();
                   if (MathUtil.compare(percent, oldPercent) != 0) {
                       publishProgress(percent);
                   }
               }

               recorder.setTimestamp(grabber.getTimestamp() - mClip.getClipStartMs());
               recorder.record(frame);
           }

           grabber.close();
           recorder.close();
  • Revision cdb322dd72 : Adapt ARNR filter length and strength. Adjust the filter length and strength fo

    18 mars 2013, par Paul Wilkins

    Changed Paths : Modify /vp9/encoder/vp9_firstpass.c Modify /vp9/encoder/vp9_onyx_if.c Modify /vp9/encoder/vp9_onyx_int.h Modify /vp9/encoder/vp9_rdopt.c Modify /vp9/encoder/vp9_temporal_filter.c Adapt ARNR filter length and strength. Adjust the filter length and strength for each ARF group (...)

  • How do I get videoshow (or any other js package) to merge image and sound files to the length I specify rather than a constant length of 5 seconds ?

    5 décembre 2023, par Bragon

    I’m trying to take an image file and a sound file and merge them together into an mp4 file. To this end, I use videoshow.js which is basically a wrapper for fluent-ffmpeg.js. For some reason, videoshow always sets the duration of the output file to 5 seconds regardless of what I set the loop parameter to. And to top it all off, it fades out the sound towards the end of the clip.

    


    I’m happy for any solution to this even if it doesn’t include the use of videoshow or fluent-ffmpeg.

    


    const url = require('url');
const { smartLog } = require('../services/smart-log');
const { getFile, getDuration } = require('../services/file-service');
const videoshow = require('videoshow');
const path = require('path');
const FFmpeg = require('fluent-ffmpeg');
const fs = require('fs');

const imgToMP4 = (caption, sound, image, duration, output) => {
  smartLog('info', `Converting ${image}`);
  const images = [image];

  const videoOptions = {
    fps: 10,
    loop: duration,
    transition: false,
    videoBitrate: 1024,
    videoCodec: 'libx264',
    size: '640x?',
    audioBitrate: '128k',
    audioChannels: 2,
    format: 'mp4',
    pixelFormat: 'yuv420p',
  };

  videoshow([
    {
      path: image,
    },
  ])
    .audio(sound)
    .save(output)
    .on('start', function (command) {
      smartLog('info', `ffmpeg process started: ${image}`);
    })
    .on('error', function (err) {
      smartLog('error', err);
    })
    .on('end', function (output) {
      smartLog('info', `Video created: ${output}`);
    });
};