
Recherche avancée
Autres articles (30)
-
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 (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)
Sur d’autres sites (5522)
-
operations (resize, crop...) over images with output pipeline using ffmpeg
7 juin 2021, par Ondřej DobrovolnýI have been experimenting with ffmpeg in C# using System.Diagnostics.Process. Im trying to do some basic operations such as resizing, croping and adding watermarks over image. So far i managed everything well but now i am trying to load image from some storage (C :/ ....), do some operation and then use pipeline to feed the image to memory so that i can work with it further.
This is the command itself


"-i C:\Work\PrivateTestingRepos\ImageProcessingTest\MyTestingApplication\FfmpegProcessTest\src\guid.jpg -vf "scale=1024:768" -f png_pipe pipe:1"



and this produces following error :


error: ffmpeg version N-102608-g7a879cce37 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10-win32 (GCC) 20210408
 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32thread
s --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enabl
e-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enabl
e-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enabl
e-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --ex
tra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp
 libavutil 57. 0.100 / 57. 0.100
 libavcodec 59. 1.100 / 59. 1.100
 libavformat 59. 2.101 / 59. 2.101
 libavdevice 59. 0.100 / 59. 0.100
 libavfilter 8. 0.101 / 8. 0.101
 libswscale 6. 0.100 / 6. 0.100
 libswresample 4. 0.100 / 4. 0.100
 libpostproc 56. 0.100 / 56. 0.100
Input #0, image2, from 'C:\Work\PrivateTestingRepos\ImageProcessingTest\MyTestingApplication\FfmpegProcessTest\src\guid.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 280300 kb/s
 Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 2735x1904, 25 fps, 25 tbr, 25 tbn
[NULL @ 0000024cfa5d8400] Requested output format 'png_pipe' is not a suitable output format
pipe:1: Invalid argument



From error it look like ffmpeg tries to load the image as Image2 which is some kind of video format and when i tell it to save it as png pipeline it throws error which is understandable.
Is there some way of using ffmpeg to this kind of operations over images ? Iam aware that its mostly used for videos and images are secondary feature.
If necessary i can provide source codes.
Thanks for your time ! :)


-
bad audio mic recording quality with ffmpeg compared to sox
1er juillet 2021, par user2355330I am contacting you as after 3 days of searching I am stuck on a really simple point.


I want to record the sound of my mic on MacOS using ffmpeg.


I managed to do it using the following command :


ffmpeg -f avfoundation -audio_device_index 2 -i "none:-" -c:a pcm_s32l alexspeaking.wav -y -loglevel debug



The issue is that each time I am speaking, there are cracks and pop in the sound...


I tried to use sox and it gave me a perfect and crystal clear sound and I have no idea why... Below is the output of the sox command :


sox -t coreaudio "G935 Gaming Headset" toto.wav -V6
sox: SoX v
time: Nov 15 2020 01:06:02
uname: Darwin MacBook-Pro.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
compiler: gcc Apple LLVM 12.0.0 (clang-1200.0.32.27)
arch: 1288 48 88 L
sox INFO coreaudio: Found Audio Device "DELL U2721DE"
sox INFO coreaudio: Found Audio Device "G935 Gaming "
sox DBUG coreaudio: audio device did not accept 2 channels. Use 1 channels instead.
sox DBUG coreaudio: audio device did not accept 44100 sample rate. Use 48000 instead.
Input File : 'G935 Gaming Headset' (coreaudio)
Channels : 1
Sample Rate : 48000
Precision : 32-bit
Sample Encoding: 32-bit Signed Integer PCM
Endian Type : little
Reverse Nibbles: no
Reverse Bits : no
sox INFO sox: Overwriting `toto.wav'
sox DBUG wav: Writing Wave file: Microsoft PCM format, 1 channel, 48000 samp/sec
sox DBUG wav: 192000 byte/sec, 4 block align, 32 bits/samp
Output File : 'toto.wav'
Channels : 1
Sample Rate : 48000
Precision : 32-bit
Sample Encoding: 32-bit Signed Integer PCM
Endian Type : little
Reverse Nibbles: no
Reverse Bits : no
Comment : 'Processed by SoX'
sox DBUG effects: sox_add_effect: extending effects table, new size = 8
sox INFO sox: effects chain: input 48000Hz 1 channels (multi) 32 bits unknown length
sox INFO sox: effects chain: output 48000Hz 1 channels (multi) 32 bits unknown length
sox DBUG sox: start-up time = 0.051332
In:0.00% 00:00:07.13 [00:00:00.00] Out:340k [ | ] Clip:0 ^C
sox DBUG input: output buffer still held 2048 samples; dropped.
Aborted.
sox DBUG wav: Finished writing Wave file, 1359872 data bytes 339968 samples



I am pretty sure the issue is linked to the way the encoding is done and the params I used with ffmpeg but I don't seem to be able to grasp which one I must use.


Any ideas if there are ffmpeg experts here ?


-
Passing bytes to ffmpeg in python with io
8 juin 2021, par TrykowoSorry, new to stackoverflow


Just wondering if it's possible to pass byte data from io.

I'm trying to extract frames from a gif with ffmpeg then use Pillow to resize it.

I know you can extract frames from a gif with Pillow, but sometimes it butchers certain gifs. So I'm using ffmpeg as a fix.

As for why I'd like the gif to be read from memory is because I'm going to change this so gifs from urls will be wrapped in Bytesio instead of saving.

As for why I have the extra Pillow code, I did successfully get it working by passing an actual filename into the ffmpeg command.


original_pil = Image.open("1.gif")

bytes_io = open("1.gif", "rb")
bytes_io.seek(0)

ffmpeg = 'ffmpeg'

cmd = [ffmpeg,
 '-i', '-',
 '-vsync', '0',
 '-f', 'image2pipe',
 '-pix_fmt', 'rgba',
 '-vcodec', 'png',
 '-report',
 '-']

depth = 4
width, height = original_pil.size
buf_size = depth * width * height + 100
nbytes = width * height * 4

proc = SP.Popen(cmd, stdout=SP.PIPE, stdin=SP.PIPE, stderr=SP.PIPE, bufsize=buf_size, shell=False)
out, err = proc.communicate(input=bytes_io.read(), timeout=None)



FFMPEG report :


ffmpeg started on 2021-06-07 at 18:58:14
Report written to "ffmpeg-20210607-185814.log"
Command line:
ffmpeg -i - -vsync 0 -f image2pipe -pix_fmt rgba -vcodec png -report -
ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
 configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --ena WARNING: library configuration mismatch
 avcodec configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enab libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument '-'.
Reading option '-vsync' ... matched as option 'vsync' (video sync method) with argument '0'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'image2pipe'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'rgba'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'png'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option vsync (video sync method) with argument 0.
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url -.
Successfully parsed a group of options.
Opening an input file: -.
[NULL @ 0x55b59c38f7c0] Opening 'pipe:' for reading
[pipe @ 0x55b59c390240] Setting default whitelist 'crypto'
[gif @ 0x55b59c38f7c0] Format gif probed with size=2048 and score=100
[AVIOContext @ 0x55b59c398680] Statistics: 4614093 bytes read, 0 seeks
pipe:: Input/output error