
Recherche avancée
Médias (91)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#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
Autres articles (19)
-
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) (...)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (4705)
-
How to stream live event from my enigma to ustream or youtube using ffmpeg
25 novembre 2014, par user3674244How to stream live event from my enigma to ustream or youtube using ffmpeg
or how can i use m3u files to stream in ustream or youtube live
Note : Im using windows 8.1
thanks
-
How to stream an updating images sequence to rtmp server(youtube) with ffmpeg ?
26 janvier 2020, par TheCuddleDoodleWant to stream an image sequence generated by blender to Youtube rtmp server.
Currently using the following command to do so :
ffmpeg -r 24 -f image2 -s 1080x1920 -i /root/sandbox/new/render%04d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p -f flv rtmp://a.rtmp.youtube.com/live2/******"
but this ends up only streaming the pre rendered images.
are there any arguments available so that the stream doesn’t ends and while the frames are being rendered by blender and ffmpeg keeps on stacking and broadcasting the images ?
-
C++ Invalid read of size 16, Address is 744 bytes inside a block of size 752 alloc'd
17 août 2022, par TurgutI know there are similar questions to this one but I can't seem to find the solution in my own circumstances.


I've made a program using opengl and ffmpeg that uses a buffer to complete it's operations. Normally, the program runs just fine with no errors whatsoever. However when I run my application using valgrind I get this error :


==31277== Invalid read of size 16
==31277== at 0xD27852: memcpy (string_fortified.h:29)
==31277== by 0xD27852: scale_internal (swscale.c:947)
==31277== by 0xD29EE8: sws_scale (swscale.c:1213)
==31277== by 0x268BBC: Videooio::video_encoder::set_frame_yuv_from_rgb(AVFrame*, SwsContext*) (video_encoder.cpp:441)
==31277== by 0x268D18: Videooio::video_encoder::get_video_frame(Videooio::OutputStream*) (video_encoder.cpp:486)
==31277== by 0x269032: write_video_frame (video_encoder.cpp:499)
==31277== by 0x269032: Videooio::video_encoder::encode_one_frame() (video_encoder.cpp:553)
==31277== by 0x22BD89: Videooio::Application::main_loop() (Application.cpp:212)
==31277== by 0x21B007: Videooio::Application::Run() (Application.cpp:70)
==31277== by 0x219C94: main (main.cpp:22)
==31277== Address 0x50df9c8 is 744 bytes inside a block of size 752 alloc'd
==31277== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==31277== by 0x21A970: Videooio::Application::Run() (Application.cpp:40)
==31277== by 0x219C94: main (main.cpp:22)



I've diagnosed the problem down to the following lines but I'm not quite sure how to fix it :


Application.cpp


void Run()
{
 ...
40 encoder = new video_encoder(width, height, fps, duration);
 ...
 while (second < duration)
 {
 auto* fbo = opengl_engine.glBuffer;

 encoder->set_encode_framebuffer(fbo);
212 encoder->encode_one_Frame();
 }
}



video_encoder.h :


namespace Videooio{
class video_encoder{
 public:
 video_encoder(int w, int h, unsigned int fps, unsigned int duration);
 
 void set_encode_framebuffer(uint8_t* data, bool audio_only = false);

 void encode_one_frame();
 ~video_encoder(); 
 private:
 int write_frame(AVFormatContext *fmt_ctx, AVCodecContext *c,
 AVStream *st, AVFrame *frame, AVPacket *pkt);

 AVFrame *get_video_frame(OutputStream *ost);

 int write_video_frame(AVFormatContext *oc, OutputStream *ost);

 uint8_t *rgb_data;

 int width;
 int height;
 
 void set_frame_yuv_from_rgb(AVFrame *frame, struct SwsContext *sws_context);
 
 };
} 



Here is opengl_engine, where fbo is allocated :


...
if (posix_memalign((void**)&glBuffer, 128, (gl_width * gl_height * 4) ) != 0) 
{
 ERROR("Couldn't allocate frame buffer ");
 return false;
}
...



Here is where I set the rgb_data that is inside the encoder (Probably the culprit too) is set to the allocated fbo :


void video_encoder::set_audio_frame(AVFrame* audio, AVSampleFormat* format)
{
 audio_data = *audio;
 input_sample_fmt = *format;
}



rgb_data
is set uninitialized up until this point before it's usage (I've tried mallocing it inside the constructor, which was a horrible practice, but doing so changed nothing.).
And here is where it's used and where valgrind mentions :

void video_encoder::set_frame_yuv_from_rgb(AVFrame *frame, struct SwsContext 
 *sws_context) {
 const int in_linesize[1] = { 4 * width };
 //uint8_t* dest[4] = { rgb_data, NULL, NULL, NULL };
 sws_context = sws_getContext(
 width, height, AV_PIX_FMT_RGBA,
 width, height, AV_PIX_FMT_YUV420P,
 SWS_BICUBIC, 0, 0, 0);
440 std::cout << "Address: " << rgb_data << std::endl;
441 sws_scale(sws_context, (const uint8_t * const *)&rgb_data, in_linesize, 0,
442 height, frame->data, frame->linesize);
}



I'm not %100 sure whether
rgb_data
is causing this error or not but digging intosws_scale
and finding wherememcpy
is used shows thatrgb_data
is used inside it.

I've tried changing the buffer size of
glBuffer
to no avail since valgrind allways says744 bytes inside a block of size 752
the size of which the error mentions is not changing when I changeglBuffer
s size, this led me to believe thatrgb_data
might not be the culprit. But it's still my best bet.

I've looked into these questions but I just can't seem to apply them to my own circumstance.


Question 1
Question 2


I'm using ubuntu.