
Recherche avancée
Autres articles (56)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
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 (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (6859)
-
FFMPEG rtmp live stream with android fps is too low
27 novembre 2015, par 蔡明原I’m interesting live stream from android to youtube.
I have compile ffmpeg and write jni to live stream with android.
but the fps is too low, it always has 3 5 fps, the user view is not good.
how can i do to change the fps.
this is my jni code with ffmpeg init.AVCodecContext *video_codec_ctx = video_stream->codec;
video_codec_ctx->codec_id = video_codec->id;
video_codec_ctx->codec_type = AVMEDIA_TYPE_VIDEO;
video_codec_ctx->level = 31;
video_codec_ctx->width = width;
video_codec_ctx->height = height;
video_codec_ctx->pix_fmt = PIX_FMT_YUV420P;
video_codec_ctx->rc_max_rate = 0;
video_codec_ctx->rc_buffer_size = 0;
video_codec_ctx->gop_size = 30;
video_codec_ctx->max_b_frames = 0;
video_codec_ctx->slices = 8;
video_codec_ctx->b_frame_strategy = 1;
video_codec_ctx->coder_type = 0;
video_codec_ctx->me_cmp = 1;
video_codec_ctx->me_range = 16;
video_codec_ctx->qmin = 10;
video_codec_ctx->qmax = 51;
video_codec_ctx->keyint_min = 25;
video_codec_ctx->refs= 3;
video_codec_ctx->trellis = 0;
video_codec_ctx->scenechange_threshold = 40;
video_codec_ctx->flags |= CODEC_FLAG_LOOP_FILTER;
video_codec_ctx->me_method = ME_HEX;
video_codec_ctx->me_subpel_quality = 6;
video_codec_ctx->i_quant_factor = 0.71;
video_codec_ctx->qcompress = 0.6;
video_codec_ctx->max_qdiff = 4;
video_codec_ctx->time_base.den = 30;
video_codec_ctx->time_base.num = 1;
video_codec_ctx->bit_rate = 5200*1000;
video_codec_ctx->bit_rate_tolerance = 0;
video_codec_ctx->flags2 |= 0x00000100;
fmt_context->bit_rate = 6000*1000;
av_opt_set(video_codec_ctx, "partitions", "i8x8,i4x4,p8x8,b8x8", 0);
av_opt_set_int(video_codec_ctx, "direct-pred", 1, 0);
av_opt_set_int(video_codec_ctx, "rc-lookahead", 0, 0);
av_opt_set_int(video_codec_ctx, "fast-pskip", 1, 0);
av_opt_set_int(video_codec_ctx, "mixed-refs", 1, 0);
av_opt_set_int(video_codec_ctx, "8x8dct", 0, 0);
av_opt_set_int(video_codec_ctx, "weightb", 0, 0);
if(fmt_context->oformat->flags & AVFMT_GLOBALHEADER)
video_codec_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
LOGI("Opening video codec");
AVDictionary *vopts = NULL;
av_dict_set(&vopts, "profile", "main", 0);
//av_dict_set(&vopts, "vprofile", "main", 0);
av_dict_set(&vopts, "rc-lookahead", 0, 0);
av_dict_set(&vopts, "tune", "film", 0);
av_dict_set(&vopts, "preset", "ultrafast", 0);
av_opt_set(video_codec_ctx->priv_data,"tune","film",0);
av_opt_set(video_codec_ctx->priv_data,"preset","ultrafast",0);
av_opt_set(video_codec_ctx->priv_data,"tune","film",0);
int open_res = avcodec_open2(video_codec_ctx, video_codec, &vopts); -
avformat/md5enc : add format, version and column headers
20 octobre 2013, par Michael Niedermayeravformat/md5enc : add format, version and column headers
See Ticket2280
Signed-off-by : Michael Niedermayer <michaelni@gmx.at>
- [DH] libavformat/md5enc.c
- [DH] tests/ref/fate/h264-crop-to-container
- [DH] tests/ref/fate/h264-extreme-plane-pred
- [DH] tests/ref/fate/utvideoenc_rgb_left
- [DH] tests/ref/fate/utvideoenc_rgb_median
- [DH] tests/ref/fate/utvideoenc_rgb_none
- [DH] tests/ref/fate/utvideoenc_rgba_left
- [DH] tests/ref/fate/utvideoenc_rgba_median
- [DH] tests/ref/fate/utvideoenc_rgba_none
- [DH] tests/ref/fate/utvideoenc_yuv420_left
- [DH] tests/ref/fate/utvideoenc_yuv420_median
- [DH] tests/ref/fate/utvideoenc_yuv420_none
- [DH] tests/ref/fate/utvideoenc_yuv422_left
- [DH] tests/ref/fate/utvideoenc_yuv422_median
- [DH] tests/ref/fate/utvideoenc_yuv422_none
- [DH] tests/ref/fate/vp8-sign-bias
- [DH] tests/ref/fate/vp8-size-change
- [DH] tests/ref/fate/vp8-test-vector-001
- [DH] tests/ref/fate/vp8-test-vector-002
- [DH] tests/ref/fate/vp8-test-vector-003
- [DH] tests/ref/fate/vp8-test-vector-004
- [DH] tests/ref/fate/vp8-test-vector-005
- [DH] tests/ref/fate/vp8-test-vector-006
- [DH] tests/ref/fate/vp8-test-vector-007
- [DH] tests/ref/fate/vp8-test-vector-008
- [DH] tests/ref/fate/vp8-test-vector-009
- [DH] tests/ref/fate/vp8-test-vector-010
- [DH] tests/ref/fate/vp8-test-vector-011
- [DH] tests/ref/fate/vp8-test-vector-012
- [DH] tests/ref/fate/vp8-test-vector-013
- [DH] tests/ref/fate/vp8-test-vector-014
- [DH] tests/ref/fate/vp8-test-vector-015
- [DH] tests/ref/fate/vp8-test-vector-016
- [DH] tests/ref/fate/vp8-test-vector-017
- [DH] tests/ref/fate/vp9-00-quantizer-00
- [DH] tests/ref/fate/vp9-00-quantizer-01
- [DH] tests/ref/fate/vp9-00-quantizer-02
- [DH] tests/ref/fate/vp9-00-quantizer-03
- [DH] tests/ref/fate/vp9-00-quantizer-04
- [DH] tests/ref/fate/vp9-00-quantizer-05
- [DH] tests/ref/fate/vp9-00-quantizer-06
- [DH] tests/ref/fate/vp9-00-quantizer-07
- [DH] tests/ref/fate/vp9-00-quantizer-08
- [DH] tests/ref/fate/vp9-00-quantizer-09
- [DH] tests/ref/fate/vp9-00-quantizer-10
- [DH] tests/ref/fate/vp9-00-quantizer-11
- [DH] tests/ref/fate/vp9-00-quantizer-12
- [DH] tests/ref/fate/vp9-00-quantizer-13
- [DH] tests/ref/fate/vp9-00-quantizer-14
- [DH] tests/ref/fate/vp9-00-quantizer-15
- [DH] tests/ref/fate/vp9-00-quantizer-16
- [DH] tests/ref/fate/vp9-00-quantizer-17
- [DH] tests/ref/fate/vp9-00-quantizer-18
- [DH] tests/ref/fate/vp9-00-quantizer-19
- [DH] tests/ref/fate/vp9-00-quantizer-20
- [DH] tests/ref/fate/vp9-00-quantizer-21
- [DH] tests/ref/fate/vp9-00-quantizer-22
- [DH] tests/ref/fate/vp9-00-quantizer-23
- [DH] tests/ref/fate/vp9-00-quantizer-24
- [DH] tests/ref/fate/vp9-00-quantizer-25
- [DH] tests/ref/fate/vp9-00-quantizer-26
- [DH] tests/ref/fate/vp9-00-quantizer-27
- [DH] tests/ref/fate/vp9-00-quantizer-28
- [DH] tests/ref/fate/vp9-00-quantizer-29
- [DH] tests/ref/fate/vp9-00-quantizer-30
- [DH] tests/ref/fate/vp9-00-quantizer-31
- [DH] tests/ref/fate/vp9-00-quantizer-32
- [DH] tests/ref/fate/vp9-00-quantizer-33
- [DH] tests/ref/fate/vp9-00-quantizer-34
- [DH] tests/ref/fate/vp9-00-quantizer-35
- [DH] tests/ref/fate/vp9-00-quantizer-36
- [DH] tests/ref/fate/vp9-00-quantizer-37
- [DH] tests/ref/fate/vp9-00-quantizer-38
- [DH] tests/ref/fate/vp9-00-quantizer-39
- [DH] tests/ref/fate/vp9-00-quantizer-40
- [DH] tests/ref/fate/vp9-00-quantizer-41
- [DH] tests/ref/fate/vp9-00-quantizer-42
- [DH] tests/ref/fate/vp9-00-quantizer-43
- [DH] tests/ref/fate/vp9-00-quantizer-44
- [DH] tests/ref/fate/vp9-00-quantizer-45
- [DH] tests/ref/fate/vp9-00-quantizer-46
- [DH] tests/ref/fate/vp9-00-quantizer-47
- [DH] tests/ref/fate/vp9-00-quantizer-48
- [DH] tests/ref/fate/vp9-00-quantizer-49
- [DH] tests/ref/fate/vp9-00-quantizer-50
- [DH] tests/ref/fate/vp9-00-quantizer-51
- [DH] tests/ref/fate/vp9-00-quantizer-52
- [DH] tests/ref/fate/vp9-00-quantizer-53
- [DH] tests/ref/fate/vp9-00-quantizer-54
- [DH] tests/ref/fate/vp9-00-quantizer-55
- [DH] tests/ref/fate/vp9-00-quantizer-56
- [DH] tests/ref/fate/vp9-00-quantizer-57
- [DH] tests/ref/fate/vp9-00-quantizer-58
- [DH] tests/ref/fate/vp9-00-quantizer-59
- [DH] tests/ref/fate/vp9-00-quantizer-60
- [DH] tests/ref/fate/vp9-00-quantizer-61
- [DH] tests/ref/fate/vp9-00-quantizer-62
- [DH] tests/ref/fate/vp9-00-quantizer-63
- [DH] tests/ref/fate/vp9-01-sharpness-1
- [DH] tests/ref/fate/vp9-01-sharpness-2
- [DH] tests/ref/fate/vp9-01-sharpness-3
- [DH] tests/ref/fate/vp9-01-sharpness-4
- [DH] tests/ref/fate/vp9-01-sharpness-5
- [DH] tests/ref/fate/vp9-01-sharpness-6
- [DH] tests/ref/fate/vp9-01-sharpness-7
- [DH] tests/ref/fate/vp9-02-size-08x08
- [DH] tests/ref/fate/vp9-02-size-08x10
- [DH] tests/ref/fate/vp9-02-size-08x16
- [DH] tests/ref/fate/vp9-02-size-08x18
- [DH] tests/ref/fate/vp9-02-size-08x32
- [DH] tests/ref/fate/vp9-02-size-08x34
- [DH] tests/ref/fate/vp9-02-size-08x64
- [DH] tests/ref/fate/vp9-02-size-08x66
- [DH] tests/ref/fate/vp9-02-size-10x08
- [DH] tests/ref/fate/vp9-02-size-10x10
- [DH] tests/ref/fate/vp9-02-size-10x16
- [DH] tests/ref/fate/vp9-02-size-10x18
- [DH] tests/ref/fate/vp9-02-size-10x32
- [DH] tests/ref/fate/vp9-02-size-10x34
- [DH] tests/ref/fate/vp9-02-size-10x64
- [DH] tests/ref/fate/vp9-02-size-10x66
- [DH] tests/ref/fate/vp9-02-size-16x08
- [D
-
Strange results when converting rgb yuv using ffmpeg in python
20 avril 2020, par user3569998I have JPG images and I am trying to do the following :



- 

- resize the input and save the result into PNG
- convert PNG images to YUV (for instance yuv444p10le) in AVI container
- convert AVI back to PNG image.









I am using python 3 and ffmpeg Linux version installed on Colab



I printed the difference between resized_png and restored_png. I have values of 255 which doesn't make sense at all.



[[[ 0 255 1]
 [ 0 0 1]
 [ 0 255 1]
 ...
 [ 1 0 0]
 [ 1 0 0]
 [ 2 0 1]]

 [[ 0 255 1]
 [ 0 255 1]
 [ 1 0 0]
 ...
 [ 1 0 0]
 [ 1 0 0]
 [ 1 0 0]]

 [[ 0 0 1]
 [ 0 0 1]
 [ 0 0 1]
 ...
 [ 1 255 0]
 [ 1 255 1]
 [ 1 0 0]]

 ...

 [[255 0 0]
 [255 0 1]
 [255 0 1]
 ...
 [ 0 0 0]
 [ 0 0 1]
 [255 0 1]]

 [[255 0 1]
 [255 0 1]
 [255 0 1]
 ...
 [ 0 0 1]
 [ 0 0 1]
 [ 0 0 0]]

 [[255 0 1]
 [255 0 1]
 [255 0 1]
 ...
 [255 1 0]
 [255 0 0]
 [255 0 1]]]




input_image = '/content/drive/My Drive/Colab Notebooks/adv_dnn/datasets/im2.jpg'
output_resized = '/content/drive/My Drive/Colab Notebooks/adv_dnn/datasets/im2.png'
folder_path = '/content/drive/My Drive/Colab Notebooks/adv_dnn/datasets/'

#do resize
# code = subprocess.call('cd /usr/bin/ffmpeg', shell=True)
# print(code)
cmd_resize = ['ffmpeg', '-y', '-i', input_image,'-vf', 'scale=224:224', output_resized]
process = subprocess.Popen(cmd_resize, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = process.communicate()
print(out)
print(err)

fmt = ['yuv420p', 'yuv420p10le', 'yuv444p', 'yuv444p10le']
for f in fmt:
 cmd2YUV = ['ffmpeg', '-y', '-i', output_resized, '-c:v', 'libx264', '-preset', 'placebo',\
 '-qp', '0', '-x264-params', "keyint=15:no-deblock=1", '-pix_fmt', f, \
 '-sws_flags', 'spline+accurate_rnd+full_chroma_int', \
 '-vf', "colorspace=bt709:iall=bt601-6-625:fast=1", '-color_range', '1', '-colorspace', '1', 
 '-color_primaries', '1', '-color_trc', '1', folder_path+'im2_'+f+'.avi']
 process = subprocess.Popen(cmd2YUV, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 out, err = process.communicate()
 print(out)
 print(err)

 cmd2PNG = ['ffmpeg', '-y', '-i', folder_path+'im2_'+f+'.avi', '-compression_level', '10', '-pred', 'mixed', \
 '-pix_fmt', 'rgb24', '-sws_flags', '+accurate_rnd+full_chroma_int', \
 folder_path+'im2_'+f+'.png']
 process = subprocess.Popen(cmd2PNG, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 out, err = process.communicate()
 print(out)
 print(err)

im1=pilim.open('/content/drive/My Drive/Colab Notebooks/adv_dnn/datasets/im2.png')
im2=pilim.open('/content/drive/My Drive/Colab Notebooks/adv_dnn/datasets/im2_yuv444p10le.png')
im1_2d = np.asarray(im1)
im2_2d = np.asarray(im2)
print(im2_2d-im1_2d)