
Recherche avancée
Autres articles (97)
-
Amélioration de la version de base
13 septembre 2013Jolie 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 (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Le plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...)
Sur d’autres sites (7612)
-
FFMpeg volume goes up on last audio segment [duplicate]
10 septembre 2020, par PaulUsing the FFMPEG version2020-06-17 version by johnvansickle I have the following issue :


I try to combine 1 video (without audio) and 2 audio fragments. Both audio fragments are identical concerning the volume. However when I mix the it all together somehow the last audio fragment is played louder. No matter in which order, no matter how many audio fragments I try to assemble.


Below the statement I execute against ffmpeg, line breaks added for readability.


-hide_banner -loglevel warning -y 
-i video.mp4 
-i audio-1.mp3 
-i audio-2.mp3 
-filter_complex [1]adelay=0[s1];[2]adelay=4000[s2];[s1][s2]amix=2[combined] 
-c:v copy dest.mp4



-
Command line control when FFmpeg running [closed]
8 septembre 2020, par Bi AoI was running
ffmpeg
to convert video to another format, eg :ffmpeg -i INPUT.mp4 -c:v hevc OUTPUT.mp4
.

The arguments of command line doesn't matter, the problem is when the program is running, I accidentaly pressed some gibberish on my keyboard, now ffmpeg keep outputing the information I don't need as the image below, my CPU is more painful now, the textarea even delaying when I typing in browser now.




How do I disable those output and get back to the normal state when ffmpeg just start ?


-
FFMPEG Audio decode and draw waveform
7 avril 2016, par HarisI am trying to decode the audio and draw the waveform using ffmpeg, and the input audio data is
AV_SAMPLE_FMT_S16P
, basically I am following the tutorial here, and the audio is playing fine with libao. Now I need to plot the waveform using decoded data, currently I am writing left and right channel to separate csv file and plotting on excel. But the waveform is something different from the waveform shown in Audacity using the same audio clip. When I analyzed the value written on csv most of the values are close to maximum ofuint16_t
(65535), but there are some other lower values, but majority is high peak.Here is the source code,
const char* input_filename="/home/user/Music/Clip.mp3";
av_register_all();
AVFormatContext* container=avformat_alloc_context();
if(avformat_open_input(&container,input_filename,NULL,NULL)<0){
endApp("Could not open file");
}
if(avformat_find_stream_info(container, NULL)<0){
endApp("Could not find file info");
}
av_dump_format(container,0,input_filename,false);
int stream_id=-1;
int i;
for(i=0;inb_streams;i++){
if(container->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO){
stream_id=i;
break;
}
}
if(stream_id==-1){
endApp("Could not find Audio Stream");
}
AVDictionary *metadata=container->metadata;
AVCodecContext *ctx=container->streams[stream_id]->codec;
AVCodec *codec=avcodec_find_decoder(ctx->codec_id);
if(codec==NULL){
endApp("cannot find codec!");
}
if(avcodec_open2(ctx,codec,NULL)<0){
endApp("Codec cannot be found");
}
AVPacket packet;
av_init_packet(&packet);
//AVFrame *frame=avcodec_alloc_frame();
AVFrame *frame=av_frame_alloc();
int buffer_size=AVCODEC_MAX_AUDIO_FRAME_SIZE+ FF_INPUT_BUFFER_PADDING_SIZE;
// MSVC can't do variable size allocations on stack, ohgodwhy
uint8_t *buffer = new uint8_t[buffer_size];
packet.data=buffer;
packet.size =buffer_size;
int frameFinished=0;
int plane_size;
ofstream fileCh1,fileCh2;
fileCh1.open ("ch1.csv");
fileCh2.open ("ch2.csv");
AVSampleFormat sfmt=ctx->sample_fmt;
while(av_read_frame(container,&packet)>=0)
{
if(packet.stream_index==stream_id){
int len=avcodec_decode_audio4(ctx,frame,&frameFinished,&packet);
int data_size = av_samples_get_buffer_size(&plane_size, ctx->channels,
frame->nb_samples,
ctx->sample_fmt, 1);
if(frameFinished){
int write_p=0;
// QTime t;
switch (sfmt){
case AV_SAMPLE_FMT_S16P:
for (int nb=0;nbsizeof(uint16_t);nb++){
for (int ch = 0; ch < ctx->channels; ch++) {
if(ch==0)
fileCh1 <<((uint16_t *) frame->extended_data[ch])[nb]<<"\n";
else if(ch==1)
fileCh2 <<((uint16_t *) frame->extended_data[ch])[nb]<<"\n";
}
}
break;
}
} else {
DBG("frame failed");
}
}
av_free_packet(&packet);
}
fileCh1.close();
fileCh2.close();
avcodec_close(ctx);
avformat_close_input(&container);
delete buffer;
return 0;Edit :
I have attached the waveform image draw using opencv, here I scaled the sample value to 0-255 range, and took value 127 as 0(Y-axis). Now for each sample draw line from (x,127) to (x,sample value) where x=1,2,3,...