
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (86)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (11391)
-
Revision a1123538a5 : Moving vp9_token from common to encoder. Change-Id : I40a070c353663e82c59e174d7c
5 décembre 2013, par Dmitry KovalevChanged Paths :
Modify /vp9/common/vp9_treecoder.c
Modify /vp9/common/vp9_treecoder.h
Modify /vp9/encoder/vp9_tokenize.h
Modify /vp9/encoder/vp9_treewriter.c
Modify /vp9/encoder/vp9_treewriter.h
Moving vp9_token from common to encoder.Change-Id : I40a070c353663e82c59e174d7c92eb84f72ed808
-
Bad pictures displayed by SDL after decoded using ffmpeg from a rtp stream
2 juin 2015, par clouyfsailMy program is a H323 endpoint.I receive a H263 rtp stream from H323 protocol stack,and I need to decode and play it with SDL2.0.
Here is what I did.Firstly I assembled rtp packets into H263 frames myself before decode them.After I got a H263 frame, I sent it to ffmpeg to decode it.Just like this :
void DecodeFrame(uint8_t *buff, unsigned size)
{
//There is no rtp header in this buff,just rtp payload,and this is a
//a complete frame
if(!buff || size <= 0)
return;
AVPacket packet;
av_init_packet(&packet);
int got_picture = 0;
packet.data = buff;
packet.size = size;
//I have assigned a H263 codec and initialized corresponding structures.
int len = avcodec_decode_video2(m_codec_context, m_picture,
&got_picture, &packet);
if(len < 0)
return;
if (got_picture)
{
packet.pts = AV_NOPTS_VALUE;
sws_scale(m_sws_context, (const uint8_t * const *)m_picture->data,
m_picture->linesize, 0, m_codec_context->height, m_yuv_frame->data,
m_yuv_frame->linesize);
SDL_UpdateYUVTexture(m_sdl_texture, &m_sdl_rect,
m_yuv_frame->data[0], m_yuv_frame->linesize[0],
m_yuv_frame->data[1], m_yuv_frame->linesize[1],
m_yuv_frame->data[2], m_yuv_frame->linesize[2]);
SDL_RenderClear(m_sdl_renderer);
SDL_RenderCopy(m_sdl_renderer, m_sdl_texture, nullptr, &m_sdl_rect);
SDL_RenderPresent(m_sdl_renderer);
}
}It worked, but not as I wished.At the begining of the play,I got a foggy picture,then it turned to clear in a strange way.The image became clear row by row.After that,it turned to foggy sharply if the scene changed drastically(In remote endpoint,the source of video is a camera),and it became clear slowly row by row again.This confuses me much.I want to know why this happened.
-
FFMPEG Inverts colors when converting tiff pictures to png
1er juin 2021, par Mounia JaitiWe need to convert thousands of tiff pictures to png. To accomplish that we are using FFMPEG. We've noticed recently that for very few of the converted files (in png), the colors are inverted : the input tiff file is all black and white (a technical drawing in black with a white background), and the output png file is white and black (the drawing becomes white and the background becomes black). Of course we don't want that, we need the colors to stay the same.


Here is the command we are using :


ffmpeg -y -v warning -i in_file.tif out_file.png



We've tested the 'negate' parameter on those files, and the pictures are correctly converted. But we can't apply this parameter to all of the input tiff files.
Here is the command with the negate parameter :


ffmpeg -y -v verbose -i input.tif -vf negate output.png



The Code Java we're using :


String ffmpegPath="/Users/user11/ffmpeg//ffmpeg";
 List<string> commandArgs = new ArrayList<string>();
 commandArgs.add(ffmpegPath);
 //overwrite output file if it exists
 commandArgs.add("-y"); 
 commandArgs.add("-v");
 commandArgs.add("verbose");
 //set input file 
 commandArgs.add("-i"); 
 commandArgs.add(picture.getAbsolutePath());
 commandArgs.add(dest.getAbsolutePath());
 
 String cmd = "";
 for(String cmdArg : commandArgs) {
 cmd += cmdArg + " ";
 }


</string></string>


Logs for tif having the bug :



31, 2021 2:15:51 PM 
INFO: Executing : /Users/user11/ffmpeg/ffmpeg -y -v verbose -i /Users/user11/ffmpeg/input.tif /Users/user11/ffmpeg/output.png 
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: ffmpeg version 4.4-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: built with Apple clang version 11.0.0 (clang-1100.0.33.17)
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libavutil 56. 70.100 / 56. 70.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libavcodec 58.134.100 / 58.134.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libavformat 58. 76.100 / 58. 76.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libavdevice 58. 13.100 / 58. 13.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libavfilter 7.110.100 / 7.110.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libswscale 5. 9.100 / 5. 9.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libswresample 3. 9.100 / 3. 9.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: libpostproc 55. 9.100 / 55. 9.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: [tiff_pipe @ 0x7fa7f6008200] parser not found for codec tiff, packets or times may be invalid.
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Last message repeated 1 times
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Input #0, tiff_pipe, from '/Users/user11/ffmpeg/input.tif':
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Duration: N/A, bitrate: N/A
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Stream #0:0: Video: tiff, 1 reference frame, monob, 2008x2481 [SAR 1:1 DAR 2008:2481], 25 fps, 25 tbr, 25 tbn, 25 tbc
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Stream mapping:
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Stream #0:0 -> #0:0 (tiff (native) -> png (native))
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Press [q] to stop, [?] for help
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: [graph 0 input from stream 0:0 @ 0x7fa7f4c08300] w:2008 h:2481 pixfmt:monob tb:1/25 fr:25/1 sar:1/1
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Output #0, image2, to '/Users/user11/ffmpeg/output.png':
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Metadata:
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: encoder : Lavf58.76.100
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Stream #0:0: Video: png, 1 reference frame, monob(progressive), 2008x2481 (0x0) [SAR 1:1 DAR 2008:2481], q=2-31, 200 kb/s, 25 fps, 25 tbn
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Metadata:
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: encoder : Lavc58.134.100 png
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: frame= 1 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed= 0x 
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: No more output streams to write to, finishing.
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: [AVIOContext @ 0x7fa7f4c14180] Statistics: 0 seeks, 1 writeouts
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=1.31x 
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: video:37kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Input file #0 (/Users/user11/ffmpeg/input.tif):
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Input stream #0:0 (video): 1 packets read (18100 bytes); 1 frames decoded; 
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Total: 1 packets (18100 bytes) demuxed
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Output file #0 (/Users/user11/ffmpeg/output.png):
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (38013 bytes); 
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: Total: 1 packets (38013 bytes) muxed
May 31, 2021 2:15:51 PM 
INFO: ReencodePicture output: [AVIOContext @ 0x7fa7f4f041c0] Statistics: 18100 bytes read, 0 seeks
May 31, 2021 2:15:51 PM 
INFO: BinaryRepositoryHelper.convertPixTo ffmpeg Process returned : java.lang.UNIXProcess@27ddd392, ended with code 0, and returned in 160 ms, out=/Users/user11/ffmpeg/output.png exists=true








So our questions are :


- 

- Is there a way to identify the tiff files that will be converted to png with inverted colors ? So that we can know to which files the 'negate' parameter must be applied.
- Are there any other FFMPEG parameter that we can use.






This issue has been driving us mad for the last couple of days. Any help would be highly appreciated.
Thanks.


Example of Tif picture


https://drive.google.com/file/d/1U1a91gTk1gaJb-XAPavNq6UhmjWXZjbM/view?usp=sharing