
Recherche avancée
Autres articles (18)
-
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 (...)
-
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 (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)
Sur d’autres sites (5449)
-
FFMPEG corrupted frame when streaming in UDP (MPEGTS)
17 décembre 2020, par user37616I am working on a screen streaming program, till now, I can capture and encode my screen into a video perfectly. 
However, whenever I try to stream it over LAN, and play using Mplayer, it is able to run in simple desktop (text document, etc...) but when I try to play video the frame stated to corrupted until I quit the video (this video cause the most corrupted frame https://www.youtube.com/watch?v=1La4QzGeaaQ&t=230s)



I am not really sure why when streaming, I got corrupted frame with the youtube video but when save it to a file (change URL from udp ://192.168.1.xxx:YYYY to file name C :\Test.ts) there were no corrupted frame at all.
 My Mplayer log :



`V: 0.0 1563/1563 51% 43% 0.0% 0 0
[h264 @ 0000000001d04940]Invalid NAL unit 0, skipping.
[h264 @ 0000000001d04940]error while decoding MB 23 51, bytestream -64
[h264 @ 0000000001d04940]concealing 2066 DC, 2066 AC, 2066 MV errors in I frame
V: 0.0 1564/1564 51% 43% 0.0% 0 0
[h264 @ 0000000001d04940]concealing 7598 DC, 7598 AC, 7598 MV errors in P frame
V: 0.0 1652/1652 50% 43% 0.0% 0 0
[h264 @ 0000000001d04940]Invalid NAL unit 0, skipping.
[h264 @ 0000000001d04940]error while decoding MB 26 49, bytestream -55
[h264 @ 0000000001d04940]concealing 2303 DC, 2303 AC, 2303 MV errors in I frame
V: 0.0 1653/1653 50% 43% 0.0% 0 0
[h264 @ 0000000001d04940]concealing 7727 DC, 7727 AC, 7727 MV errors in P frame
V: 0.0 1741/1741 49% 43% 0.0% 0 0
[h264 @ 0000000001d04940]Invalid NAL unit 0, skipping.
[h264 @ 0000000001d04940]error while decoding MB 65 62, bytestream -57
[h264 @ 0000000001d04940]concealing 704 DC, 704 AC, 704 MV errors in I frame
V: 0.0 1742/1742 49% 43% 0.0% 0 0`




Stream initialize code



static void Stream_ini(const char *Url, AVFormatContext *&ofmt_ctx, AVCodec *codec, AVCodecContext *c, AVStream *&out_stream)
{
 int ret;


 avformat_alloc_output_context2(&ofmt_ctx, NULL, "mpegts", Url);
 out_stream = avformat_new_stream(ofmt_ctx, codec)
 out_stream->codec = c;
 av_dump_format(ofmt_ctx, 0, Url, 1);


 if (ofmt_ctx->oformat->flags & AVFMT_GLOBALHEADER)
 out_stream->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
 if (!(ofmt_ctx->flags & AVFMT_NOFILE))
 {
 ret = avio_open(&ofmt_ctx->pb, Url, AVIO_FLAG_WRITE);
 if (ret < 0)
 {
 printf("Could not open output URL '%s'", Url);
 return;
 }
 }


 ret = avformat_write_header(ofmt_ctx, NULL);

 if (ret < 0)
 {
 printf("Error occurred when opening output URL\n");
 return;
 }


}




this code will get the captured screen and send it to encoder :



ScreenCap.load_screen_data(inFrame,timmer) // this will capture screen and return the time and AVFrame for encoding
sws_scale(ctx, inFrame->data, inFrame->linesize, 0,c->height, frame->data, frame->linesize);

frame->pts = (timmer - first_frame_time) / fps;
EncodeToPkT(c, frame, pkt, ofmt_ctx,out_stream);

av_frame_free(&inFrame);




the AVFrame will then be send to encoder using avcodec_send_frame() to get Packet data and av_interleaved_write_frame() to stream it over LAN.



All error check are removed for simplicity



Also, this is my AVCodecContex setting for the encoder :



c->bit_rate = 15000000;
c->width = 1920;
c->height = 1080;
c->time_base = AVRational{ 1, 90 };
c->framerate = AVRational{ 90, 1 };
c->gop_size = 90;
c->max_b_frames = 0;
c->pix_fmt = AV_PIX_FMT_RGB0;




I also notice it only happen when I increase encoder bitrate (15 MBIT) but when lower it down to (10 MBIT) it happen less. And when lower it down to 2 MBIT the corrupted frame not happen anymore however the quality is really bad.

I test the streaming in LAN using : PC -> cable ->laptop, PC->wireless->laptop, PC->Virtual PC, PC only (enter PC IP address in both program and Mplayer), all got the same result.


I also test my DXGICap.load_screen_data function by make it output raw image and there were no corrupted image at all



Does anybody have an idea why.



Thank Nam.


-
ffmpeg, how to extract single frame, 0.5 seconds before the end ? [duplicate]
24 avril 2020, par TonnyI've got a bunch (several 100) of videos (all different frame-rates and different lengths).

Each has an end-title during the last second of the video, that shows some important information I need to check.

Playing each video in a player, scrolling to the end and trying to pause it in the last second is just to cumbersome/time-consuming.

Grabbing a frame at that position and saving it as an image for each video lets me quickly check the info using the image-preview in my file-manager. Which is much more efficient.


ffmpeg can capture single frames and write them to a jpg or png, but I am at a loss how to extract a frame in the middle of that title sequence. 0.5 seconds before the end of each video would be the sweet spot. (There is a animation effect during that 1 second sequence that makes the text in the video sometimes hard to read, but exactly in the middle the visibility is best.)

As far as I can tell ffmpeg can't use offsets "from the end", so I assume ffprobe is probably needed to analyze the video and on basis off that the correct ffmpeg command can be generated.


I can handle the scripting around it to batch-process all the files.

Problem is that I'm very unfamiliar with video in general, ffmpeg and ffprobe in particular. I need some help to get started.

If someone can explain to me how to get from the full video 'clip.mp4' to the single frame 0.5 seconds before the end in 'clip_frame.jpg' I would be most grateful.

-
avfilter/vf_separatefields : stop leaking last frame
8 août 2017, par Paul B Mahol