
Recherche avancée
Autres articles (58)
-
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 ;
-
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 (...) -
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 (5817)
-
Load PNG from disk into AVFrame
15 février 2018, par Pedro PereiraI can’t seem to get this to work. This is what I got so far :
// Variables
int retOp; // for holding the operations results
// Initializes FFmpeg
av_register_all();
// Open image
uint8_t *buffer = NULL;
size_t buffer_size;
retOp = av_file_map("in.png", &buffer, &buffer_size, 0, NULL);
if(retOp < 0){
cerr << "Could not load image!" << endl;
system("pause");
return -1;
}
// Initialize AVFrame
AVFrame* frame = av_frame_alloc();
frame->width = 1920;
frame->height = 1080;
frame->format = AV_PIX_FMT_RGBA;The examples in the FFmpeg Doxygen don’t really help and there’s no support on the web. If there is let me know.
Uncompressed RGBA image.
-
When capturing input with ffmpeg can't set video bitrate
11 mai 2014, par EmanueleWhen capturing input from FFmpeg with following command line :
ffmpeg -f x11grab -r 30 -s 1920x1080 -i :0.0 -vcodec mpeg4 -b:v 10000k -flags +aic+mv4 -f alsa -ac 2 -i pulse -strict experimental test.mp4
this is the output I get :ffmpeg version 0.8.10-4:0.8.10-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers built on Feb 6 2014 20:56:59 with gcc 4.6.3 *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. [x11grab @ 0x1b1c7a0] device : :0.0 -> display : :0.0 x : 0 y : 0 width : 1920 height : 1080 [x11grab @ 0x1b1c7a0] shared memory extension found [x11grab @ 0x1b1c7a0] Estimating duration from bitrate, this may be inaccurate Input #0, x11grab, from ’:0.0’ : Duration : N/A, start : 1399805986.592884, bitrate : 1990656 kb/s Stream #0.0 : Video : rawvideo, bgra, 1920x1080, 1990656 kb/s, 30 tbr, 1000k tbn, 30 tbc [alsa @ 0x1b2c600] capture with some ALSA plugins, especially dsnoop, may hang. [alsa @ 0x1b2c600] Estimating duration from bitrate, this may be inaccurate Input #1, alsa, from ’pulse’ : Duration : N/A, start : 1399805986.561124, bitrate : N/A Stream #1.0 : Audio : pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s File ’test.mp4’ already exists. Overwrite ? [y/N] y Incompatible pixel format ’bgra’ for codec ’mpeg4’, auto-selecting format ’yuv420p’ [buffer @ 0x1b4d840] w:1920 h:1080 pixfmt:bgra [avsink @ 0x1b40480] auto-inserting filter ’auto-inserted scaler 0’ between the filter ’src’ and the filter ’out’ [scale @ 0x1b1c6e0] w:1920 h:1080 fmt:bgra -> w:1920 h:1080 fmt:yuv420p flags:0x4 Output #0, mp4, to ’test.mp4’ : Metadata : encoder : Lavf53.21.1 Stream #0.0 : Video : mpeg4, yuv420p, 1920x1080, q=2-31, 200 kb/s, 30 tbn, 30 tbc Stream #0.1 : Audio : aac, 48000 Hz, 2 channels, s16, 200 kb/s Stream mapping : Stream #0.0 -> #0.0 Stream #1.0 -> #0.1 Press ctrl-c to stop encoding ^Cframe= 1283 fps= 42 q=31.0 Lsize= 10882kB time=42.71 bitrate=2087.3kbits/s dup=473 drop=70 video:9875kB audio:980kB global headers:0kB muxing overhead 0.251384% Received signal 2 : terminating. ema@scv : $ ./capvideo.sh ffmpeg version 0.8.10-4:0.8.10-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers built on Feb 6 2014 20:56:59 with gcc 4.6.3 *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. [x11grab @ 0x24667a0] device : :0.0 -> display : :0.0 x : 0 y : 0 width : 1920 height : 1080 [x11grab @ 0x24667a0] shared memory extension found [x11grab @ 0x24667a0] Estimating duration from bitrate, this may be inaccurate Input #0, x11grab, from ’:0.0’ : Duration : N/A, start : 1399806153.224758, bitrate : 1990656 kb/s Stream #0.0 : Video : rawvideo, bgra, 1920x1080, 1990656 kb/s, 30 tbr, 1000k tbn, 30 tbc [alsa @ 0x2476600] capture with some ALSA plugins, especially dsnoop, may hang. [alsa @ 0x2476600] Estimating duration from bitrate, this may be inaccurate Input #1, alsa, from ’pulse’ : Duration : N/A, start : 1399806153.198090, bitrate : N/A Stream #1.0 : Audio : pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s File ’test.mp4’ already exists. Overwrite ? [y/N] y Incompatible pixel format ’bgra’ for codec ’mpeg4’, auto-selecting format ’yuv420p’ [buffer @ 0x2497840] w:1920 h:1080 pixfmt:bgra [avsink @ 0x2497c00] auto-inserting filter ’auto-inserted scaler 0’ between the filter ’src’ and the filter ’out’ [scale @ 0x24a9680] w:1920 h:1080 fmt:bgra -> w:1920 h:1080 fmt:yuv420p flags:0x4 Output #0, mp4, to ’test.mp4’ : Metadata : encoder : Lavf53.21.1 Stream #0.0 : Video : mpeg4, yuv420p, 1920x1080, q=2-31, 200 kb/s, 30 tbn, 30 tbc Stream #0.1 : Audio : aac, 48000 Hz, 2 channels, s16, 200 kb/s Stream mapping : Stream #0.0 -> #0.0 Stream #1.0 -> #0.1 Press ctrl-c to stop encoding ^Cframe= 229 fps= 36 q=24.8 Lsize= 2316kB time=7.59 bitrate=2497.9kbits/s dup=43 drop=4 video:2134kB audio:176kB global headers:0kB muxing overhead 0.253411% Received signal 2 : terminating.
As you can see the video is being saved with 200kbs no matter what option I set ; what am I doing wrong ?
I’m running this on Ubuntu 12.04, ffmpeg isffmpeg version 0.8.10-4:0.8.10-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers built on Feb 6 2014 20:56:59 with gcc 4.6.3
.Cheers
-
RGB to YUV422 conversion with ffmpeg, incorrect colors
22 janvier 2016, par user3578571I’m trying to convert an 8bit RGB uncompressed to an mpeg2 mxf file (xdcam 422 HD 1080 50i) which is YUV422. With info from the FFMpeg docs and various websites i made the following command :
./ffmpeg -y -i test_lines.mov -pix_fmt yuv422p -vcodec mpeg2video -non_linear_quant 1 -flags +ildct+ilme -top 1 -dc 10 -intra_vlc 1 -qmax 2 -vtag xd5c -rc_max_vbv_use 1 -rc_min_vbv_use 1 -g 12 -b:v 50000k -minrate 50000k -maxrate 50000k -bufsize 8000k -acodec pcm_s24le -ar 48000 -bf 2 -ac 2 lines_HD.mxf
This gave me a result with the colors much brighter than the original.
So i tried adding the options
-color_range 1 -colorspace 1 -color_primaries 1 -color_trc 1
but this didn’t seem to do anything.After adding
colormatrix=bt601:bt709
i got a way better image, but slightly darker than the original and it also feels weird specifying this option cause the source is also in the REC709 colorspace, so why specify it differently ?Next i regenerated my source image to an YUV codec (prores) and rerun FFMpeg on it with the colors coming out just fine. Therefore i think it has to be an RGB -> YUV problem.
Does somebody have an idea how to this properly ? I can provide screenshots of the different results on a videoscope as soon as i’m back at the office, if anybody is interested.Last, i know there are various topics touching this subject but either they go way over my head FFmpeg wise or bring me to the stage where i already am.