
Recherche avancée
Médias (91)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
-
Les Miserables
4 juin 2012, par
Mis à jour : Février 2013
Langue : English
Type : Texte
-
Ne pas afficher certaines informations : page d’accueil
23 novembre 2011, par
Mis à jour : Novembre 2011
Langue : français
Type : Image
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (17)
-
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 (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)
Sur d’autres sites (4059)
-
avfilter/lavfutils : Don't use uninitialized pointers for freeing
10 septembre 2020, par Andreas Rheinhardtavfilter/lavfutils : Don't use uninitialized pointers for freeing
Happened on several error conditions, e.g. if there is just no decoder
for the format (like with svg images).Reviewed-by : Paul B Mahol <onemda@gmail.com>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com> -
Encoding of D3D11Texture2D to an rtsp stream using libav*
1er décembre 2020, par uzerFirstly I'll declare that I am just beginning with whole libav* and no experience with DirectX, so please go easy on me.


I have managed to create a rtsp stream using libav* using video file as source. Now, I am trying to create an rtsp stream from an ID3D11Texture2D, which I am obtaining from GDI API using Bitblit method. Here's my approach for creating live rtsp stream :


- 

- Set input context

- 

- AVFormatContext* ifmt_ctx = avformat_alloc_context() ;
- avformat_open_input(&ifmt_ctx, _videoFileName, 0, 0) ;






- Set output context

- 

- avformat_alloc_output_context2(&ofmt_ctx, NULL, "rtsp", _rtspServerAdress) ; //RTSP
- copy all the codec context and stream from input to output






- Start streaming

- 

- while av_read_frame(ifmt_ctx, &pkt) ; is valid av_interleaved_write_frame(ofmt_ctx, &pkt) ;
- with some timestamp checks and conditions for livestreaming














Now I am finding it difficult to follow current libav* documentation (which is deprecated) and little tutorial content available online.


The most relevant article I found on working between directX and libav* is this article.
However it's actually doing the opposite of what I need to do. I am not sure how to go about creating input stream and context with DirectX texture ! How can I convert the texture into an AVFrame which can be encoded to an AVStream ?


Here's some rough outline of what I am expecting


ID3D11Texture2D* win_textureptr = WindowManager::Get().GetWindow(RtspStreaming::WindowId())->GetWindowTexture();

 D3D11_TEXTURE2D_DESC* desc;
 win_textureptr->GetDesc(desc);
 int width = desc->Width;
 int height = desc->Height;
 //double audio_time=0.0;
 auto start_time = std::chrono::system_clock::now();
 std::chrono::duration<double> video_time;
 
 //DirectX BGRA to h264 YUV420p
 SwsContext* conversion_ctx = sws_getContext(
 width, height, AV_PIX_FMT_BGRA,
 width, height, AV_PIX_FMT_YUV420P,
 SWS_BICUBLIN | SWS_BITEXACT, nullptr, nullptr, nullptr);
 
 uint8_t* sw_data[AV_NUM_DATA_POINTERS];
 int sw_linesize[AV_NUM_DATA_POINTERS];

 while (RtspStreaming::IsStreaming())
 {

 //copy the texture
 //win_textureptr->GetPrivateData();
 

 // convert BGRA to yuv420 pixel format
 /*
 frame = av_frame_alloc();
 //this obviously is incorrect... I would like to use d3d11 texture here instead of frame
 sws_scale(conversion_ctx, frame->data, frame->linesize, 0, frame->height,
 sw_data, sw_linesize);

 frame->format = AV_PIX_FMT_YUV420P;
 frame->width = width;
 frame->height = height;*/


 //encode to the video stream
 
 /* Compute current audio and video time. */
 video_time = std::chrono::system_clock::now() - start_time;

 //write frame and send
 av_interleaved_write_frame(ofmt_ctx, &pkt);

 av_frame_unref(frame);
 }

 av_write_trailer(ofmt_ctx);
</double>


- Set input context

-
FFMPEG av_interleaved_write_frame() : Operation not permitted
21 décembre 2020, par camslazOk I receiving a 'av_interleaved_write_frame() : Operation not permitted' error while trying to encode an MOV file. Firstly I need to outline the conditions behind it.



I am encoding 12 different files of different resolution sizes and format types via a PHP script that runs on cron. Basically it grabs a 250mb HD MOV file and encodes it in 4 different frame sizes as MOV, MP4 and WMV file types.



Now the script takes over 10mins to run and encode each of the files for the 250mb input file. I am outputting the processing times and as soon as the time on the script hits 10mins FFMPEG crashes and returns "av_interleaved_write_frame() : Operation not permitted" for the current file being encoded and all other remaining files yet to be encoded.



