
Recherche avancée
Autres articles (102)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté. -
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)
Sur d’autres sites (8016)
-
Changing time base on an ffmpeg encode (libffmpeg)
4 avril 2017, par user92238I’m using libffmpeg to decode an RTSP video stream and write it to a file.
The time_base reported by the codec when I open the stream is 1 / 180000. When I create my output AVStream, I’m copying this time_base over to the output. It works, but I get this message when I call avformat_write_header :
"WARNING codec timebase is very high. If duration is too long,file may not be playable by quicktime. Specify a shorter timebase"
I tried specifying a shorter timebase (say, 1/30) but when I do this, the video plays back at the wrong speed.
What’s the right way to adjust the time_base on my output stream without modifying the playback time ?
Thanks.
-
Bad audio output in stereo mode - FFMPEG PortAudio C++
26 août 2014, par SpamdarkI’m here again. This time I am working with the audio, I had before some memory leaks issues but now they are solved, this time I am here with a new problem, when I configure portaudio to sound in stereo (channels = 2), the audio outputs in a bad quality.
It only outputs good in mono, there is almost no solution in google (Or I am a bad ’googler’), here is the code :
Thread that plays audio :
int16_t* audioBuffer=(int16_t*)av_malloc(FRAME_SZ_AV);
int sz = MEDIA->DecodeAudioFrame(audioBuffer,0);
if(sz==1)
Pa_WriteStream(MEDIA->output_stream,audioBuffer,MEDIA->_audio_ccontext->frame_size);
if(sz!=1)
MessageBox(0,"error","error",MB_OK);
ZeroMemory(audioBuffer,FRAME_SZ_AV);
av_freep(&audioBuffer);DecodeAudioFrame function
int WbMedia::DecodeAudioFrame(int16_t *audio_buf, int buf_size){
int return_status=0;
AVPacket t_pack;
while(!audio_packets.empty()){
// Get new packet
WaitForSingleObject(Queue_Audio_Mutex,INFINITE);
t_pack = audio_packets.front();
audio_packets.pop();
ReleaseMutex(Queue_Audio_Mutex);
int obt_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
int consm = avcodec_decode_audio3(_audio_ccontext,audio_buf,&obt_size,&t_pack);
if(consm > 0 && obt_size > 0){
return_status=1;
break;
}
return_status=-1;
break;
}
av_free_packet(&t_pack);
return return_status;
}PortAudio Settings
output_params.device = Pa_GetDefaultOutputDevice(); //choosen_device.dev_index;
output_params.sampleFormat=paInt16;
output_params.channelCount=channel_count;
output_params.suggestedLatency=choosen_device.dev_inf->defaultLowOutputLatency;
output_params.hostApiSpecificStreamInfo=NULL;
// Start with PA opening
PaError pa_opening_err = Pa_OpenStream(&output_stream,
NULL,
&output_params,
sample_fr,
_audio_ccontext->frame_size,
paNoFlag,
NULL,
NULL
);Why is the audio outputting in bad quality in stereo and not in mono ? How can I fix it ?
-
Why does av_write_trailer fails ?
31 mai 2013, par user1914692I am processing a video file.
I use ffmpeg to read each packet.If it is an audio packet, I write the packet into the output video file using av_interleaved_write_frame.
If it is a video packet, I decode the packet, get the data of the video frame, process the image, and compress back to a packet. Then I write the processed video frame packet into the output video file using av_interleaved_write_frame.
Through debugging, it read audio packets and video packets correctly.
However, when it goes to "av_write_trailer", it exits. But the output video file exists.The error information is :
*** glibc detected *** /OpenCV_videoFlatten_20130507/Debug/OpenCV_videoFlatten_20130507: corrupted double-linked list: 0x000000000348dfa0 ***
Using Movie Player (in Ubuntu), the output video file can plays the audio correctly, but without video signals.
Using VLC player, it can show the first video frame (keep the same video picture), and play the audio correctly.I tried to debug into "av_write_trailer", but since it is in the ffmpeg library, I could not get a detailed information what is wrong.
Another piece of information : the previous version of the project is only to process the video frame, without adding audio stream ; and it works well.
Any hint or clue ?