
Recherche avancée
Autres articles (111)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
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
Sur d’autres sites (8888)
-
Streaming images with ffmpeg gives shorter video
24 juin 2014, par darko_5I am streaming a video form my camera by passing to ffmpeg images from that camera. I am using command :
ffmpeg -r 26 -re -f image2pipe -vcodec mjpeg -i - -c:v libx264 -f flv -preset ultrafast -s hd720 -maxrate 2000k -bufsize 150k rtmp://someaddress:port
My problem is that, when light is weak and/or computer is slow my fps number is getting lower, even so i set it to
-r 26
. Low fps causing that video playad on web side is sometimes in fast motion and file i save to disk is shorter than it should.
My opereting system is OS X. How can i do it so the video i s in proper speed. -
OpenCV OSX Mavericks video codec issue
29 juin 2014, par AbhischekFirstly, I’ve installed ffmpeg using
sudo port install ffmpeg
on my Macbook OSX 10.9 and XCode 5.1. I’ve done the same for OpenCV
sudo port install opencv
and I got face detect working using this SO answer. However, when trying to open a video file in the source code folder using VideoCapture I get the error "WARNING : Couldn’t read movie file Alireza_Day1_001.avi". Has anyone faced the same issue ? (FYI VideoCapture from my webcam is working fine, but tried opening a .mov and .avi file without luck) Any help is much appreciated !
-
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.