
Recherche avancée
Autres articles (56)
-
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
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 (...) -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (5354)
-
Installing FFMPEG on my EC2 instance takes too long ; what am I doing wrong ? [closed]
24 août 2023, par Shaban KhawarI 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 narsy4I 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






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;
}