
Recherche avancée
Autres articles (59)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Les images
15 mai 2013 -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (6797)
-
Ip camera using ffmpeg drawing on screen
6 mars 2014, par user3177342I'm using ffmpeg 1.2 to take video from ip camera.I make it draw on the screen, so I wonder if there is some event mechanism to to know if it is time to call av_read_frame ?
If I read frame not so frequent as the camera gives frames i get segmentation fault = on some malloc functions inside ffmpeg routines(video_get_buffer)I also get segmentation fault just when drawing on screen.
In Render function call every 0 miliseconds
void BasicGLPane::DrawNextFrame()
{
int f=1;
while(av_read_frame(pFormatCtx, &packet)>=0)
{
// Is this a packet from the video stream?
if(packet.stream_index==videoStream)
{
// Decode video frame
avcodec_decode_video2(pCodecCtx, pFrame, &FrameFinished,
&packet);
// Did we get a video frame?
if(FrameFinished)
{
f++;
this->fram->Clear();
// if (pFrame->pict_type == AV_PICTURE_TYPE_I) wxMessageBox("I cadr");
if (pFrame->pict_type != AV_PICTURE_TYPE_I)
printMVMatrix(f, pFrame, pCodecCtx);
pFrameRGB->linesize[0]= pCodecCtx->width*3; // in case of rgb4 one plane
sws_scale(swsContext, pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pFrameRGB->data, pFrameRGB->linesize);
//glGenTextures(1, &VideoTexture);
if ((*current_Vtex)==VideoTexture) current_Vtex = &VideoTexture2;else current_Vtex = &VideoTexture;
glBindTexture(GL_TEXTURE_2D, (*current_Vtex));
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, pCodecCtx->width, pCodecCtx->height, GL_RGB, GL_UNSIGNED_BYTE, pFrameRGB->data[0]);
//glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, pCodecCtx->width, pCodecCtx->height, 0, GL_RGB, GL_UNSIGNED_BYTE, pFrameRGB->data[0]);
//glDeleteTextures(1, &VideoTexture);
GLenum err;
while ((err = glGetError()) != GL_NO_ERROR)
{
cerr << "OpenGL error: " << err << endl;
}
// av_free(buffer);
}
}
// Free the packet that was allocated by av_read_frame
av_free_packet(&packet);
if (f>1) break;
}
//av_free(pFrameRGB);
}The picture I get on the screen is strange (green quads and red lines are motion vectors of those quads)
-
Inconsistant rendering in libmelt XML and C interface and 'hold' producer and avformat consumer
14 octobre 2016, par Leif AndersenI am trying to create a short video that is just a single image. (I know its a bit silly, but its a test for something bigger).
The code I have for rendering it is :
#include <framework></framework>mlt.h>
#include
#include
int main() {
if(mlt_factory_init(NULL)) {
mlt_profile p = mlt_profile_init(NULL);
mlt_consumer target = mlt_factory_consumer(p, "avformat",
mlt_producer source = mlt_factory_producer(p, "hold", "/Users/leif/logo.png");
mlt_producer_set_in_and_out(source, 0, 10);
mlt_consumer_connect(target, mlt_producer_service(source));
mlt_consumer_start(target);
sleep(5);
mlt_consumer_stop(target);
mlt_consumer_close(target);
mlt_producer_close(source);
mlt_factory_close();
} else {
printf("No\n");
}
return 0;
}Where
logo.png
is this file.When I run this code and play
output.mp4
, the picture comes out all garbelled. There is a green line in the middle and the logo is superimposed on itself a lot.On the other hand, if I change the consumer to be SDL, the image plays just fine.
And finally, if I change the consumer to be XML, and then use the melt command line application to render it :
melt -consumer avformat:xmlout.mp4 output.xml
and play the video, it also plays fine.
Is there something I am missing in the avformat consumer that I should be setting ? Or something else that I am missing here ?
Edit : For reference, the outputted xml file :
output.xml
is :<?xml version="1.0" encoding="utf-8"?>
<mlt version="6.2.0" root="/Users/leif/src/video/private" title="Anonymous Submission" parent="producer0" in="0" out="10">
<profile description="DV/DVD PAL" width="720" height="576" progressive="0" colorspace="601"></profile>
<producer title="Anonymous Submission" in="0" out="10">
<property>15000</property>
<property>pause</property>
<property>/Users/leif/logo.png</property>
<property>1.06667</property>
<property>0</property>
<property>onefield</property>
<property>hold</property>
<property>1</property>
</producer>
</mlt> -
Inconsistant rendering in mlt XML and C interface and 'hold' producer and avformat consumer
14 octobre 2016, par Leif AndersenI am trying to create a short video that is just a single image. (I know its a bit silly, but its a test for something bigger).
The code I have for rendering it is :
#include <framework></framework>mlt.h>
#include
#include
int main() {
if(mlt_factory_init(NULL)) {
mlt_profile p = mlt_profile_init(NULL);
mlt_consumer target = mlt_factory_consumer(p, "avformat",
mlt_producer source = mlt_factory_producer(p, "hold", "/Users/leif/logo.png");
mlt_producer_set_in_and_out(source, 0, 10);
mlt_consumer_connect(target, mlt_producer_service(source));
mlt_consumer_start(target);
sleep(5);
mlt_consumer_stop(target);
mlt_consumer_close(target);
mlt_producer_close(source);
mlt_factory_close();
} else {
printf("No\n");
}
return 0;
}Where
logo.png
is this file.When I run this code and play
output.mp4
, the picture comes out all garbelled. There is a green line in the middle and the logo is superimposed on itself a lot.On the other hand, if I change the consumer to be SDL, the image plays just fine.
And finally, if I change the consumer to be XML, and then use the melt command line application to render it :
melt -consumer avformat:xmlout.mp4 output.xml
and play the video, it also plays fine.
Is there something I am missing in the avformat consumer that I should be setting ? Or something else that I am missing here ?
Edit : For reference, the outputted xml file :
output.xml
is :<?xml version="1.0" encoding="utf-8"?>
<mlt version="6.2.0" root="/Users/leif/src/video/private" title="Anonymous Submission" parent="producer0" in="0" out="10">
<profile description="DV/DVD PAL" width="720" height="576" progressive="0" colorspace="601"></profile>
<producer title="Anonymous Submission" in="0" out="10">
<property>15000</property>
<property>pause</property>
<property>/Users/leif/logo.png</property>
<property>1.06667</property>
<property>0</property>
<property>onefield</property>
<property>hold</property>
<property>1</property>
</producer>
</mlt>