
Recherche avancée
Médias (1)
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
Autres articles (50)
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur
8 février 2011, parLa visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
Configuration de la boite multimédia
Dès (...)
Sur d’autres sites (3019)
-
ffmpeg capture from ip camera video in h264 stream [closed]
23 mars 2023, par Иванов ИванI can't read the frames from the camera and then write them to a video file (any). The fact is that I even get crooked frames, they seem to have violated the coordinates of the position of each point, the video is crooked, distorted


c++ code.


https://drive.google.com/file/d/1W2sZMR5D5pvVmnhiQyhiaQhC9frhdeII/view?usp=sharing


#define INBUF_SIZE 4096


 //writing the minimal required header for a pgm file format
 //portable graymap format-> https://en.wikipedia.org/wiki/Netpbm_format#PGM_example
 fprintf (f, "P5\n%d %d\n%d\n", xsize, ysize, 255);

 //writing line by line
 for (i = 0; i /contains data on a configuration of media content, such as bitrate, 
 //frame rate, sampling frequency, channels, height and many other things.
 AVCodecContext * AVCodecContext_ = NULL;
 AVCodecParameters * AVCodecParametr_ = NULL;
 FILE * f;
 //This structure describes decoded (raw) audio- or video this.
 AVFrame * frame;
 uint8_t inbuf [INBUF_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
 uint8_t * data;
 size_t data_size;
 int ret;
 int eof;
 AVFormatContext * AVfc = NULL;
 int ERRORS;
 //AVCodec * codec;
 char buf [1024];
 const char * FileName;
 
 //https://habr.com/ru/post/137793/
 //Stores the compressed one shot.
 AVPacket * pkt;
 
 //**********************************************************************
 //Beginning of reading video from the camera. 
 //**********************************************************************
 
 avdevice_register_all ();
 
 filename = "rtsp://admin: 754HG@192.168.1.75:554/11";
 //filename = "c:\\1.avi";
 outfilename = "C:\\2.MP4";
 
 //We open a flow of video (it is the file or the camera). 
 ERRORS = avformat_open_input (& AVfc, filename, NULL, NULL);
 if (ERRORS <0) {
 fprintf (stderr, "ffmpeg: could not open file \n");
 return-1;
 }
 
 //After opening, we can print out information on the video file (iformat = the name of a format; 
 //duration = duration). But as I connected the camera to me wrote: Duration: N/A, 
 //start: 0.000000, bitrate: N/A
 printf ("Format %s, duration %lld us", AVfc-> iformat-> long_name, AVfc-> duration);
 
 
 ERRORS = avformat_find_stream_info (AVfc, NULL);
 if (ERRORS <0) {
 fprintf (stderr, "ffmpeg: Unable to find stream info\n");
 return-1;
 }
 
 
 int CountStream;
 
 //We learn quantity of streams. 
 CountStream = AVfc-> nb_streams;
 
 //Let's look for the codec. 
 int video_stream;
 for (video_stream = 0; video_stream nb_streams; ++ video_stream) {
 if (AVfc-> streams[video_stream]-> codecpar-> codec_type == AVMEDIA_TYPE_VIDEO) {
 break;
 }
 
 }
 
 if (video_stream == AVfc-> nb_streams) {
 fprintf (stderr, "ffmpeg: Unable to find video stream\n");
 return-1;
 }
 
 //Here we define a type of the codec, for my camera it is equal as AV_CODEC_ID_HEVC (This that in what is broadcast by my camera)
 codec = avcodec_find_decoder(AVfc-> streams [video_stream]-> codecpar-> codec_id);
 //--------------------------------------------------------------------------------------
 
 //Functions for inquiry of opportunities of libavcodec,
 AVCodecContext_ = avcodec_alloc_context3(codec);
 if (! AVCodecContext _) {
 fprintf (stderr, "Was not succeeded to allocate a video codec context, since it not poddrerzhivayetsya\n");
 exit(1);
 }
 
 //This function is used for initialization 
 //AVCodecContext of video and audio of the codec. The announcement of avcodec_open2 () is in libavcodecavcodec.h
 //We open the codec. 
 
 ERRORS = avcodec_open2 (AVCodecContext _, codec, NULL);
 if (ERRORS <0) {
 fprintf (stderr, "ffmpeg: It is not possible to open codec \n");
 return-1;
 }
 
 //It for processing of a sound - a reserve.
 //swr_alloc_set_opts ()
 //swr_init (); 
 
 //To output all information on the video file. 
 av_dump_format (AVfc, 0, argv[1], 0);
 
 //=========================================================================================
 //Further, we receive frames. before we only received all infomration about the entering video.
 //=========================================================================================
 
 //Now we are going to read packages from a stream and to decode them in shots, but at first 
 //we need to mark out memory for both components (AVPacket and AVFrame).
 frame = av_frame_alloc ();
 
 if (! frame) {
 fprintf (stderr, "Is not possible to mark out memory for video footage \n");
 exit(1);
 }
 //We mark out memory for a package 
 pkt = av_packet_alloc ();
 //We define a file name for saving the picture.
 const char * FileName1 = "C:\\Users\\Павел\\Desktop\\NyFile.PGM";
 //Data reading if they is. 
 while (av_read_frame (AVfc, pkt)> = 0) {
 //It is a package from a video stream? Because there is still a soundtrack.
 if (pkt-> stream_index == video_stream) {
 int ret;
 
 //Transfer of the raw package data as input data in the decoder
 ret = avcodec_send_packet (AVCodecContext _, pkt);
 if (ret <0 | | ret == AVERROR(EAGAIN) | | ret == AVERROR_EOF) {
 std:: cout <<"avcodec_send_packet:" <<ret while="while"> = 0) {
 
 //Returns the decoded output data from the decoder or the encoder
 ret = avcodec_receive_frame (AVCodecContext _, frame);
 if (ret == AVERROR(EAGAIN) | | ret == AVERROR_EOF) {
 //std:: cout <<"avcodec_receive_frame:" <<ret cout="cout"> of frame_number </============================================================================================
 
 //Experimentally - we will keep a shot in the picture. 
 
 save_gray_frame(frame-> data [0], frame-> linesize [0], frame-> width, frame-> height, (char *) FileName1);
 }
 }
 }
 
 //av_parser_close(parser);
 avcodec_free_context (& AVCodecContext _);
 av_frame_free (& frame);
 av_packet_free (& pkt);
 
 return 0;
</ret></ret>


-
ffmpeg Copy From Input Video To Output Video
31 janvier 2023, par user121392I have encountered the issue of faded/washed out colours after reencoding my library of phone videos from H264 to HEVC using ffmpeg. The command I used was


ffmpeg -i input.mp4 -vcodec libx265 -o output.mp4


Some searching have found that colour metadata from the input video are missing in the output video. An answer I found only addresses it specifically for a given input video. Is there a way to "copy" or "transfer" the metadata from the input video without having to go through the parameters on ffprobe ?


-
Piping from ffmpeg to x264 not working
23 mai 2016, par JiZhaku_SanI want to encode video file to AVC-I50. I have a vbs script.
set objShell = WScript.CreateObject ("WScript.Shell")
objShell.run "cmd.exe /C Processors\ffmpeg.exe -i """ & PathToInputFile & """ -f lavfi
-i aevalsrc=0 -loglevel quiet -shortest -filter_complex
""[0:1]pan=1|c0=c0[a1],[0:1]pan=1|c0=c1[a2],[0:1]pan=1|c0=c2[a3],[0:1]pan=1|c0=c3[a4]""
-map ""[a1]"" -c:a pcm_s24le -ar 48000 -y -t """ & duration & """ tmp\01.wav
-map ""[a2]"" -c:a pcm_s24le -ar 48000 -y -t """ & duration & """ tmp\02.wav
-map ""[a3]"" -c:a pcm_s24le -ar 48000 -y -t """ & duration & """ tmp\03.wav
-map ""[a4]"" -c:a pcm_s24le -ar 48000 -y -t """ & duration & """ tmp\04.wav
-map 0:v -c:v rawvideo -strict -1 -vf format=yuv420p10,fps=fps=30000/1001
-s 1440x1080 -q:v 0 -an -f yuv4mpegpipe pipe:output.y4m | Processors\x264.exe -
--demuxer y4m --frames 1077 --interlaced --tff --output-csp i420 --no-cabac
--force-cfr --keyint 1 --colorprim bt709 --transfer bt709 --tune psnr --sar 1:1
--nal-hrd cbr --pic-struct --videoformat component --vbv-maxrate 50000 --vbv-bufsize 2000
--colormatrix bt709 --bitrate 50000 --avcintra-class 50 --output tmp\Result.h264 ", 1, trueWhen I try to run in cmd this vbs file, it is working.
But when I try to run it in C# as Process - it doesn’t.
Btw. when I try to run it as plain command in cmd it sais that
"-" is not an input for x264.