
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (43)
-
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Configuration spécifique d’Apache
4 février 2011, parModules spécifiques
Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
Création d’un (...)
Sur d’autres sites (7617)
-
Screenrecorder application output video resolution issues [closed]
23 juin 2022, par JessieKUsing Github code for ScreenRecorder on Linux
Everything works fine, besides the resolution of output video.
Tried to play with setting, quality has significantly improved, but still no way to change resolution.
I need to get output video with the same size as input video


using namespace std;

 /* initialize the resources*/
 ScreenRecorder::ScreenRecorder()
 {
 
 av_register_all();
 avcodec_register_all();
 avdevice_register_all();
 cout<<"\nall required functions are registered successfully";
 }
 
 /* uninitialize the resources */
 ScreenRecorder::~ScreenRecorder()
 {
 
 avformat_close_input(&pAVFormatContext);
 if( !pAVFormatContext )
 {
 cout<<"\nfile closed sucessfully";
 }
 else
 {
 cout<<"\nunable to close the file";
 exit(1);
 }
 
 avformat_free_context(pAVFormatContext);
 if( !pAVFormatContext )
 {
 cout<<"\navformat free successfully";
 }
 else
 {
 cout<<"\nunable to free avformat context";
 exit(1);
 }
 
 }
 
 /* function to capture and store data in frames by allocating required memory and auto deallocating the memory. */
 int ScreenRecorder::CaptureVideoFrames()
 {
 int flag;
 int frameFinished;//when you decode a single packet, you still don't have information enough to have a frame [depending on the type of codec, some of them //you do], when you decode a GROUP of packets that represents a frame, then you have a picture! that's why frameFinished will let //you know you decoded enough to have a frame.
 
 int frame_index = 0;
 value = 0;
 
 pAVPacket = (AVPacket *)av_malloc(sizeof(AVPacket));
 av_init_packet(pAVPacket);
 
 pAVFrame = av_frame_alloc();
 if( !pAVFrame )
 {
 cout<<"\nunable to release the avframe resources";
 exit(1);
 }
 
 outFrame = av_frame_alloc();//Allocate an AVFrame and set its fields to default values.
 if( !outFrame )
 {
 cout<<"\nunable to release the avframe resources for outframe";
 exit(1);
 }
 
 int video_outbuf_size;
 int nbytes = av_image_get_buffer_size(outAVCodecContext->pix_fmt,outAVCodecContext->width,outAVCodecContext->height,32);
 uint8_t *video_outbuf = (uint8_t*)av_malloc(nbytes);
 if( video_outbuf == NULL )
 {
 cout<<"\nunable to allocate memory";
 exit(1);
 }
 
 // Setup the data pointers and linesizes based on the specified image parameters and the provided array.
 value = av_image_fill_arrays( outFrame->data, outFrame->linesize, video_outbuf , AV_PIX_FMT_YUV420P, outAVCodecContext->width,outAVCodecContext->height,1 ); // returns : the size in bytes required for src
 if(value < 0)
 {
 cout<<"\nerror in filling image array";
 }
 
 SwsContext* swsCtx_ ;
 
 // Allocate and return swsContext.
 // a pointer to an allocated context, or NULL in case of error
 // Deprecated : Use sws_getCachedContext() instead.
 swsCtx_ = sws_getContext(pAVCodecContext->width,
 pAVCodecContext->height,
 pAVCodecContext->pix_fmt,
 outAVCodecContext->width,
 outAVCodecContext->height,
 outAVCodecContext->pix_fmt,
 SWS_BICUBIC, NULL, NULL, NULL);
 
 
 int ii = 0;
 int no_frames = 100;
 cout<<"\nenter No. of frames to capture : ";
 cin>>no_frames;
 
 AVPacket outPacket;
 int j = 0;
 
 int got_picture;
 
 while( av_read_frame( pAVFormatContext , pAVPacket ) >= 0 )
 {
 if( ii++ == no_frames )break;
 if(pAVPacket->stream_index == VideoStreamIndx)
 {
 value = avcodec_decode_video2( pAVCodecContext , pAVFrame , &frameFinished , pAVPacket );
 if( value < 0)
 {
 cout<<"unable to decode video";
 }
 
 if(frameFinished)// Frame successfully decoded :)
 {
 sws_scale(swsCtx_, pAVFrame->data, pAVFrame->linesize,0, pAVCodecContext->height, outFrame->data,outFrame->linesize);
 av_init_packet(&outPacket);
 outPacket.data = NULL; // packet data will be allocated by the encoder
 outPacket.size = 0;
 
 avcodec_encode_video2(outAVCodecContext , &outPacket ,outFrame , &got_picture);
 
 if(got_picture)
 {
 if(outPacket.pts != AV_NOPTS_VALUE)
 outPacket.pts = av_rescale_q(outPacket.pts, video_st->codec->time_base, video_st->time_base);
 if(outPacket.dts != AV_NOPTS_VALUE)
 outPacket.dts = av_rescale_q(outPacket.dts, video_st->codec->time_base, video_st->time_base);
 
 printf("Write frame %3d (size= %2d)\n", j++, outPacket.size/1000);
 if(av_write_frame(outAVFormatContext , &outPacket) != 0)
 {
 cout<<"\nerror in writing video frame";
 }
 
 av_packet_unref(&outPacket);
 } // got_picture
 
 av_packet_unref(&outPacket);
 } // frameFinished
 
 }
 }// End of while-loop



One part of two parts is above...Actually original app seem to record video of same size as does my application, but still it has not any use



Second part of the code


av_free(video_outbuf);

}

