
Recherche avancée
Autres articles (26)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (4978)
-
saving H.264 encoded images with libavcodec
8 octobre 2011, par user846400I am getting H.264 images from an IP camera and want to save the encoded images (without decoding). I am using output-example.c from ffmpeg (libavformat/output-example.c) for this purpose. For Saving the raw H.264 image, I do the following :
AVPacket pkt;
av_init_packet(&pkt);
if (c->coded_frame->pts != AV_NOPTS_VALUE)
pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
if(c->coded_frame->key_frame)
pkt.flags |= PKT_FLAG_KEY;
pkt.stream_index= st->index;
pkt.data= (uint8_t *)ulAddr;//video_outbuf;
pkt.size= out_size;
save_image(pkt.data, out_size);Where ulAddr is the address pointer to the image and out_size is the image size. Instead of saving the images to a media video file, I want to save the individual images. save_image function simply uses basic fopen and fwrite functions for saving the images. If I decode the frame and then save, everything works fine. But I have problem saving the encoded frames. The encoded frames are saved with a very small size and then they cannot be decoded.
Is there anything wrong ? I will really appreciate any help in this regard. -
rtmpproto : Validate the embedded flv packet size before copying
3 octobre 2013, par Martin Storsjörtmpproto : Validate the embedded flv packet size before copying
This wasn’t an issue prior to 58404738, when the whole RTMP packet
was copied at once and the length of the individual embedded flv
packets only were validated by the flv demuxer.Prior to this patch, this could lead to reads and writes out of bound.
Signed-off-by : Martin Storsjö <martin@martin.st>
-
Extract specific frames of youtube video without downloading video
22 janvier 2023, par Kashish AroraI need to extract specific frames of an online video to work on an algorithm but I don't want to download the whole video because that would make it highly inefficient.


For starters, I tried working with youtube videos. I can download whole of the video using
youtube-dl
in this way :

ydl_opts = {'outtmpl': r'OUTPUT_DIRECTORY_HERE',}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 ydl.download([url])



And then I can capture individual frames.


I need to avoid downloading the whole video. After some research, I have found that
ffmpeg
might help me do this. I found no way to download just the frames so if this is not possible, the second option is that I can download specific portions of the video. One such example in linux is here but I couldn't find any solution for python.

What is a good way to download just the frames, or portions of videos (in python) without downloading the entire thing ?