
Recherche avancée
Autres articles (61)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)
Sur d’autres sites (5607)
-
yet another screenshot encoding exercise with ffmpeg - stuck at getting AVFrame from ALT::CImage - VC++
11 septembre 2013, par sithTotal AV newbee here - trying to learn the ropes on using FFMpeg functions to encode movies. On searching for tutorials I found a few similar questions that I have linked here for reference :
Encoding a screenshot into a video using FFMPEG
[Libav-user] Encoding a screenshot into a video using FFMPEG
Save bitmap to video (libavcodec ffmpeg)
When converting from RGB to YUV using ffmpeg the video file the color is spread why ?
How to convert RGB from YUV420p for ffmpeg encoder ?
Encode bmp sequence with libavcodec...Help !
Not able to encode image with ffmpeg
For my setup FFMPEG is on VS12 - VC++ with MFC on win7.
With the help of above samples, I am able to get "some" output from the encoder, but I am not sure in what format or state the output has been encoded. Neither VLC nor WMP can play this file. It does not even seem to recognize the metadata in the file to display the FPS or video length. What would normally cause that ? Also any pointers on what could be going wrong and how to approach fixing the problems would be great. [1]
Here is the flow of my code :
Step1 : capture desktop on to a CImg :
int W=GetSystemMetrics(SM_CXSCREEN), H=GetSystemMetrics(SM_CYSCREEN), bpp=24;
CImage cImg; cImg.Create(W,H,bpp)
HDC hDC = cImg.GetDC();
CWindowDC winDC(GetDesktopWindow());
BitBlt(hDC, 0,0, rez.W(), rez.H(), winDC.m_hDC, 0, 0, SRCCOPY);At this point I am able to dump a screen shot into a bmp file -
using cImg.Save( _T("test.bmp"), Gdiplus::ImageFormatBMP) ;Step2 : Extract the BMP bits from the CImg.
HBITMAP hBitmap = (HBITMAP)cImg;
HDC memDC = CreateCompatibleDC(NULL);
SelectObject( memDC, hBitmap );
BITMAPINFO bmi; // initialized bmi with {W,-H, plane=1, bitCount=24, comp=BI_RGB, size=W*H*3 }
<< removed bmi init code for conciseness. >>>
BYTE *rgb24Data = new BYTE[W*H*3]; // 3 for 24bpp. 4 for 32...
int ret = GetDIBits(memDC, hBitmap, 0, H, rgb24Data, &bmi, DIB_RGB_COLORS);At this point I faithfully believe rgb24Data points to pixel data :) - copied out of the cImg bitmap
Step 3 : next I try to create an AV frame with the rgb24Data got from this CImg. Also this is where I have a massive knowledge gap. I am going to try and recover
// setup the codecs and contexts here as per mohM's post
AVCodec *currCodec = avcodec_find_encoder(CODEC_ID_MPEG4);
AVCodecContext *codeCtxt = avcodec_alloc_context(); // init this with bate=400k, W, H,
<< removed codeCtxt init code for conciseness. >>> // time base 1/25, gop=10, max_b=1, fmt=YUV420
avcodec_open(codeCtxt, currCodec);
SwsContext *currSWSCtxt = sws_getContext( W, H, AV_PIX_FMT_RGB24, // FROM
W, H, AV_PIX_FMT_YUV420P, // TO
SWS_FAST_BILINEAR,
NULL, NULL, NULL);
// allocate and fill AVFrame
int numBytes = avpicture_get_size(PIX_FMT_YUV420P, W, H);
uint8_t *buffer=new uint8_t[numBytes];
AVFrame *avFrame = avcodec_alloc_frame();
avpicture_fill( (AVPicture*)avFrame, buffer, PIX_FMT_YUV420P, W, H );Step 4 : transform the data frame into YUV420P as we fill the frame.
uint8_t * inData[1] = { rgb24Data };
int inLinesize[1] = { 3*W }; // RGB stride
sws_scale( currSWSCtxt, inData, inLinesize, 0, H,
avFrame->data, avFrame->linesize);step 5 encode the frame and write out the output buffer into a file.
int out_size = avcodec_encode_video( codeCtxt,
outBuf,
outBufSize,
avFrame );
fwrite(outBuf, 1, outBufSize, outFile );finally I close the file off with [0x00 0x00 0x01 0xb7]
The first hint of things gone haywire is that for a 50 screens of 1920X1080 at 24bpp encoded at 25fps gives me a 507MB unplayable-mpeg file.
As mentioned earlier, neither VLC nor WMP can play this file nor they even recognize the metadata in the file to display the FPS or video length. What would normally cause that ? Also any pointers on what could be going wrong and how to approach fixing the problems would be great. [2]
Any guidance is much appreciated.
-
Bump dates to 2014
5 janvier 2014, par Henrik GramnerBump dates to 2014
Also update AUTHORS file and my e-mail address in the headers of various files.
- [DH] AUTHORS
- [DH] common/arm/asm.S
- [DH] common/arm/cpu-a.S
- [DH] common/arm/dct-a.S
- [DH] common/arm/dct.h
- [DH] common/arm/deblock-a.S
- [DH] common/arm/mc-a.S
- [DH] common/arm/mc-c.c
- [DH] common/arm/mc.h
- [DH] common/arm/pixel-a.S
- [DH] common/arm/pixel.h
- [DH] common/arm/predict-a.S
- [DH] common/arm/predict-c.c
- [DH] common/arm/predict.h
- [DH] common/arm/quant-a.S
- [DH] common/arm/quant.h
- [DH] common/bitstream.c
- [DH] common/bitstream.h
- [DH] common/cabac.c
- [DH] common/cabac.h
- [DH] common/common.c
- [DH] common/common.h
- [DH] common/cpu.c
- [DH] common/cpu.h
- [DH] common/dct.c
- [DH] common/dct.h
- [DH] common/deblock.c
- [DH] common/frame.c
- [DH] common/frame.h
- [DH] common/macroblock.c
- [DH] common/macroblock.h
- [DH] common/mc.c
- [DH] common/mc.h
- [DH] common/mvpred.c
- [DH] common/opencl.c
- [DH] common/opencl.h
- [DH] common/osdep.c
- [DH] common/osdep.h
- [DH] common/pixel.c
- [DH] common/pixel.h
- [DH] common/ppc/dct.c
- [DH] common/ppc/dct.h
- [DH] common/ppc/deblock.c
- [DH] common/ppc/mc.c
- [DH] common/ppc/mc.h
- [DH] common/ppc/pixel.c
- [DH] common/ppc/pixel.h
- [DH] common/ppc/ppccommon.h
- [DH] common/ppc/predict.c
- [DH] common/ppc/predict.h
- [DH] common/ppc/quant.c
- [DH] common/ppc/quant.h
- [DH] common/predict.c
- [DH] common/predict.h
- [DH] common/quant.c
- [DH] common/quant.h
- [DH] common/rectangle.c
- [DH] common/rectangle.h
- [DH] common/set.c
- [DH] common/set.h
- [DH] common/sparc/pixel.asm
- [DH] common/sparc/pixel.h
- [DH] common/threadpool.c
- [DH] common/threadpool.h
- [DH] common/vlc.c
- [DH] common/win32thread.c
- [DH] common/win32thread.h
- [DH] common/x86/bitstream-a.asm
- [DH] common/x86/cabac-a.asm
- [DH] common/x86/const-a.asm
- [DH] common/x86/cpu-a.asm
- [DH] common/x86/dct-32.asm
- [DH] common/x86/dct-64.asm
- [DH] common/x86/dct-a.asm
- [DH] common/x86/dct.h
- [DH] common/x86/deblock-a.asm
- [DH] common/x86/mc-a.asm
- [DH] common/x86/mc-a2.asm
- [DH] common/x86/mc-c.c
- [DH] common/x86/mc.h
- [DH] common/x86/pixel-32.asm
- [DH] common/x86/pixel-a.asm
- [DH] common/x86/pixel.h
- [DH] common/x86/predict-a.asm
- [DH] common/x86/predict-c.c
- [DH] common/x86/predict.h
- [DH] common/x86/quant-a.asm
- [DH] common/x86/quant.h
- [DH] common/x86/sad-a.asm
- [DH] common/x86/sad16-a.asm
- [DH] common/x86/trellis-64.asm
- [DH] common/x86/util.h
- [DH] common/x86/x86inc.asm
- [DH] common/x86/x86util.asm
- [DH] encoder/analyse.c
- [DH] encoder/analyse.h
- [DH] encoder/cabac.c
- [DH] encoder/cavlc.c
- [DH] encoder/encoder.c
- [DH] encoder/lookahead.c
- [DH] encoder/macroblock.c
- [DH] encoder/macroblock.h
- [DH] encoder/me.c
- [DH] encoder/me.h
- [DH] encoder/ratecontrol.c
- [DH] encoder/ratecontrol.h
- [DH] encoder/rdo.c
- [DH] encoder/set.c
- [DH] encoder/set.h
- [DH] encoder/slicetype-cl.c
- [DH] encoder/slicetype.c
- [DH] filters/filters.c
- [DH] filters/filters.h
- [DH] filters/video/cache.c
- [DH] filters/video/crop.c
- [DH] filters/video/depth.c
- [DH] filters/video/fix_vfr_pts.c
- [DH] filters/video/internal.c
- [DH] filters/video/internal.h
- [DH] filters/video/resize.c
- [DH] filters/video/select_every.c
- [DH] filters/video/source.c
- [DH] filters/video/video.c
- [DH] filters/video/video.h
- [DH] input/avs.c
- [DH] input/ffms.c
- [DH] input/input.c
- [DH] input/input.h
- [DH] input/lavf.c
- [DH] input/raw.c
- [DH] input/thread.c
- [DH] input/timecode.c
- [DH] input/y4m.c
- [DH] output/flv.c
- [DH] output/flv_bytestream.c
- [DH] output/flv_bytestream.h
- [DH] output/matroska.c
- [DH] output/matroska_ebml.c
- [DH] output/matroska_ebml.h
- [DH] output/mp4.c
- [D
-
Revision 81637 : Une typo qui n’affichait pas la bonne icône pour les auteurs "À confirmer" ...
27 mars 2014, par real3t@… — LogUne typo qui n’affichait pas la bonne icône pour les auteurs "À confirmer"
Et le lien vers la modification du statut de l’auteur dans le mail informant de l’inscription d’une personne.