
Recherche avancée
Autres articles (83)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (10446)
-
waveforms arent as smooth as they should be
25 mars 2019, par GROVER.So I’ve been trying to create a little clone of SoundClouds ’peaks’ waveform. I have noticed that their waveforms are a lot more streamlined
compared to my sudden shifts in ’loudness’. The dynamic range between peaks never seems to be too steep, and they always represent the perceived loudness of each part of the track pretty well.
Here’s an example :
Notice how all the ’drops’ are fairly distinguishable to the ’breakdowns’ in their waveform, but mine is all over the place (apart from the last drop and breakdown, which are kind of similar). There are some minor similarities, but the ’jaggedness’ is still very prominent even in those areas.
I’m using wav2json as a peaks converter (which is run through the command line and programmed in
C++
). This is is an example of how I use it :/*
* --channels: mids and min
* --db-min (minimum level in dB to capture): -35dB
* --db-max (pretty self explanatory): 6dB
* -d: use logarithmic instead of linear scale
* -s (number of peaks to generate): 1800
* -o (output file): outputfile.json
* -p (precision of floats): 0
* -n: no header
*/
exec("wav2json inputfile.wav -s 1800 --channels mid min -d --db-min -35 --db-max 6 -p 0 -o outputfile.json -n");
$fp = fopen($tmpOutput, "r");
$json = fread($fp, filesize($tmpOutput));
// get mids and min from the generated peaks file
$mid = json_decode($json, true)["mid"];
$min = json_decode($json, true)["min"];
fclose($fp);
unlink($tmpOutput);
/*
* from here I just combine each mid and min value together and divide by two
*
* then I normalise all the peaks (instead of each value being between -0.293 to
* 1.766(just as an example), it is between 0 and 100)
*/What I’m trying to figure out - and have been trying to for the last few months - is how to get each peak more streamlined and to have the dynamic range of each one look how it actually sounds.
What I have tried :
- ffmpeg eqing
- actually eqing the highs and lows in a daw and then comparing waveforms
- using various parameters for wav2json (db min and max, linear etc.)
- using various compressors and multiband compressors on the track
All help is appreciated,
Cheers. -
avformat/webm_chunk : Use API functions for child muxer
29 février 2020, par Andreas Rheinhardtavformat/webm_chunk : Use API functions for child muxer
instead of calling the write_header/packet/trailer functions directly
via the function pointers. Also, use distinct AVStreams for the child
AVFormatContext (up until now the two AVFormatContexts shared their
AVStreams because allocating their own was deemed too onerous).Using the function pointers directly meant that the Matroska muxer's
init-function was never called, because init-functions were only
introduced a few months after webm_chunk has been added and no one
thought of/bothered to adapt webm_chunk for this (when the init-function
was added in b287d7ea, the code setting the timebase was moved to it,
so that the timebases were no longer set to ms-precision when using
the webm_chunk muxer ; this has been fixed after some time in 42a635dd
by setting the timebases direcly (instead of calling the init-function)).And when 982a98a0 added a deinit-function for the Matroska muxer, it
introduced memleaks in webm_chunk, because the child muxer's internal
structures were no longer freed when calling write_trailer directly.
(Given that the init function has never ever been called, the child
muxer has never ever been properly initialized, so that the
deinit-function was not called when freeing the child context.)This commit stops calling the function pointers directly and instead
uses the standard API functions for muxers. This fixes the above
mentioned memleaks. (Memleaks are still possible on error. This will be
fixed in a future commit that adds a deinit-function to webm_chunk
itself.)Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-
How to configure AVStream to write 29.97FPS files using FFmpeg
14 mai 2018, par vtruantI’m trying to write mkv file using ffmpeg to encode in FFV1 and FLAC in NTSC format, but the frame rate shown in VLC and media info are not correct.
Here is how I create and configure the output format context :
AVOutputFormat *outputFormat = av_guess_format("matroska", NULL, NULL);
//Allocate an AVFormatContext for an output format.
int err = avformat_alloc_output_context2(&_formatContext, outputFormat, NULL, filename);
//Specify the codec of the outputFormat
_formatContext->oformat->video_codec = _videoCodecContext->codec_id;
//Create AVStream
AVStream *videoStream = avformat_new_stream(_formatContext, NULL);
//FrameDuration.value : 1001, FrameDuration.timescale : 30000
videoStream->time_base = (AVRational){ (int)_frameDuration.value, (int)_frameDuration.timescale }; //1001 30000
//Copy video stream parameters to the muxer
err = avcodec_parameters_from_context(videoStream->codecpar, _videoCodecContext);
//Open file for writing
err = avio_open(&_formatContext->pb, filename, AVIO_FLAG_WRITE);
if (err >= 0) {
//Write header
err = avformat_write_header(_formatContext, &options);
}Before writing the packet, I use this to convert PTS to the stream time_base
// Rescale output packet timestamp values from codec to stream timebase
av_packet_rescale_ts(inAVPacket, *inTimeStamp, [outputStream stream]->time_base);The thing is that the avformat_write_header method is changing the stream time_base from 30000/1001 to 1/1000, so PTS loose precision. In VLC inspector, the frame rate shown is 1000 fps and in MediaInfo 30.033 fps.
The file is playing correctly and the video/audio sync is OK.
Is there something to do to specify the file frame rate somewhere else ?
Or a work around to avoid changing the time_base when calling avformat_write_header ?