
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (53)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (5100)
-
Piping output of youtube-dl to a script using ffmpeg looks ok using echo but returns an error when executing
29 mai 2020, par I0_olI am trying to use youtube-dl to get the urls of some videos and then pipe the resulting urls into the input of my script. So in my terminal I do



youtube-dl --ignore-config -iga ~/Desktop/youtube/videolist.txt | myscript.sh




In my script I define things as



command='ffmpeg' 
inputArgs='-i' 
outputArgs='-c:v libx264 -preset ultrafast -qp 0' 
directory="${HOME}/Desktop/Videos/"
output="video${count}" 
extension='mp4' 




I test it with
echo
to make sure everything appears in the correct order.


echo "${command}" "${inputArgs}" "${input}" "${outputArgs}" \
"${directory}""${output}${count}"."${extension}"




And the output from that looks correct. But when I try to run the same thing without the preceding
echo
command, i.e.,


"${command}" "${inputArgs}" "${input}" "${outputArgs}" \
"${directory}""${output}${count}"."${extension}"




I get an error message that says





At least one output file must be specified.





So it seems pretty obvious to me that I'm doing something wrong when attempting to execute it.



I have tried :



- 

- quoting the entire line as a whole
- quoting different sections together
- using the
exec
command in front of everything









No matter what I do, an error occurs at some point in the process. I know it's something simple I'm doing wrong. Would someone please enlighten me as to what that might be ?



I feel very strongly that the
.
shouldn't just be in the middle of everything like that, but I really don't know.


Again, everything looks as it should when I run
echo
before the string of shell parameters.


If more of the script I'm using is needed to understand what I'm talking about, that is not a problem.


-
Piping output of youtube-dl to a script using ffmpeg looks ok using echo but returns an error when executing
22 février 2016, par user556068I am trying to use youtube-dl to get the urls of some videos and then pipe the resulting urls into the input of my script. So in my terminal I do
youtube-dl --ignore-config -iga ~/Desktop/youtube/videolist.txt | myscript.sh
In my script I define things as
command='ffmpeg'
inputArgs='-i'
outputArgs='-c:v libx264 -preset ultrafast -qp 0'
directory="${HOME}/Desktop/Videos/"
output="video${count}"
extension='mp4'I test it with
echo
to make sure everything appears in the correct order.echo "${command}" "${inputArgs}" "${input}" "${outputArgs}" \
"${directory}""${output}${count}"."${extension}"And the output from that looks correct. But when I try to run the same thing without the preceding
echo
command, i.e.,"${command}" "${inputArgs}" "${input}" "${outputArgs}" \
"${directory}""${output}${count}"."${extension}"I get an error message that says
At least one output file must be specified.
So it seems pretty obvious to me that I’m doing something wrong when attempting to execute it.
I have tried :
- quoting the entire line as a whole
- quoting different sections together
- using the
exec
command in front of everything
No matter what I do, an error occurs at some point in the process. I know it’s something simple I’m doing wrong. Would someone please enlighten me as to what that might be ?
I feel very strongly that the
.
shouldn’t just be in the middle of everything like that, but I really don’t know.Again, everything looks as it should when I run
echo
before the string of shell parameters.If more of the script I’m using is needed to understand what I’m talking about, that is not a problem.
-
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