/* establishing the connection between camera or screen through its respective folder */
int ScreenRecorder::openCamera()
{

 value = 0;
 options = NULL;
 pAVFormatContext = NULL;

 pAVFormatContext = avformat_alloc_context();//Allocate an AVFormatContext.
/*

X11 video input device.
To enable this input device during configuration you need libxcb installed on your system. It will be automatically detected during configuration.
This device allows one to capture a region of an X11 display. 
refer : https://www.ffmpeg.org/ffmpeg-devices.html#x11grab
*/
 /* current below is for screen recording. to connect with camera use v4l2 as a input parameter for av_find_input_format */ 
 pAVInputFormat = av_find_input_format("x11grab");
 value = avformat_open_input(&pAVFormatContext, ":0.0+10,250", pAVInputFormat, NULL);
 if(value != 0)
 {
 cout<<"\nerror in opening input device";
 exit(1);
 }

 /* set frame per second */
 value = av_dict_set( &options,"framerate","30",0 );
 if(value < 0)
 {
 cout<<"\nerror in setting dictionary value";
 exit(1);
 }

 value = av_dict_set( &options, "preset", "medium", 0 );
 if(value < 0)
 {
 cout<<"\nerror in setting preset values";
 exit(1);
 }

// value = avformat_find_stream_info(pAVFormatContext,NULL);
 if(value < 0)
 {
 cout<<"\nunable to find the stream information";
 exit(1);
 }

 VideoStreamIndx = -1;

 /* find the first video stream index . Also there is an API available to do the below operations */
 for(int i = 0; i < pAVFormatContext->nb_streams; i++ ) // find video stream posistion/index.
 {
 if( pAVFormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO )
 {
 VideoStreamIndx = i;
 break;
 }

 } 

 if( VideoStreamIndx == -1)
 {
 cout<<"\nunable to find the video stream index. (-1)";
 exit(1);
 }

 // assign pAVFormatContext to VideoStreamIndx
 pAVCodecContext = pAVFormatContext->streams[VideoStreamIndx]->codec;

 pAVCodec = avcodec_find_decoder(pAVCodecContext->codec_id);
 if( pAVCodec == NULL )
 {
 cout<<"\nunable to find the decoder";
 exit(1);
 }

 value = avcodec_open2(pAVCodecContext , pAVCodec , NULL);//Initialize the AVCodecContext to use the given AVCodec.
 if( value < 0 )
 {
 cout<<"\nunable to open the av codec";
 exit(1);
 }
}

