
Recherche avancée
Médias (1)
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
Autres articles (112)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (5404)
-
bugs in avcodec_decode_audio4() in ios pad [on hold]
29 novembre 2016, par LL2012I read the mp3 frame and try to decode it to PCM on ios, but the data is totally disordered(from memory comparing with the original pcm)
it is quite ok with the same code on windows.
anyone who have met the same thing ?
seems ffmpeg is not so attractive subject to get any reply, since my last question has been left there for several days. I have to re-create a new one
while (av_read_frame(format_ctx_org_, &avpkt) >= 0)
{
if (avpkt.stream_index == audio_stream_)
{
pkt_size = avpkt.size;
pkt_data = avpkt.data;
while (pkt_size > 0)
{
len = avcodec_decode_audio4(codec_ctx_, decoded_frame, &got_frame, &avpkt);
if (len < 0)
{
//decode has completed
if ((audio_duration_ - avpkt.dts <= avpkt.duration) ||
(file_size_ - avpkt.pos == avpkt.size))
{
sink_->OnAudioDataDecodeCompleted(true, "decoding loops end!");
return kThreadProcessBreak;
}
//meet bad frame, just skip it
break;
}
if (got_frame)
{
if (ConverFrame(decoded_frame) < 0)
return kThreadProcessBreak;
}
pkt_size -= len;
pkt_data += len;
}
}
}
int FfmpegAudioFileDecoder::ConverFrame(AVFrame * frame)
{
int64_t src_ch_layout, dst_ch_layout ;
int src_rate = codec_ctx_org_->sample_rate, dst_rate = param_->sample_rate;
uint8_t **src_data = 0, **dst_data = 0;
int src_nb_channels = codec_ctx_org_->channels, dst_nb_channels = param_->sample_fmt;
int src_linesize, dst_linesize;
int src_nb_samples = frame->nb_samples, dst_nb_samples, max_dst_nb_samples;
enum AVSampleFormat src_sample_fmt = codec_ctx_org_->sample_fmt, dst_sample_fmt = (enum AVSampleFormat)param_->sample_fmt;
int ret;
//we already have the frame data, no need to alloc
/*ret = av_samples_alloc_array_and_samples(&src_data, &src_linesize, src_nb_channels,
src_nb_samples, src_sample_fmt, 0);*/
//for (int i = 0 ; i < src_nb_channels; i++)
//{
// src_data[i] = frame->data[i];
//}
//if (ret < 0) {
// av_log(0, "Could not allocate source samples\n");
// return -1;
//}
max_dst_nb_samples = dst_nb_samples =
av_rescale_rnd(src_nb_samples, dst_rate, src_rate, AV_ROUND_UP);
ret = av_samples_alloc_array_and_samples(&dst_data, &dst_linesize, dst_nb_channels,
dst_nb_samples, dst_sample_fmt, 0);
if (ret < 0) {
sink_->OnAudioDataDecodeCompleted(false, "ConverFrame():Could not allocate destination samples" );
av_log(0,log_level_, "Could not allocate destination samples\n");
return -1;
}
dst_nb_samples = av_rescale_rnd(swr_get_delay(swr_ctx_, src_rate) +
src_nb_samples, dst_rate, src_rate, AV_ROUND_UP);
if (dst_nb_samples > max_dst_nb_samples) {
av_freep(&dst_data[0]);
ret = av_samples_alloc(dst_data, &dst_linesize, dst_nb_channels,
dst_nb_samples, dst_sample_fmt, 1);
if (ret < 0)
{
sink_->OnAudioDataDecodeCompleted(false, "ConverFrame():av_samples_alloc failed");
return -1;
}
max_dst_nb_samples = dst_nb_samples;
}
ret = swr_convert(swr_ctx_, dst_data, dst_nb_samples, (const uint8_t **)frame->data, src_nb_samples);
if (ret < 0) {
sink_->OnAudioDataDecodeCompleted(false, "ConverFrame():Error while converting");
av_log(0, log_level_,"Error while converting\n");
return -1;
}
int dst_bufsize = av_samples_get_buffer_size(&dst_linesize, dst_nb_channels,
ret, dst_sample_fmt, 1);
if (dst_bufsize < 0) {
sink_->OnAudioDataDecodeCompleted(false, "ConverFrame():Could not get sample buffer size");
av_log(0,log_level_, "Could not get sample buffer size\n");
return -1;
}
decoded_duration_ += frame->pkt_duration;
float decode_percentage = (float)decoded_duration_ /audio_duration_;
av_log(0, log_level_, "decode_percentage %.3f\n" , decode_percentage);
int nRet = sink_->OnAudioDataDecoded(dst_data[0], dst_bufsize, decode_percentage);
if(nRet < 0)
sink_->OnAudioDataDecodeCompleted(false, "ConverFrame(): user cancelled");
if (dst_data)
av_freep(&dst_data[0]);
av_freep(&dst_data);
return nRet;
} -
Can't use ffmpeg 3.2 in Android project
21 novembre 2016, par world2ashishTried almost everything, spent almost 4-5 days trying and still counting.
The reason I want to compile recent version of ffmpeg is because https://github.com/WritingMinds/ffmpeg-android-java doesn’t work for video rotation. For this also I tried multiple answers, different versions of answer (transpose=1, transpose=dir=cclock, etc)
Somewhere it was mentioned that rotate command wont work with previous versions of ffmpeg, so after a lot of trials, I started working on compilation of new ffmpeg. But all the tutorials for ffmpeg belong to earlier versions (of Android NDk, ffmpeg) which wont work with ffmpeg 3.2 and NDK r13b (I also tried with NDK downloaded by studio itself but no luck). In case it worked for you, please help.
After a lot of frustrating experience I am writing this. Please help with a workflow or a clear direction. Thanks
Wasnt able to tag ffmpeg3.2 because of reputation.
-
Detect audio silence in AVFrame using AutoGen in C# for FFmpeg
16 novembre 2016, par williamtroupI’m currently reading audio frames as follows :
AVFrame* frame = ffmpeg.av_frame_alloc();
while (ffmpeg.av_read_frame(formatContext, &packet) >= 0)
{
if (packet.stream_index == streamIndex)
{
while (packet.size > 0)
{
int frameDecoded;
int frameDecodedResult = ffmpeg.avcodec_decode_audio4(codecContext, frame, &frameDecoded, packet);
if (frameDecoded > 0 && frameDecodedResult >= 0)
{
packet.data += totalBytesDecoded;
packet.size -= totalBytesDecoded;
}
}
frameIndex++;
}
Avcodec.av_free_packet(&packet);
}In this loop, I want to be able to detect if "frame" contains silent audio before doing anything with it. Is there a filter to do this ? Been struggling with this for a few days.
Many thanks in advance.