Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (30)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (4442)

  • Installing FFMPEG on my EC2 instance takes too long ; what am I doing wrong ? [closed]

    24 août 2023, par Shaban Khawar

    I found a good article on how to download onto my EC2 instance : link
Here's the issue. It takes forever ! It takes around 15 minutes to install.

    


    I'm running my EC2 instance on Amazon Linux 2023, so no apt-get for me.
Also my EC2 instance is created by my EB environment, so if auto-scaling occurs, my instance will be terminated and a new one will be created. I can set .ebextensions to run all the commands to install FFMPEG again but as mentioned above, it takes forever ! That means for 15-20 minutes, my server is down because of one dependancy. I feel like I'm going about this the wrong way, so any advice is appreciated.

    


  • FFmpeg recorded video is dark with Xvfb and chrome headless on Centos 7

    15 juin 2023, par narsy4

    I am trying to do a video recording of headless chrome session on Centos 7 (Amazon EC2 instance) using ffmpeg. I have installed ffmpeg, Xvfb and google chrome on the machine. I started Xvfb on :99, verified the display using xdpyinfo and started chrome. However when I run the ffmpeg cmd to capture the video (no errors in ffmpeg debug logs), the output is dark with a X sign in the centre of video screen. What am I doing wrong here ? Any help is appreciated.

    


    **Xvfb and chrome commands**
Xvfb :99 -screen 0 1920x1080x24 &
export DISPLAY=:99
google-chrome --headless --disable-gpu --no-sandbox --start-maximized --window-size=1920x1080 https://www.google.com



    


    **FFmpeg command**
ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :99 -loglevel debug -pix_fmt yuv420p /tmp/video.mp4



    


    dark video

    


    Searched for and read a few threads on this, but couldn't get it to work.

    


  • Encoding audio_common messages to OPUS

    14 juin 2023, par djangbahevans

    


    I am trying to stream microphone and camera data to Amazon KVS WebRTC. I'm able to make video work using this package (adapted for noetic) however I am struggling to make audio work. I'm using the audio_capture package to get mp3 frames. I'm trying to convert this to OPUS frames before streaming to KVS, but I'm unsure how to do this. I wrote this bit of code based on the small resources I can find on using ffmpeg, but it's not working. avcodec_fill_audio_frame is returning -22.

    


    #include "opus_encoder.h"

OPUSEncoder::OPUSEncoder() {
  av_register_all();
  codecContext == nullptr;
}

OPUSEncoder::~OPUSEncoder() {
  if (codecContext != nullptr) {
    avcodec_free_context(&codecContext);
  }
}

int OPUSEncoder::Initialize(int Fs, int channels) {
  AVCodec *codec = avcodec_find_encoder(AV_CODEC_ID_OPUS);
  if (!codec) {
    printf("Codec not found\n");
    return -1;
  }

  codecContext = avcodec_alloc_context3(codec);
  if (!codecContext) {
    printf("Could not allocate audio codec context\n");
    return -1;
  }

  codecContext->sample_fmt = AV_SAMPLE_FMT_S16;
  codecContext->bit_rate = 128000;
  codecContext->sample_rate = Fs;
  codecContext->channel_layout = av_get_default_channel_layout(channels);
  codecContext->channels = channels;

  if (avcodec_open2(codecContext, codec, nullptr) < 0) {
    printf("Could not open codec\n");
    return -1;
  }

  return 0;
}

int OPUSEncoder::Encode(const uint8_t *audio_data, int frameSize,
                        uint8_t *out) {
  AVPacket pkt;
  av_init_packet(&pkt);
  pkt.data = nullptr;
  pkt.size = 0;

  AVFrame *frame = av_frame_alloc();
  frame->nb_samples = frameSize;
  frame->format = codecContext->sample_fmt;
  frame->channel_layout = codecContext->channel_layout;

  int ret = avcodec_fill_audio_frame(frame, codecContext->channels,
                                     codecContext->sample_fmt, audio_data,
                                     frameSize * 2, 0);
  if (ret < 0) {
    printf("Error filling audio frame: %d\n", ret);
    return -1;
  }

  ret = avcodec_send_frame(codecContext, frame);
  if (ret < 0) {
    printf("Error sending the frame to the encoder\n");
    return -1;
  }

  while (ret >= 0) {
    ret = avcodec_receive_packet(codecContext, &pkt);
    if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
      return 0;
    } else if (ret < 0) {
      printf("Error encoding audio frame\n");
      return -1;
    }

    memcpy(out, pkt.data, pkt.size);
    out += pkt.size;
    av_packet_unref(&pkt);
  }

  av_frame_free(&frame);

  return 0;
}