
Recherche avancée
Médias (29)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (54)
-
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...) -
Soumettre bugs et patchs
10 avril 2011Un logiciel n’est malheureusement jamais parfait...
Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
Si vous pensez avoir résolu vous même le bug (...) -
Installation en mode standalone
4 février 2011, parL’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
[mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)
Sur d’autres sites (7372)
-
Normalizing with ffmpeg-normalize, slight variations in sound
20 mai 2022, par Antti RytsöläI have some flacs which I am trying to normalize for Spotify and Distrokid.


I got the guide from this post


ffmpeg-normalize inbound/*.flac -t -14 -lrt 11 -tp -1 -ext flac -c:a flac -of normalized/



Now the problem is ( before submitting to Distrokid ) that when listening to normalized versions there seems to be light deviations, like muffling, to the sound at half a second lenghts.


Small sample, towards the end.


Now I'm asking for help because even though I can try different settings I still want to conform to Spotify normalization guide.


The Spotify guide is as follows :


Target the loudness level of your master at -14dB integrated LUFS 
and keep it below -1dB TP (True Peak) max. This is best for lossy 
formats (Ogg/Vorbis and AAC) and makes sure no extra distortion’s 
introduced in the transcoding process.

If your master’s louder than -14dB integrated LUFS, make sure 
it stays below -2dB TP (True Peak) to avoid extra distortion. This 
is because louder tracks are more susceptible to extra distortion 
in the transcoding process.



and


ffmpeg version N-102727-g580e168a94-tessus
 ffmpeg-normalize v1.22.8





-
Ffmpeg video and audio issues
17 décembre 2020, par ExpressingxI'm using ffmpeg
libav
and I have two problems. I'm automatically finding the decoder for audio and video input, but encoding to H264/AAC, always.

The first problem is that if the camera is capturing in low light the file gets messed up. E.g. If I record
12 secs
, the resulting file is indeed12 secs
, but the actual frames are playing till7 sec
and also it is 'fast-forwarded', like the speed isX2, X3
than the actual frame representation. While capturing with good light everything is fine. Not really sure what's happening.

Second problem is video and audio sync. First 10-15mins the synchronization is fine, but after that audio gradually falls behind. E.g. 1 hour file, at the end audio is behind 2-3 seconds.


Some code :


Creating decoders


private void CreateAudioDecoder()
 {
 AVCodecParameters* audioCodecParams = InputFormatContext->streams[AudioStreamIndex]->codecpar;
 AVCodec* audioDecoder = ffmpeg.avcodec_find_decoder(audioCodecParams->codec_id);

 AudioDecodeContext = ffmpeg.avcodec_alloc_context3(audioDecoder);

 if (ffmpeg.avcodec_parameters_to_context(AudioDecodeContext, audioCodecParams) < 0)
 {
 }

 if (ffmpeg.avcodec_open2(AudioDecodeContext, audioDecoder, null) < 0)
 {
 }
 }

 private void CreateVideoDecoder()
 {
 AVStream* videoStream = InputFormatContext->streams[VideoStreamIndex];
 AVCodecParameters* videoCodecParams = videoStream->codecpar;
 AVCodec* videoDecoder = ffmpeg.avcodec_find_decoder(videoCodecParams->codec_id);

 VideoDecodeContext = ffmpeg.avcodec_alloc_context3(videoDecoder);

 if (ffmpeg.avcodec_parameters_to_context(VideoDecodeContext, videoCodecParams) < 0)
 {
 }

 if (ffmpeg.avcodec_open2(VideoDecodeContext, videoDecoder, null) < 0)
 {
 }
 }



Input format context :


private AVFormatContext* CreateFormatContext()
 {
 AVDictionary* options = null;

 ffmpeg.av_dict_set(&options, "packet-buffering", "0", 0);
 ffmpeg.av_dict_set(&options, "sync", "1", 0);
 ffmpeg.av_dict_set(&options, "rtsp_transport", "tcp", 0);
 ffmpeg.av_dict_set(&options, "reconnect", "1", 0);
 ffmpeg.av_dict_set(&options, "max_delay", "0", 0);
 ffmpeg.av_dict_set(&options, "reorder_queue_size", "0", 0);
 ffmpeg.av_dict_set(&options, "skip_frame", "8", 0);
 ffmpeg.av_dict_set(&options, "skip_loop_filter", "48", 0);
 ffmpeg.av_dict_set(&options, "rtbufsize", "1500M", 0);

 AVFormatContext* pInputFmtCtx = ffmpeg.avformat_alloc_context();

 AVInputFormat* inputFormat = null;

 if (!string.IsNullOrEmpty(_format))
 {
 inputFormat = ffmpeg.av_find_input_format(_format);

 if (inputFormat == null)
 {
 }
 }

 int ret = ffmpeg.avformat_open_input(&pInputFmtCtx, _streamUrl, inputFormat, &options);

 if (ret != 0)
 {
 }

 return pInputFmtCtx;
 }



Output context


private AVFormatContext* CreateOutputContext()
 {
 AVFormatContext* pOutputFmtCtx = null;

 if (ffmpeg.avformat_alloc_output_context2(&pOutputFmtCtx, null, null, _fileName) != 0)
 {
 }

 return pOutputFmtCtx;
 }



Encoders


private void CreateH264Encoder(AVStream* inputStream, AVStream* outputStream)
 {
 AVRational framerate = ffmpeg.av_guess_frame_rate(_inputContext.InputFormatContext, inputStream, null);

 AVCodec* videoEncoder;
 videoEncoder = ffmpeg.avcodec_find_encoder_by_name("h264_qsv");
 if (videoEncoder == null)
 {
 videoEncoder = ffmpeg.avcodec_find_encoder_by_name("libx264");
 PixelFormat = AVPixelFormat.AV_PIX_FMT_YUV420P;
 }

 if (videoEncoder == null)
 {
 }

 VideoEncodeContext = ffmpeg.avcodec_alloc_context3(videoEncoder);

 if (VideoEncodeContext == null)
 {
 }

 VideoEncodeContext->width = _inputContext.VideoDecodeContext->width;
 VideoEncodeContext->height = _inputContext.VideoDecodeContext->height;
 VideoEncodeContext->pix_fmt = PixelFormat;
 VideoEncodeContext->bit_rate = H264_ENCODER_BIT_RATE; // 2 * 1000 * 1000
 VideoEncodeContext->rc_buffer_size = H264_ENCODER_BUFFER_SIZE; // 4 * 1000 * 1000
 VideoEncodeContext->rc_max_rate = H264_ENCODER_MAX_RATE; // 2 * 1000 * 1000
 VideoEncodeContext->rc_min_rate = H264_ENCODER_MIN_RATE; // 3 * 1000 * 1000
 VideoEncodeContext->framerate = framerate;
 VideoEncodeContext->max_b_frames = 0;
 VideoEncodeContext->time_base = ffmpeg.av_inv_q(framerate);
 VideoEncodeContext->flags |= ffmpeg.AV_CODEC_FLAG_GLOBAL_HEADER;

 ffmpeg.av_opt_set(VideoEncodeContext->priv_data, "preset", "slow", 0);
 ffmpeg.av_opt_set(VideoEncodeContext->priv_data, "vprofile", "baseline", 0);

 if (ffmpeg.avcodec_open2(VideoEncodeContext, videoEncoder, null) < 0)
 {
 }

 ffmpeg.avcodec_parameters_from_context(outputStream->codecpar, VideoEncodeContext);
 }

 private void CreateAacEncoder(AVStream* outStream)
 {
 AVCodec* audioEncoder = ffmpeg.avcodec_find_encoder(AVCodecID.AV_CODEC_ID_AAC);

 if (audioEncoder == null)

 AudioEncodeContext = ffmpeg.avcodec_alloc_context3(audioEncoder);

 if (AudioEncodeContext == null)

 AudioEncodeContext->bit_rate = 96000;
 AudioEncodeContext->sample_fmt = audioEncoder->sample_fmts[0];
 AudioEncodeContext->sample_rate = _inputContext.AudioDecodeContext->sample_rate;
 AudioEncodeContext->channel_layout = (ulong)ffmpeg.av_get_default_channel_layout(2);
 AudioEncodeContext->channels = 2;

 outStream->time_base.den = _inputContext.AudioDecodeContext->sample_rate;
 outStream->time_base.num = 1;

 AudioEncodeContext->flags |= ffmpeg.AV_CODEC_FLAG_GLOBAL_HEADER;

 if (ffmpeg.avcodec_open2(AudioEncodeContext, audioEncoder, null) < 0)

 ffmpeg.avcodec_parameters_from_context(outStream->codecpar, AudioEncodeContext);
 }



I would really appreciate any help.


-
Audio MP2 encoding and decoding producing half data C++ and FFMPEG
7 juillet 2016, par hockeyislifeI have 16 bit PCM data with stereo setup which I grab from a microphone.
Once I get the data I encode it using the following encoder settings
AVCodec* audio_codec = avcodec_find_encoder(AV_CODEC_ID_MP2);
AVCodecContext* audio_codec_ctx = avcodec_alloc_context3(audio_codec);
audio_codec_ctx->bit_rate = 64000;
audio_codec_ctx->channels = 2;
audio_codec_ctx->channel_layout = AV_CH_LAYOUT_STEREO;
audio_codec_ctx->sample_rate = 44100;
audio_codec_ctx->sample_fmt = AV_SAMPLE_FMT_S16;When I pass the audio data into the encoder I see that it takes 4608 bytes of data each time and encodes it correctly to MP2 data. PCM data grabbed by the microphone is 88320 bytes and the encoder takes 4608 bytes each time and compresses it.
If I take each 4608 byte section that has been encoded and pass it through a decoder with the same settings as above but with a decoder.
AVCodecID audio_codec_id = AV_CODEC_ID_MP2;
AVCodec * audio_decodec = avcodec_find_decoder(audio_codec_id);
audio_decodecContext = avcodec_alloc_context3(audio_decodec);
audio_decodecContext->bit_rate = 64000;
audio_decodecContext->channels = 2;
audio_decodecContext->channel_layout = AV_CH_LAYOUT_STEREO;
audio_decodecContext->sample_rate = 44100;
audio_decodecContext->sample_fmt = AV_SAMPLE_FMT_S16;The decoding works and is successful but when I look at the data size it is exactly half 2034 of what was encoded. I dont understand why that would be. I would of imagined I would get 4608 considering the encoder and decoder are the same.
Can anyone shed some light into why this would be happening. Anything I should be setting ?