
Recherche avancée
Autres articles (11)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
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 (...) -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)
Sur d’autres sites (5731)
-
Scale image with ffmpeg in bash script
17 juin 2014, par Brian BennettI’m playing with jclem’s Gifify bash script as a quick way to make GIFs for documentation. It runs on
ffmpeg
andImageMagick
and I’m trying to find a way to add a variable to scale the produced GIF so I don’t have to go back and add it again.I thought I added thed
(resize) variable correctly, but the script fails and just prints the help contents. It does not show my added variable in that help readout. Any ideas ?Update
I solved the problem with printing help contents rather than running the script, but now I’m receiving an error about the
-scale
parameter.convert: invalid argument for option `-scale': -vf @ error/convert.c/ConvertImageCommand/2513.
Is this because of my
if
statement syntax for the scale parameter below ?#!/bin/bash
function printHelpAndExit {
echo 'Usage:'
echo ' gifify -conx filename'
echo ''
echo 'Options: (all optional)'
echo ' c CROP: The x and y crops, from the top left of the image, i.e. 640:480'
echo ' o OUTPUT: The basename of the file to be output (default "output")'
echo ' n: Do not upload the resulting image to CloudApp'
echo ' r FPS: Output at this (frame)rate (default 10)'
echo ' s SPEED: Output using this speed modifier (default 1)'
echo ' NOTE: GIFs max out at 100fps depending on platform. For consistency,'
echo ' ensure that FPSxSPEED is not > ~60!'
echo ' x: Remove the original file and resulting .gif once the script is complete'
echo ' d SCALE: Scales GIF image to specified dimensions (default no scale)'
echo ''
echo 'Example:'
echo ' gifify -c 240:80 -o my-gif -x my-movie.mov'
exit $1
}
noupload=0
fps=10
speed=1
OPTERR=0
while getopts "c:o:r:s:d:nx" opt; do
case $opt in
c) crop=$OPTARG;;
h) printHelpAndExit 0;;
o) output=$OPTARG;;
n) noupload=1;;
r) fps=$OPTARG;;
s) speed=$OPTARG;;
x) cleanup=1;;
d) scale=$OPTARG;;
*) printHelpAndExit 1;;
esac
done
shift $(( OPTIND - 1 ))
filename=$1
if [ -z ${output} ]; then
output=$filename
fi
if [ -z $filename ]; then printHelpAndExit 1; fi
if [ $crop ]; then
crop="-vf crop=${crop}:0:0"
else
crop=
fi
if [ $scale ]; then
scale="-vf scale=${scale}:0:0"
else
scale=
fi
# -delay uses time per tick (a tick defaults to 1/100 of a second)
# so 60fps == -delay 1.666666 which is rounded to 2 because convert
# apparently stores this as an integer. To animate faster than 60fps,
# you must drop frames, meaning you must specify a lower -r. This is
# due to the GIF format as well as GIF renderers that cap frame delays
# < 3 to 3 or sometimes 10. Source:
# http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546
echo 'Exporting movie...'
delay=$(bc -l <<< "100/$fps/$speed")
temp=$(mktemp /tmp/tempfile.XXXXXXXXX)
ffmpeg -loglevel panic -i $filename $crop -r $fps -f image2pipe -vcodec ppm - >> $temp
echo 'Making gif...'
cat $temp | convert +dither -layers Optimize -delay $delay -scale $scale - ${output}.gif
if [ $noupload -ne 1 ]; then
open -a Cloud ${output}.gif
echo `pbpaste`
if [ $cleanup ]; then
rm $filename
rm ${output}.gif
fi
else
echo ${output}.gif
fi -
ffmpeg convert directory GIF in linux [migrated]
10 mars 2023, par Dan GonzalezHi i'm trying to convert a directory of gifs to mp4 but i don't know how to i'm use this code for single file please help me

!ffmpeg -i /content/drive/MyDrive/1/ -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" /content/drive/MyDrive/2/${f%.gif}.mp4


Converting gif directory to mp4


-
Make new VDPAU easier to use by adding context to callback.
7 août 2013, par Reimar DöffingerMake new VDPAU easier to use by adding context to callback.
Using VDPAU correctly means checking for preemption
and possibly regenerating the context all the time.
With the current API there is no context or other
user-defined pointer and thus this in not possible
during decoding unless using some hack like global
variables.
The need to reinitialize both surfaces and even function
pointers makes handling preemption even more difficult.
This patch introduces a new render2 function that gets
both the AVCodecContext and AVFrame in addition,
in both the user can store additional opaque data.
This allows even advanced approaches like keeping a
"generation counter" for the surfaces so they can be
regenerated on the fly and efficiently.
In addition, the function has a return value that will
be passed through all the way instead of being silently
ignored as for the current render function.
Unfortunately the HWAccel API has no way of providing
API/ABI compatibility, so a currently disallowed
state (render pointer being NULL) is used to extend it.Signed-off-by : Reimar Döffinger <Reimar.Doeffinger@gmx.de>