
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (40)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (8146)
-
error while compiling simple c++ file with libavformat library
21 février 2023, par Abdo Daoodi create simple c++ file called test.cpp


#include <iostream>
#include 
using namespace std;

int main() 
{
 cout << "Hello, World!";
 return 0;
}

</iostream>


and using g++ in terminal to compile test.cpp file with the command :




g++ test.cpp -o test




i get this error =>


test.cpp:2:10: fatal error: libavformat\avformat.h: No such file or directory
 2 | #include 
 | ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.



Notes :
libavformat\avformat.h path is : /usr/include/x86_64-linux-gnu/libavformat/avformat.h


and using ffmpeg version is :


$ ffmpeg -version


ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration : —prefix=/usr —extra-version=0ubuntu0.22.04.1 —toolchain=hardened —libdir=/usr/lib/x86_64-linux-gnu —incdir=/usr/include/x86_64-linux-gnu —arch=amd64 —enable-gpl —disable-stripping —enable-gnutls —enable-ladspa —enable-libaom —enable-libass —enable-libbluray —enable-libbs2b —enable-libcaca —enable-libcdio —enable-libcodec2 —enable-libdav1d —enable-libflite —enable-libfontconfig —enable-libfreetype —enable-libfribidi —enable-libgme —enable-libgsm —enable-libjack —enable-libmp3lame —enable-libmysofa —enable-libopenjpeg —enable-libopenmpt —enable-libopus —enable-libpulse —enable-librabbitmq —enable-librubberband —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libspeex —enable-libsrt —enable-libssh —enable-libtheora —enable-libtwolame —enable-libvidstab —enable-libvorbis —enable-libvpx —enable-libwebp —enable-libx265 —enable-libxml2 —enable-libxvid —enable-libzimg —enable-libzmq —enable-libzvbi —enable-lv2 —enable-omx —enable-openal —enable-opencl —enable-opengl —enable-sdl2 —enable-pocketsphinx —enable-librsvg —enable-libmfx —enable-libdc1394 —enable-libdrm —enable-libiec61883 —enable-chromaprint —enable-frei0r —enable-libx264 —enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100


using this command :


g++ `pkg-config --cflags libavformat` test.cpp `pkg-config --libs libavformat` -o test




-
Error : "libavformat\avformat.h : No such file or directory"
21 février 2023, par Abdo DaoodI create a simple c++ file called
test.cpp
:

#include <iostream>
#include 
using namespace std;

int main() 
{
 cout << "Hello, World!";
 return 0;
}
</iostream>


and using g++ in terminal to compile test.cpp file with the command :


g++ test.cpp -o test



I get this error :


test.cpp:2:10: fatal error: libavformat\avformat.h: No such file or directory
 2 | #include 
 | ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.



Notes :

libavformat\avformat.h
path is :/usr/include/x86_64-linux-gnu/libavformat/avformat.h


and using ffmpeg version is :


$ ffmpeg -version

ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100



Using this command :


g++ `pkg-config --cflags libavformat` test.cpp `pkg-config --libs libavformat` -o test



-
av_read_frame and time stamps C++
19 avril 2014, par halfwaythruI am recording an RTSP H264 stream from an Axis IP camera using libavformat. This camera is supposed to stamp every frame with the time that the frame was acquired, and this information is supposed to be in the RTP packet header.
This is the code that I am using to read in the frames.
AVFormatContext *inputFormatCtxt = NULL;
avformat_open_input(&inputFormatCtxt, inputURL, NULL, NULL)
avformat_find_stream_info(inputFormatCtxt, NULL )
while(av_read_frame(inputFormatCtxt, &packet) >=0)
{
if(packet.stream_index == videoStreamIndex)
{
// Do something to video packet.
}
else
{
// Do something to audio packet.
}
if (packet.pts != AV_NOPTS_VALUE)
packet.dts = packet.pts = av_rescale_q(packet.pts, stream->time_base, oStream->time_base);
else
NSLog(@"packet.pts == AV_NOPTS_VALUE");
if(av_interleaved_write_frame(outputFormatCtxt, &packet) < 0)
NSLog(@"Could not write out frame.");
av_free_packet(&packet);
}Now in AVPacket, the only time-related information is the pts and the dts. After converting them into seconds, these are supposed to be the offset of the packet (in seconds) from the start of the stream.
My question is : How do I get the start time of the stream ?
These are the many things that I have tried :
1.) In
AVFormatContext
there is a variablestart_time_realtime
that is "supposed" to be the start time of the stream in real world time, in microseconds. This is exactly what I need. But no matter what I do, this value is always 0, and never changes. Am I missing a step in initialization that this never get set ?2.) Looking at this link, I added an
RTPDemuxContext
object to my code :RTSPState* rtsp_state = (RTSPState*) inputFormatCtxt->priv_data;
RTSPStream* rtsp_stream = rtsp_state->rtsp_streams[0];
RTPDemuxContext* rtp_demux_context = (RTPDemuxContext*) rtsp_stream->transport_priv;When I tried to look at the
last_rtcp_reception_time
,last_rtcp_ntp_time
,last_rtcp_timestamp
timestamps within theRTPDemuxContext
object, these values are also 0 always, and dont change.3.) With the last point, I tried to force fetch a packet using
ff_rtsp_fetch_packet(inputFormatCtxt, &packet)
. This did update the RTPDemuxContext timestamps, but only while stepping through code. If I just ran the code in a loop, it always remained the same as whatever was in theRTDemuxContext
object before the loop.int64_t x = 0;
x = rtp_demux_context->last_rtcp_reception_time; // x is 0.
while(ff_rtsp_fetch_packet(inputFormatCtxt, &packet))
{
x = rtp_demux_context->last_rtcp_reception_time; // x changes only when stepping through code. else remains 0
}At this point I have no idea what I am doing wrong. I cant seem to get this timestamp information, no matter what I try. Any help is much appreciated. Thanks !