
Recherche avancée
Autres articles (81)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (5302)
-
Merge commit ’d316f9cefcd854071985c6f524a9a15348240264’
31 mars 2017, par James Almer -
libFLAC/md5.c : Massive refactoring of format_input_ function.
29 juin 2014, par Erik de Castro LopolibFLAC/md5.c : Massive refactoring of format_input_ function.
This refactoring is in preparation for fixing the cast-align warning when
compiling on ARM (and possibly others). Testing on stereo 16 bit files
suggests that the difference between the performance of this code and the
old code is negligible (tested only on amd64/linux). -
How do you specify container format in FFmpeg ?
15 avril 2021, par TheNeuronalCoderI am trying to encode mp4 video, but it doesn't open on my macbook because while it has the supported H264 codec, the container format is not MP4. So all I ask is how you would go about specifying the container format so I can generate video that is actually playable without using ffplay.


ffprobe version N-101948-g870bfe1 Copyright (c) 2007-2021 the FFmpeg developers
 built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
 configuration: --disable-asm --enable-shared --enable-libx264 --enable-gpl
 libavutil 56. 72.100 / 56. 72.100
 libavcodec 58.136.101 / 58.136.101
 libavformat 58. 78.100 / 58. 78.100
 libavdevice 58. 14.100 / 58. 14.100
 libavfilter 7.111.100 / 7.111.100
 libswscale 5. 10.100 / 5. 10.100
 libswresample 3. 10.100 / 3. 10.100
 libpostproc 55. 10.100 / 55. 10.100
Input #0, h264, from 'animation.mp4':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 24.33 fps, 24 tbr, 1200k tbn, 48 tbc



void imagine::Camera::Record() {
 if (recording_ == true)
 throw std::runtime_error(
 "you must close your camera before starting another recording"
 );
 recording_ = true;

 output_file_ = std::fopen(output_.c_str(), "wb");
 if (!output_file_)
 throw std::runtime_error("failed to open file");

 AVCodec* codec = avcodec_find_encoder(AV_CODEC_ID_H264);
 if (!codec)
 throw std::runtime_error("failed to find codec");

 context_ = avcodec_alloc_context3(codec);
 if (!context_)
 throw std::runtime_error("failed to allocate video codec context");

 packet_ = av_packet_alloc();
 if (!packet_)
 throw std::runtime_error("failed to allocate video packet");

 py::tuple size = py::globals()["main_scene"].attr("size");
 context_->width = size[0].cast<int>();
 context_->height = size[1].cast<int>();
 context_->bit_rate = 0.4 * fps_ * context_->width * context_->height;
 context_->time_base = (AVRational){ 1, fps_ };
 context_->framerate = (AVRational){ fps_, 1 };
 context_->gop_size = 10;
 context_->max_b_frames = 1;
 context_->pix_fmt = AV_PIX_FMT_YUV420P;

 if (avcodec_open2(context_, codec, NULL) < 0)
 throw std::runtime_error("failed to open codec");

 frame_ = av_frame_alloc();
 if (!frame_)
 throw std::runtime_error("failed to allocate video frame");

 frame_->width = context_->width;
 frame_->height = context_->height;
 frame_->format = AV_PIX_FMT_YUV420P;

 if (av_frame_get_buffer(frame_, 0) < 0)
 throw std::runtime_error("failed to allocate the video frame data");
}
</int></int>