
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (88)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
La gestion des forums
3 novembre 2011, parSi les forums sont activés sur le site, les administrateurs ont la possibilité de les gérer depuis l’interface d’administration ou depuis l’article même dans le bloc de modification de l’article qui se trouve dans la navigation de la page.
Accès à l’interface de modération des messages
Lorsqu’il est identifié sur le site, l’administrateur peut procéder de deux manières pour gérer les forums.
S’il souhaite modifier (modérer, déclarer comme SPAM un message) les forums d’un article particulier, il a à sa (...)
Sur d’autres sites (11710)
-
OpenCV and GoPro - empty frames in VideoCapture stream
19 mai 2014, par NovatarI have a GoPro Hero 3+ (Black) which is connected to a video capture card (AverMedia Game Broadcaster HD). I simply want to get the video stream in OpenCV. With a Logitech Webcam there are no problems. The used code is below.
VideoCapture cap;
cap.open(0);
waitKey(300);
//cap.set(CV_CAP_PROP_FRAME_WIDTH, 1280);
//cap.set(CV_CAP_PROP_FRAME_HEIGHT, 720);
if (cap.isOpened()){
cout << "Cam identified" << endl;
}
namedWindow("dst", 1);
while (1){
Mat frame;
if (!cap.read(frame)) {
std::cout << "Unable to read frame from video stream" << std::endl;
continue;
}
imshow("dst", frame);
[...]
}With the GoPro the following happens : OpenCV is able to open the VideoCapture ("Cam identified") but can’t read any frames (just a gray screen and the output : "Unable to read frame from video stream"). I also checked this with frame.empty() ;.
I know that the video capture card works correct because Unity opens a WebCamTexture with the GoPro stream without any issues. I read about codec problems in OpenCv and so I already tried to compile OpenCV with FFMPEG support. Now the recorded MP4-Videos of the GoPro can be displayed but the stream still doesn’t work.
I use OpenCV 2.48, Windows 7 and Visual Studio 2013.
EDIT : Here is the code of libVLC solution :
struct ctx
{
uint8_t* pixeldata;
std::mutex imagemutex;
};
static void display(void *data, void *id);
static void unlock(void *data, void *id, void *const *p_pixels);
static void *lock(void *data, void **p_pixels);
struct ctx ctx;
libvlc_instance_t *inst;
libvlc_media_player_t *mp;
libvlc_media_t *m;
int main(int argc, char* argv[])
{
ctx.pixeldata = new uint8_t[1280 * 720 * 3];
char const *vlc_argv[] =
{
"-vvv",
"--no-audio", /* skip any audio track */
"--no-xlib", /* tell VLC to not use Xlib */
};
int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv);
inst = libvlc_new(vlc_argc, vlc_argv);
const char *options[] =
{
":dshow-vdev=AVerMedia HD Capture",
":dshow-adev=none",
//":dshow-size=1280x720",
":dshow-fps=24",
":dshow-chroma=YUY2",
":dshow-video-input=1",
":dshow-video-output=1",
":dshow-aspect-ratio=16\:9",
":live-caching=80",
NULL
};
m = libvlc_media_new_location(inst, "dshow://");
for (const char **opt = options; *opt; opt++)
libvlc_media_add_option(m, *opt);
mp = libvlc_media_player_new_from_media(m);
libvlc_media_release(m);
libvlc_video_set_callbacks(mp, lock, unlock, display, &ctx);
libvlc_video_set_format(mp, "RV24", 1280, 720, 1280 * 3);
libvlc_media_player_play(mp);
namedWindow("all", 1);
Mat frame(720, 1280, CV_8UC3);
while (1){
ctx.imagemutex.lock();
memcpy(gesamt.data, ctx.pixeldata, 1280 * 720 * sizeof(uint8_t) * 3);
ctx.imagemutex.unlock();
imshow("all", gesamt);
if (waitKey(30) == 27) //wait for 'esc' key press for 30ms. If 'esc' key is pressed, break loop
{
cout << "esc key is pressed by user" << endl;
break;
}
}
libvlc_media_player_stop(mp);
libvlc_media_player_release(mp);
libvlc_release(inst);
delete[] ctx.pixeldata;
return 0;
}
void display(void *data, void *id){
(void)data;
assert(id == NULL);
}
void unlock(void *data, void *id, void *const *p_pixels){
struct ctx *ctx = (struct ctx*)data;
ctx->imagemutex.unlock();
assert(id == NULL);
}
void *lock(void *data, void **p_pixels){
struct ctx *ctx = (struct ctx*)data;
ctx->imagemutex.lock();
*p_pixels = ctx->pixeldata;
return NULL;
} -
frame_thread_encoder : use ref-counting to avoid memcpy of all input frames
23 décembre 2014, par Hendrik Leppkes -
Conversion from Iphone Core Surface RGB Frame into ffmepg AVFarme
10 mars 2015, par RaghuI am trying to convert Core Surface RGB frame buffer(Iphone) to ffmpeg Avfarme to encode into a movie file. But I am not getting the correct video output (video showing colors dazzling not the correct picture)
I guess there is something wrong with converting from core surface frame buffer into AVFrame.
Here is my code :
Surface *surface = [[Surface alloc]initWithCoreSurfaceBuffer:coreSurfaceBuffer];
[surface lock];
unsigned int height = surface.height;
unsigned int width = surface.width;
unsigned int alignmentedBytesPerRow = (width * 4);
if (!readblePixels) {
readblePixels = CGBitmapAllocateData(alignmentedBytesPerRow * height);
NSLog(@"alloced readablepixels");
}
unsigned int bytesPerRow = surface.bytesPerRow;
void *pixels = surface.baseAddress;
for (unsigned int j = 0; j < height; j++) {
memcpy(readblePixels + alignmentedBytesPerRow * j, pixels + bytesPerRow * j, bytesPerRow);
}
pFrameRGB->data[0] = readblePixels; // I guess here is what I am doing wrong.
pFrameRGB->data[1] = NULL;
pFrameRGB->data[2] = NULL;
pFrameRGB->data[3] = NULL;
pFrameRGB->linesize[0] = pCodecCtx->width;
pFrameRGB->linesize[1] = 0;
pFrameRGB->linesize[2] = 0;
pFrameRGB->linesize[3] = 0;
sws_scale (img_convert_ctx, pFrameRGB->data, pFrameRGB->linesize,
0, pCodecCtx->height,
pFrameYUV->data, pFrameYUV->linesize);Please help me out.
Thanks,
Raghu