
Recherche avancée
Autres articles (21)
-
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
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 (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)
Sur d’autres sites (4391)
-
FFMPEG 'Invalid data found when processing input' while scaling an Image
22 février 2020, par priya vermaI just installed FFMPEG on a server and I am testing it to see if it works. I am new to this, so I don’t know if I’m doing it correctly. I want to scale and compress an image. I am doing it by following php code -
exec("ffmpeg -i $inputImg -vf \"scale='-2':'min(480, ih)\" $outputImg 2>&1", $output, $returnStatus);
print_r($output);
echo '<br />'.$returnStatus;The thing is it works for some images and for images it gives an error. For ex. I have tried to compress an image and it returns with error -
ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers
[1] => built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36)
[2] => configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg
--incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man
--arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64
-mtune=generic' --extra-ldflags='-Wl,-z,relro ' --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3
--enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa
--enable-libass --enable-libcdio --enable-libdc1394 --enable-libfdk-aac
--enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm
--enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus
--enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264
--enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter
--enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping
--shlibdir=/usr/lib64 --enable-runtime-cpudetect
[3] => libavutil 54. 31.100 / 54. 31.100
[4] => libavcodec 56. 60.100 / 56. 60.100
[5] => libavformat 56. 40.101 / 56. 40.101
[6] => libavdevice 56. 4.100 / 56. 4.100
[7] => libavfilter 5. 40.101 / 5. 40.101
[8] => libavresample 2. 1. 0 / 2. 1. 0
[9] => libswscale 3. 1.101 / 3. 1.101
[10] => libswresample 1. 2.101 / 1. 2.101
[11] => libpostproc 53. 3.100 / 53. 3.100
[12] => /tmp/phpjLYmRd: Invalid data found when processing inputAm I doing it incorrectly or what ? Because it does work with some images and for some it doesn’t ! Also, is this the correct way to scale and compress an Image using FFMPEG, would love to get some insights.
-
ffmpeg : audio to opus and embed song cover to lossless vp9 in webm container
14 mars 2020, par snow344im having some trouble in making a lossless webm of a audio file
mpv plays it fine, but youtube won’t process it no matter what
ffmpeg -i "audio.flac" -c:v vp9 -c:a libopus -lossless 1 -b:a 500k -pix_fmt yuv420p test.webm
Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
Stream #0:1: Video: mjpeg (Progressive), yuv444p(pc, bt470bg/unknown/unknown), 800x800 [SAR 300:300 DAR 1:1], 90k tbr, 90k tbn, 90k tbc (attached pic)
Metadata:
comment : Cover (front)
File 'test.webm' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #0:1 -> #0:0 (mjpeg (native) -> vp9 (libvpx-vp9))
Stream #0:0 -> #0:1 (flac (native) -> opus (libopus))
Press [q] to stop, [?] for help
[swscaler @ 0000028ef88c6000] deprecated pixel format used, make sure you did set range correctly
[libvpx-vp9 @ 0000028ef854cf00] v1.8.2
Output #0, webm, to 'test.webm':
Stream #0:0: Video: vp9 (libvpx-vp9), yuv420p(progressive), 800x800 [SAR 1:1 DAR 1:1], q=-1--1, 90k fps, 1k tbn, 90k tbc (attached pic)
Metadata:
comment : Cover (front)
encoder : Lavc58.73.101 libvpx-vp9
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Stream #0:1: Audio: opus (libopus), 48000 Hz, stereo, s16, 500 kb/s
Metadata:
encoder : Lavc58.73.101 libopus
frame= 1 fps=0.2 q=0.0 Lsize= 15327kB time=00:04:11.17 bitrate= 499.9kbits/s speed=53.7x
video:386kB audio:14853kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.574758%thanks in advance
-
FFMPEG - Width/ Height Not Divisible by 2 (Scaling to Generate MBR Output)
15 avril 2020, par Sanjeev PandeyI am trying to generate multilple variants of videos in my library (Mp4 formats) and have renditions planned ranging from 1080p to 240p and popular sizes in between. For that I am taking a video with a AxB resolution and then running through a code (on bash) which scales them to desired following sizes - 
426x240
640x360
842x480
1280x720
1920x1080, with different bitrates of course, and then saves as Mp4 again.



Now, this works just fine if source video has height and width divisible by 2, but code breaks on the following line for the videos with odd width and height :

-vf scale=w=${width}:h=${height}:force_original_aspect_ratio=decrease"



Where 'width' and 'height' are the desired (and hardcoded) for every iteration : E.g. "426x240", and "640x360"



The Error :

[libx264 @ 00000187da2a1580] width not divisible by 2 (639x360)

Error initializing output stream 1:0 -- Error while opening encoder for output stream #1:0 - maybe incorrect parameters such as bit_rate, rate, width or height



Now approaches those are explained in this one doesn't work for me since I am scaling - FFMPEG (libx264) "height not divisible by 2"



And, I tried this one too but it seems all qualities are getting the same size -ffmpeg : width not divisible by 2 (when keep proportions)





- 

- This is how I tried to use this one :
scale='bitand(oh*dar,65534)':'min(${height},ih)'







Kindly suggest how to solve this, keeping in view that :
1. I have a very large library and I can't do manual change for every video
2. I need to scale the video and keep the aspect ratio



Thanks !



PS : [Edit] One way that I can see is padding all of the odd height/ weight videos using a second script in advance. This however doubles my work time and load. I would prefer to keep it in single script. This is the script I see that I can use for padding :
```ffmpeg -r 24 -i -vcodec libx264 -y -an -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2"`` (from : FFMPEG (libx264) "height not divisible by 2")


- This is how I tried to use this one :