If the input videos is 150MB the total time the script runs for is under 10mins so it encodes all of the videos fine. Additionally if I run the FFMPEG command on the individual file that it fails on for the 250mb file it encodes the file with no issues.



From doing to research on the error "av_interleaved_write_frame()" it seems it is related to timestamps of what I understand to be of the input file. But in saying that it doesn't seem to be the case in my instance because I can encode the file with no problem if I do it individually.



example ffmpeg command



ffmpeg -i GVowbt3vsrXL.mov -s 1920x1080 -sameq -vf "unsharp" -y GVowbt3vsrXL_4.wmv




Error output on the failed file at 10mins. Remember there is no issue with the command if I run it by itself it is only when the script hits 10mins.



'output' =>
 array (
 0 => 'FFmpeg version SVN-r24545, Copyright (c) 2000-2010 the FFmpeg developers',
 1 => ' built on Aug 20 2010 23:32:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)',
 2 => ' configuration: --enable-shared --enable-gpl --enable-pthreads --enable-nonfree --cpu=opteron --extra-cflags=\'-O3 -march=opteron -mtune=opteron\' --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-avfilter --enable-filter=movie --enable-avfilter-lavf --enable-swscale',
 3 => ' libavutil 50.23. 0 / 50.23. 0',
 4 => ' libavcore 0. 1. 0 / 0. 1. 0',
 5 => ' libavcodec 52.84. 1 / 52.84. 1',
 6 => ' libavformat 52.77. 0 / 52.77. 0',
 7 => ' libavdevice 52. 2. 0 / 52. 2. 0',
 8 => ' libavfilter 1.26. 1 / 1.26. 1',
 9 => ' libswscale 0.11. 0 / 0.11. 0',
 10 => 'Input #0, mov,mp4,m4a,3gp,3g2,mj2, from \'/home/hdfootage/public_html/process/VideoEncode/_tmpfiles/GVowbt3vsrXL/GVowbt3vsrXL.mov\':',
 11 => ' Metadata:',
 12 => ' major_brand : qt',
 13 => ' minor_version : 537199360',
 14 => ' compatible_brands: qt',
 15 => ' Duration: 00:00:20.00, start: 0.000000, bitrate: 110802 kb/s',
 16 => ' Stream #0.0(eng): Video: mjpeg, yuvj422p, 1920x1080 [PAR 72:72 DAR 16:9], 109386 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc',
 17 => ' Stream #0.1(eng): Audio: pcm_s16be, 44100 Hz, 2 channels, s16, 1411 kb/s',
 18 => '[buffer @ 0xdcd0e0] w:1920 h:1080 pixfmt:yuvj422p',
 19 => '[unsharp @ 0xe00280] auto-inserting filter \'auto-inserted scaler 0\' between the filter \'src\' and the filter \'Filter 0 unsharp\'',
 20 => '[scale @ 0xe005b0] w:1920 h:1080 fmt:yuvj422p -> w:1920 h:1080 fmt:yuv420p flags:0xa0000004',
 21 => '[unsharp @ 0xe00280] effect:sharpen type:luma msize_x:5 msize_y:5 amount:1.00',
 22 => '[unsharp @ 0xe00280] effect:none type:chroma msize_x:0 msize_y:0 amount:0.00',
 23 => 'Output #0, asf, to \'/home/hdfootage/public_html/process/VideoEncode/_tmpfiles/GVowbt3vsrXL/GVowbt3vsrXL_4.wmv\':',
 24 => ' Metadata:',
 25 => ' WM/EncodingSettings: Lavf52.77.0',
 26 => ' Stream #0.0(eng): Video: msmpeg4, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 1k tbn, 25 tbc',
 27 => ' Stream #0.1(eng): Audio: libmp3lame, 44100 Hz, 2 channels, s16, 64 kb/s',
 28 => 'Stream mapping:',
 29 => ' Stream #0.0 -> #0.0',
 30 => ' Stream #0.1 -> #0.1',
 31 => 'Press [q] to stop encoding',
 32 => '[msmpeg4 @ 0xdccb50] warning, clipping 1 dct coefficients to -127..127',




Then it errors



frame= 75 fps= 5 q=1.0 size= 12704kB time=2.90 bitrate=3588 6.0kbits av_interleaved_write_frame(): Operation not permitted',
 )




Has any anybody encountered this sort of problem before ? It seems to be something to do with the timestamps but only because the script is running for a period longer then 10mins. It maybe related to PHP/Apache config but I don't know if it is FFMPEG or if it is server config I need to be looking at.