
Recherche avancée
Médias (91)
-
DJ Z-trip - Victory Lap : The Obama Mix Pt. 2
15 septembre 2011
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (21)
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (4848)
-
avformat/hlsenc : Add deinit function
15 décembre 2019, par Andreas Rheinhardtavformat/hlsenc : Add deinit function
This fixes memleaks in instances such as :
a) When an allocation fails at one of the two places in hls_init() where
the error is returned immediately without goto fail first.
b) When an error happens when writing the header.
c) When an allocation fails at one of the three places in
hls_write_trailer() where the error is returned immediately without goto
fail first.
d) When one decides not to write the trailer at all (e.g. because of
errors when writing packets).
Furthermore, it removes code duplication and allows to return
immediately, without goto fail first.Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-
ffmpeg wont "gracefully" terminate using q or kill -2
24 mai 2023, par Jeff ThompsonI am trying to run a bash command on Ubuntu to pull video from a stream and make an .mp4 with it. Here is the command I am using.


ffmpeg -rtsp_transport tcp -i 'rtsp://username:password!@ipaddress/?inst=1' -c copy -f segment -segment_time 180 -reset_timestamps 1 ipaddress_day_3_2_%d.mp4


It connects and begins copying the stream fine, the issue comes with trying to stop the process. It states press [q] to stop, which does not work. I have also tried kill -2 pid and kill -15 pid. Where pid is the process id. However kill -9 pid works and ctrl+c works. The issue with killing it this way is it corrupts the .mp4 rendering it useless. This is the error I get when using ctrl+c or kill -9.


av_interleaved_write_frame(): Immediate exit requested [segment @ 0x56337ec42980] Failure occurred when ending segment 'ipaddress_day_3_2_0.mp4' Error writing trailer of ipaddress_day_3_2_0%d.mp4: Immediate exit requested


One thing to note is pressing [q] did work once, when I first started working on this but has not since.


Thank You.


I have tried kill -2 pid, kill -15 pid and [q], which I expected to "gracefully" terminate it.
kill -9 pid and ctrl+c will forcefully terminate it but corrupt the file.


-
How to write a video file using FFmpeg
15 janvier 2024, par SummitI am trying to write a video file using FFMPEG but i get the following errors


[libx264 @ 000002bdf90c3c00] broken ffmpeg default settings detected
[libx264 @ 000002bdf90c3c00] use an encoding preset (e.g. -vpre medium)
[libx264 @ 000002bdf90c3c00] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 000002bdf90c3c00] speed presets are listed in x264 --help
[libx264 @ 000002bdf90c3c00] profile is optional; x264 defaults to high
</profile></speed>


This is my code


#pragma warning(disable : 4996)

extern "C" {
#include <libavformat></libavformat>avformat.h>
#include <libavutil></libavutil>opt.h>
#include <libavutil></libavutil>mathematics.h>
#include <libswscale></libswscale>swscale.h>
}

int main() {
 av_register_all();
 AVFormatContext* formatContext = nullptr;
 AVOutputFormat* outputFormat = nullptr;
 AVStream* videoStream = nullptr;

 const char* filename = "output.mp4";

 // Open the output file
 if (avformat_alloc_output_context2(&formatContext, nullptr, nullptr, filename) < 0) {
 fprintf(stderr, "Error allocating output format context\n");
 return -1;
 }

 outputFormat = formatContext->oformat;

 // Add a video stream
 videoStream = avformat_new_stream(formatContext, nullptr);
 if (!videoStream) {
 fprintf(stderr, "Error creating video stream\n");
 return -1;
 }

 // Set codec parameters, you may need to adjust these based on your needs
 AVCodecContext* codecContext = avcodec_alloc_context3(nullptr);
 codecContext->codec_id = outputFormat->video_codec;
 codecContext->codec_type = AVMEDIA_TYPE_VIDEO;
 codecContext->pix_fmt = AV_PIX_FMT_YUV420P;
 codecContext->width = 640;
 codecContext->height = 480;
 codecContext->time_base = { 1, 25 };

 // Open the video codec
 AVCodec* videoCodec = avcodec_find_encoder(codecContext->codec_id);
 if (!videoCodec) {
 fprintf(stderr, "Error finding video codec\n");
 return -1;
 }

 if (avcodec_open2(codecContext, videoCodec, nullptr) < 0) {
 fprintf(stderr, "Error opening video codec\n");
 return -1;
 }

 videoStream->codecpar->codec_id = codecContext->codec_id;
 videoStream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
 videoStream->codecpar->format = codecContext->pix_fmt;
 videoStream->codecpar->width = codecContext->width;
 videoStream->codecpar->height = codecContext->height;

 if (avformat_write_header(formatContext, nullptr) < 0) {
 fprintf(stderr, "Error writing header\n");
 return -1;
 }

 // Create a frame
 AVFrame* frame = av_frame_alloc();
 frame->format = codecContext->pix_fmt;
 frame->width = codecContext->width;
 frame->height = codecContext->height;
 av_frame_get_buffer(frame, 32);

 // Fill the frame with red color
 for (int y = 0; y < codecContext->height; ++y) {
 for (int x = 0; x < codecContext->width; ++x) {
 frame->data[0][y * frame->linesize[0] + x * 3] = 255; // Red component
 frame->data[0][y * frame->linesize[0] + x * 3 + 1] = 0; // Green component
 frame->data[0][y * frame->linesize[0] + x * 3 + 2] = 0; // Blue component
 }
 }

 // Write video frames
 AVPacket packet;
 for (int i = 0; i < 100; ++i) {
 // Send the frame for encoding
 if (avcodec_send_frame(codecContext, frame) < 0) {
 fprintf(stderr, "Error sending a frame for encoding\n");
 return -1;
 }

 // Receive the encoded packet
 while (avcodec_receive_packet(codecContext, &packet) == 0) {
 // Write the packet to the output file
 if (av_write_frame(formatContext, &packet) != 0) {
 fprintf(stderr, "Error writing video frame\n");
 return -1;
 }
 av_packet_unref(&packet);
 }
 }

 // Write the trailer
 if (av_write_trailer(formatContext) != 0) {
 fprintf(stderr, "Error writing trailer\n");
 return -1;
 }

 // Clean up resources
 av_frame_free(&frame);
 avcodec_free_context(&codecContext);
 avformat_free_context(formatContext);

 return 0;
}