[Libav-user] FFMpeg and vlc.
Denis
info at denisgottardello.it
Wed Sep 7 22:13:15 CEST 2011
Using this code
AVCodec *pAVCodec= avcodec_find_encoder(CODEC_ID_MPEG4);
if (!pAVCodec) qDebug() << "avcodec_find_encoder Error!!!";
else {
AVCodecContext *pAVCodecContext= avcodec_alloc_context(); {
pAVCodecContext->pix_fmt= PIX_FMT_YUV420P;
pAVCodecContext->width= Width;
pAVCodecContext->height= Height;
pAVCodecContext->time_base.den= 25;
pAVCodecContext->time_base.num= 1;
int OutSize=
avcodec_encode_video(pAVCodecContext, pOutBuffer, BYTEPIC, pAVFrame);
fwrite(pOutBuffer, 1, OutSize, FileOut);
With this code I can produce a mpg file that I can see it with mplayer but not
with vlc. Vlc does not show a good error report, only this rows:
denis at tomcat:~/C++/QtCamera/QtCamera-build-desktop$ cvlc a.mpeg
VLC media player 1.1.3 The Luggage (revision exported)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
Warning: call to signal(13, 0x1)
[0xb7004484] dummy interface: using the dummy interface module...
^C[0x91aae34] signals interface error: Caught Interrupt signal, exiting...
denis at tomcat:~/C++/QtCamera/QtCamera-build-desktop$
What can I do to adjust my code in order to produce a mpg file for vlc?
--
www.denisgottardello.it
Skype: mrdebug
Videosurveillance and home automation!
http://www.denisgottardello.it/DomusBoss/DomusBossIndice.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20110907/3fcb4992/attachment.html>
More information about the Libav-user
mailing list