/* initialize the video output file and its properties */
int ScreenRecorder::init_outputfile()
{
 outAVFormatContext = NULL;
 value = 0;
 output_file = "../media/output.mp4";

 avformat_alloc_output_context2(&outAVFormatContext, NULL, NULL, output_file);
 if (!outAVFormatContext)
 {
 cout<<"\nerror in allocating av format output context";
 exit(1);
 }

/* Returns the output format in the list of registered output formats which best matches the provided parameters, or returns NULL if there is no match. */
 output_format = av_guess_format(NULL, output_file ,NULL);
 if( !output_format )
 {
 cout<<"\nerror in guessing the video format. try with correct format";
 exit(1);
 }

 video_st = avformat_new_stream(outAVFormatContext ,NULL);
 if( !video_st )
 {
 cout<<"\nerror in creating a av format new stream";
 exit(1);
 }

 outAVCodecContext = avcodec_alloc_context3(outAVCodec);
 if( !outAVCodecContext )
 {
 cout<<"\nerror in allocating the codec contexts";
 exit(1);
 }

 /* set property of the video file */
 outAVCodecContext = video_st->codec;
 outAVCodecContext->codec_id = AV_CODEC_ID_MPEG4;// AV_CODEC_ID_MPEG4; // AV_CODEC_ID_H264 // AV_CODEC_ID_MPEG1VIDEO
 outAVCodecContext->codec_type = AVMEDIA_TYPE_VIDEO;
 outAVCodecContext->pix_fmt = AV_PIX_FMT_YUV420P;
 outAVCodecContext->bit_rate = 2500000; // 2500000
 outAVCodecContext->width = 1920;
 outAVCodecContext->height = 1080;
 outAVCodecContext->gop_size = 3;
 outAVCodecContext->max_b_frames = 2;
 outAVCodecContext->time_base.num = 1;
 outAVCodecContext->time_base.den = 30; // 15fps

 {
 av_opt_set(outAVCodecContext->priv_data, "preset", "slow", 0);
 }

 outAVCodec = avcodec_find_encoder(AV_CODEC_ID_MPEG4);
 if( !outAVCodec )
 {
 cout<<"\nerror in finding the av codecs. try again with correct codec";
 exit(1);
 }

 /* Some container formats (like MP4) require global headers to be present
 Mark the encoder so that it behaves accordingly. */

 if ( outAVFormatContext->oformat->flags & AVFMT_GLOBALHEADER)
 {
 outAVCodecContext->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
 }

 value = avcodec_open2(outAVCodecContext, outAVCodec, NULL);
 if( value < 0)
 {
 cout<<"\nerror in opening the avcodec";
 exit(1);
 }

 /* create empty video file */
 if ( !(outAVFormatContext->flags & AVFMT_NOFILE) )
 {
 if( avio_open2(&outAVFormatContext->pb , output_file , AVIO_FLAG_WRITE ,NULL, NULL) < 0 )
 {
 cout<<"\nerror in creating the video file";
 exit(1);
 }
 }

 if(!outAVFormatContext->nb_streams)
 {
 cout<<"\noutput file dose not contain any stream";
 exit(1);
 }

 /* imp: mp4 container or some advanced container file required header information*/
 value = avformat_write_header(outAVFormatContext , &options);
 if(value < 0)
 {
 cout<<"\nerror in writing the header context";
 exit(1);
 }


 cout<<"\n\nOutput file information :\n\n";
 av_dump_format(outAVFormatContext , 0 ,output_file ,1);



Github link https://github.com/abdullahfarwees/screen-recorder-ffmpeg-cpp


-
Benefits and Shortcomings of Multi-Touch Attribution
13 mars 2023, par Erin — Analytics Tips -
Anomalie #4348 : php 7.4 alpha1
27 août 2019, par Franck DSuper bonne nouvelle, il n’y a presque plus de différence concernant les tests unitaire en php 7.4 et 7.1 / 7.2 / 7.3
22 erreurs contre 19 pour les autres :)
Installation en MysqlJe vais mettre uniquement ceux donc j’ai un message de php, pour les autres, je pense que le mieux, c’est de voir plus tard
session.html : erreur
Warning : Illegal string offset ’id_auteur’ in C :\laragon\www\test3\ecrire\public\evaluer_page.php(51) : eval()’d code on line 6
Notice : Uninitialized string offset : 0 in C :\laragon\www\test3\ecrire\public\evaluer_page.php(51) : eval()’d code on line 6
Warning : Illegal string offset ’nom’ in C :\laragon\www\test3\ecrire\public\evaluer_page.php(51) : eval()’d code on line 8
Notice : Uninitialized string offset : 0 in C :\laragon\www\test3\ecrire\public\evaluer_page.php(51) : eval()’d code on line 8extraire_attribut.php : erreur
Warning : preg_match() : Empty regular expression in C :\laragon\www\test3\ecrire\inc\filtres.php on line 1845
Warning : preg_match() : Empty regular expression in C :\laragon\www\test3\ecrire\inc\filtres.php on line 1845balise_session.php : erreur
Exception : Test_balise_session_set -> testSessionSet -> Unexpected PHP Error [session_start() : Cannot start session when headers already sent] severity [2] in [C :\laragon\www\test3\ecrire\inc\session.php line 706]
BOUM !!! - Passes : 11, Failures : 0, Exceptions : 1, Non Applicable : 0
Warning : session_start() : Cannot start session when headers already sent in C :\laragon\www\test3\ecrire\inc\session.php on line 706autoriser.php : erreur
Exception : Test_balise_autoriser -> testAutoriserVerifAuteur -> Unexpected PHP Error [Illegal string offset ’id_auteur’] severity [2] in [C :\laragon\www\test3\tests\unit\simpletest\dist\balises\autoriser.php line 44]
Exception : Test_balise_autoriser -> testAutoriserVerifAuteur -> Unexpected PHP Error [Uninitialized string offset : 0] severity [8] in [C :\laragon\www\test3\tests\unit\simpletest\dist\balises\autoriser.php line 44]
Exception : Test_balise_autoriser -> testAutoriserVerifAuteur -> Unexpected PHP Error [Illegal string offset ’id_auteur’] severity [2] in [C :\laragon\www\test3\tests\unit\simpletest\dist\balises\autoriser.php line 49]
Exception : Test_balise_autoriser -> testAutoriserVerifAuteur -> Unexpected PHP Error [Uninitialized string offset : 0] severity [8] in [C :\laragon\www\test3\tests\unit\simpletest\dist\balises\autoriser.php line 49]
Exception : Test_balise_autoriser -> testAutoriserVerifAuteur -> Unexpected PHP Error [Illegal string offset ’id_auteur’] severity [2] in [C :\laragon\www\test3\tests\unit\simpletest\dist\balises\autoriser.php line 44]
Exception : Test_balise_autoriser -> testAutoriserVerifAuteur -> Unexpected PHP Error [Uninitialized string offset : 0] severity [8] in [C :\laragon\www\test3\tests\unit\simpletest\dist\balises\autoriser.php line 44]
Exception : Test_balise_autoriser -> testAutoriserVerifAuteur -> Unexpected PHP Error [Illegal string offset ’id_auteur’] severity [2] in [C :\laragon\www\test3\tests\unit\simpletest\dist\balises\autoriser.php line 50]
Exception : Test_balise_autoriser -> testAutoriserVerifAuteur -> Unexpected PHP Error [Uninitialized string offset : 0] severity [8] in [C :\laragon\www\test3\tests\unit\simpletest\dist\balises\autoriser.php line 50]
Exception : Test_balise_autoriser -> testAutoriserVerifAuteur -> Unexpected PHP Error [A non-numeric value encountered] severity [2] in [C :\laragon\www\test3\tests\unit\simpletest\dist\balises\autoriser.php line 50]
BOUM !!! - Passes : 12, Failures : 0, Exceptions : 9, Non Applicable : 000_sql_create_drop_view.php : erreur
Notice : Undefined index : field in C :\laragon\www\test3\tests\unit\sql\00_sql_create_drop_view.php on line 36
Notice : Undefined index : key in C :\laragon\www\test3\tests\unit\sql\00_sql_create_drop_view.php on line 37
Notice : Undefined index : field in C :\laragon\www\test3\tests\unit\sql\00_sql_create_drop_view.php on line 36
Notice : Undefined index : key in C :\laragon\www\test3\tests\unit\sql\00_sql_create_drop_view.php on line 37
Notice : Undefined index : field in C :\laragon\www\test3\tests\unit\sql\00_sql_create_drop_view.php on line 36
Notice : Undefined index : key in C :\laragon\www\test3\tests\unit\sql\00_sql_create_drop_view.php on line 37
Warning : count() : Parameter must be an array or an object that implements Countable in C :\laragon\www\test3\tests\test.inc on line 83
Warning : count() : Parameter must be an array or an object that implements Countable in C :\laragon\www\test3\tests\test.inc on line 83
Warning : count() : Parameter must be an array or an object that implements Countable in C :\laragon\www\test3\tests\test.inc on line 83
Warning : count() : Parameter must be an array or an object that implements Countable in C :\laragon\www\test3\tests\test.inc on line 83
Warning : count() : Parameter must be an array or an object that implements Countable in C :\laragon\www\test3\tests\test.inc on line 83
Warning : count() : Parameter must be an array or an object that implements Countable in C :\laragon\www\test3\tests\test.inc on line 83
Lecture des structures de table en echec10_sql_insert_select.php : erreur
Champ maj sur update
Le champ ’maj’ () n’a vraisemblablement pas recu de timestamp à l’insertion
Le champ ’maj’ () n’a vraisemblablement pas été mis a jour lors de l’update
Le champ ’maj’ () n’a vraisemblablement pas été mis a jour lors de l’updateq
Selections multi tables
selection sur 2 tables avec where en echec : attendu 3 reponses, présentes :30_sql_alter.php : erreur
Notice : Undefined index : field in C :\laragon\www\test3\tests\unit\sql\30_sql_alter.php on line 54
Notice : Trying to access array offset on value of type null in C :\laragon\www\test3\tests\unit\sql\30_sql_alter.php on line 54
Alter : drop column
sql_alter rate DROP COLUMN (plus de table ou sql_showtable en erreur ?)
sql_alter rate DROP sans COLUMN (plus de table ou sql_showtable en erreur ?)
sql_alter rate CHANGE (plus de table ou sql_showtable en erreur ?)
sql_alter rate MODIFY varchar en text :
sql_alter rate ADD COLUMN houba (plus de table ou sql_showtable en erreur ?)
sql_alter rate ADD COLUMN hop AFTER (plus de table ou sql_showtable en erreur ?)Alter : renomme table
sql_alter rate RENAME tableAlter : index
sql_alter rate DROP INDEX sons (plus de table ou sql_showtable en erreur ?)
sql_alter rate ADD INDEX (wouaf) (plus de table ou sql_showtable en erreur ?)
sql_alter rate ADD INDEX pluie (grrrr) (plus de table ou sql_showtable en erreur ?)
sql_alter rate DROP INDEX pluie (plus de table ou sql_showtable en erreur ?)
sql_alter rate ADD INDEX dring (grrrr, wouaf) (plus de table ou sql_showtable en erreur ?)
Alter : primary key
sql_alter rate DROP PRIMARY KEY (plus de table ou sql_showtable en erreur ?)
sql_alter rate ADD PRIMARY KEY (plus de table)
Alter : multiples
sql_alter rate DROP INDEX dring, DROP COLUMN wouaf, DROP COLUMN grrrr (plus de table ou sql_showtable en erreur ?)
sql_alter rate ADD COLUMN a INT, ADD COLUMN b INT, ADD COLUMN c INT, ADD INDEX abc (a,b,c) (plus de table ou sql_showtable en erreur ?)