
Recherche avancée
Autres articles (44)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (5655)
-
bash script to install / update ffmpeg static builds
1er mars 2017, par JoakimHi I’m trying to make my first "real" bash script to do some real work than can be executed both manually and through cron jobs.
The script should download and install the ffmpeg-static-build from https://johnvansickle.com/ffmpeg
Here is what I’ve got so far :
#!/bin/bash
# Still to come, see if the script runs with root privileges else exit
#Download FFMPEG static daily build and it's md5
cd ~
wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz | tar -xf
#wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz.md5
curl -L https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz.md5 | tar -xf | tee -a https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz | cut -d\ -f1 | md5sum > md5sum.txt
#Chech the md5 is currect
#md5sum -c MD5SUMS
file1="md5sum.txt"
file2="ffmpeg-git-64bit-static.tar.xz.md5"
if ! cmp --silent "$file1" "$file2"; then
echo "md5sum doesn't match...\n exit" >&2
exit 1
fi
#tar -xf ffmpeg-*.tar.xz
cp ffmpeg-*-static/ff* /usr/bin/
cp ffmpeg-*-static/ff* /usr/local/bin/
cp ffmpeg-*-static/qt-faststart /usr/bin/
cp ffmpeg-*-static/qt-faststart /usr/local/bin/
# Consider change second location to use ln -s
# Remove downloads and do some clean up
rm -fr ffmpeg-*
#EOFAs you can see in the script i would like to add the md5sum check but it fails (got the md5sum check part from Compare md5 sums in bash script)
If i remove the md5sum part the script is working, but right now the script fails at the | tar -xf | part with this code
2017-02-28 00:10:24 (617 KB/s) - ‘ffmpeg-git-64bit-static.tar.xz’ saved [17564756/17564756]
tar: option requires an argument -- 'f'
Try 'tar --help' or 'tar --usage' for more information.
tee: 'https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz': No such file or directory
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 65 100 65 0 0 87 0 --:--:-- --:--:-- --:--:-- 87
(23) Failed writing body
md5sum doesn't match...
exitAs this is my first, I would appreciate any "I’m 4 years old" advices and why
update
Have made some changes to the script based on the suggestions in this thread, but my problem is I have no output what so ever at this state :( So I think it’s time to ask for the next clue
#!/bin/bash
# version 0.3z
## Download FFMPEG static daily build and it's md5
##
## To make this script working you might need to change the below values
## based on whether you are using a 32bit or 64 bit OS
## to obtain the right links you have to have a look @ https://johnvansickle.com/ffmpeg/
## and then change those below
##
## If you are running on a shared server or dowsn't have root priviliges you might need to uncomment
## point 5.
# a "~" means running users home folder :) and should be different from destination dir
download_dir=~
# as this can change if the ffmpeg is to be stored on ex. shared server
dest_dir=/usr/bin/
# The version it equal the filename from above link
version=ffmpeg-git-64bit-static.tar.xz
## Do not change anything below here!!
source_url=https://johnvansickle.com/ffmpeg/builds/${version}
md5_url=https://johnvansickle.com/ffmpeg/builds/${version}.md5
# Still to come, see if the script runs with write privileges else exit
# 1. Can we enter download directory else exit
cd ${download_dir} ||
printf "%s\n" "You can't enter this folder.\nPlease chage download_dir in this script..." >&2
exit 1
# 2. Check the md5 is correct or have changed from last check
## instead of downloading ffmpeg-git-64bit-static.tar.xz every time,
## regardless if it is new or not, I recommend only downloading it
## if the md5 does not match. Would save John some bandwidth at least
## thx for the idea to @LordNeckbeard
## So somehow i'll guess some sed or grep only first part is nessesary :(
## This is getting more advance than expected for a first time script :/
if ! diff <(md5sum ${version}) <(curl -s ${md5_url})
then
printf "%s\n" "md5sum doesn't match...\n
Downloading new version" >&2
rm -f ${version} >&2
curl ${source_url} -o ${download_dir}/${version} >&2
#exit 2
elif
diff <(md5sum ${version}) <(curl -s ${md5_url})
printf "%s\n" "Nothing new to download" >&2
exit 3
fi
# 3. untar
tar -xf ffmpeg-git-*-static.tar.xz
# 4. Move builds to destination directories
mv ${download_dir}/ffmpeg-*-static/ff* ${dest_dir}/
mv ${download_dir}/ffmpeg-*-static/qt-faststart ${dest_dir}/
# 5. Make soft links to static builds
ln -sfn ${dest_dir}/qt-faststart /usr/local/bin/qt-faststart
ln -sfn ${dest_dir}/ffmpeg /usr/local/bin/ffmpeg
ln -sfn ${dest_dir}/ffmpeg-10bit /usr/local/bin/ffmpeg-10bit
ln -sfn ${dest_dir}/ffprobe /usr/local/bin/ffprobe
ln -sfn ${dest_dir}/ffserver /usr/local/bin/ffserver
# Remove unzipped folder to do some clean up
rm -fr ffmpeg-git-*-static/
#EOFnote : do to some more in depth answering of why not compile from source :
1. This precompiled is usable on all Linux variations, despite distro and version
2. It usable on shared hosting servers with ssh accessUPDATE 2
#!/bin/bash
# version 0.4z
## Download FFMPEG static daily build and it's md5
##
## To make this script working you might need to change the below values
## based on whether you are using a 32bit or 64 bit OS
## to obtain the right links you have to have a look @ https://johnvansickle.com/ffmpeg/
## and then change those below
##
## Finished and working script should be distributed under GPLv3: free as in freedom
##
## If you are running on a shared server or dowsn't have root priviliges you might need to uncomment
## point 5.
# a "~" means running users home folder :) and should be different from destination dir
download_dir=~
# as this can change if the ffmpeg is to be stored on ex. shared server
dest_dir=/usr/bin/
# The version it equal the filename from above link
version=ffmpeg-git-64bit-static.tar.xz
## Do not change anything below here!!
source_url=https://johnvansickle.com/ffmpeg/builds/${version}
md5="curl -s https://johnvansickle.com/ffmpeg/builds/${version}.md5"
# Still to come, see if the script runs with write privileges else exit
# 1. Can we enter download directory else exit
cd ${download_dir} ||
printf "%s\n" "You can't enter this folder.\nPlease chage download_dir in this script..." >&2
exit 1
# 2. Check the md5 is correct or have changed from last check
## instead of downloading ffmpeg-git-64bit-static.tar.xz every time,
## regardless if it is new or not, I recommend only downloading it
## if the md5 does not match. Would save John some bandwidth at least
## thx for the idea to @LordNeckbeard
## This is getting more advance than expected for a first time script :/
if diff <(md5sum ${version}) <(${md5})
then
printf "%s\n" "No new version availeble" >&2
exit 1
elif ! diff <(md5sum ${version}) <(${md5})
then
rm -f ${version}
curl ${source_url} > ${version}
exit 0
#only proceed if downloaded version match it's md5
if ! diff <(md5sum ${version}) <(${md5})
then
rm -f ${version}
printf "%s\n" "Downloaded version is damaged, try later\ndamaged version have been deleted" >&2
exit 1
fi
# 3. untar
tar -xf ffmpeg-git-*-static.tar.xz
# 4. Move builds to destination directories
mv ${download_dir}/ffmpeg-*-static/ff* ${dest_dir}/
mv ${download_dir}/ffmpeg-*-static/qt-faststart ${dest_dir}/
# 5. Make soft links to static builds
ln -sfn ${dest_dir}/qt-faststart /usr/local/bin/qt-faststart
ln -sfn ${dest_dir}/ffmpeg /usr/local/bin/ffmpeg
ln -sfn ${dest_dir}/ffmpeg-10bit /usr/local/bin/ffmpeg-10bit
ln -sfn ${dest_dir}/ffprobe /usr/local/bin/ffprobe
ln -sfn ${dest_dir}/ffserver /usr/local/bin/ffserver
# Remove unzipped folder to do some clean up
rm -fr ffmpeg-git-*-static/
printf "%s\n" "Going to install new version" >&2
exit 1
fi
#EOFBut still having some issues :(
- Running this script returns : a blanc shell, but I’ve expected one of the printf statements
- When I’m trying to narrow down the problem and going back to basic and trying to run the script with only the "if" part it fails with 44 : Syntax error : "(" unexpected
-
running the very same "if" part typed directly into the shell/terminal itself it’s all happy !!
if diff <(md5sum ffmpeg-git-64bit-static.tar.xz) <(curl -s "https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz.md5"); then printf "%s\n" "No new version availeble" >&2; elif ! diff <(md5sum ffmpeg-git-64bit-static.tar.xz) <(curl -s "https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz.md5"); then rm -f ffmpeg-git-64bit-static.tar.xz; curl https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz > ffmpeg-git-64bit-static.tar.xz; printf "%s\n" "Going to install new version" >&2; fi
-
I’m confused
-
OpenCV compile process fails
12 septembre 2017, par borkSo I’m following this post on how to install openCV for Python 3. And I’m running into some issues at the compile process. Running the
make -j4
command goes fine up until it’s 28% through when I get this error message :error: use of undeclared identifier 'avcodec_free_frame'; did you mean 'avcodec_get_name'?
I don’t even know where to start to solve this issue. I’ve got
ffmpeg
installed through brew.Complete list of commands :
cd ~
git clone https://github.com/Itseez/opencv.git
cd opencv
git checkout 3.0.0
cd ~
git clone https://github.com/Itseez/opencv_contrib.git
cd opencv_contrib
git checkout 3.0.0
cd ~/opencv
mkdir build
cd build
cmake CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D PYTHON3_LIBRARY=/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/config-3.5m/libpython3.5.dylib \
-D PYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/include/python3.5m/ \
-D PYTHON3_EXECUTABLE=$VIRTUAL_ENV/bin/python \
-D BUILD_opencv_python2=OFF \
-D BUILD_opencv_python3=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D INSTALL_C_EXAMPLES=OFF \
-D BUILD_EXAMPLES=ON .. \
-D FFMPEG_INCLUDE_DIR=/usr/local/Cellar/ffmpeg/3.3.4/include/
-D FFMPEG_LIB_DIR=/usr/local/Cellar/ffmpeg/3.3.4/lib/
-D WITH_FFMPEG=ON
cmake
make -j4I got the
FFMPEG_INCLUDE_DIR
,FFMPEG_LIB_DIR
andWITH_FFMPEG
from this post : http://blog.jiashen.me/2014/12/23/build-opencv-3-on-mac-os-x-with-python-3-and-ffmpeg-support/The full error log :
[ 28%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_qtkit.mm.o
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:317:9: error: use of undeclared identifier
'avcodec_free_frame'; did you mean 'avcodec_get_name'?
avcodec_free_frame(&picture);
^~~~~~~~~~~~~~~~~~
avcodec_get_name
/usr/local/Cellar/ffmpeg/3.3.4/include/libavcodec/avcodec.h:6289:13: note: 'avcodec_get_name' declared here
const char *avcodec_get_name(enum AVCodecID id);
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:317:28: error: cannot initialize a parameter of type
'enum AVCodecID' with an rvalue of type 'AVFrame **'
avcodec_free_frame(&picture);
^~~~~~~~
/usr/local/Cellar/ffmpeg/3.3.4/include/libavcodec/avcodec.h:6289:45: note: passing argument to parameter 'id' here
const char *avcodec_get_name(enum AVCodecID id);
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:632:23: error: use of undeclared identifier
'avcodec_alloc_frame'
picture = avcodec_alloc_frame();
^
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:635:41: error: use of undeclared identifier
'PIX_FMT_BGR24'; did you mean 'AV_PIX_FMT_BGR24'?
avpicture_get_size( PIX_FMT_BGR24,
^~~~~~~~~~~~~
AV_PIX_FMT_BGR24
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:65:5: note: 'AV_PIX_FMT_BGR24' declared here
AV_PIX_FMT_BGR24, ///< packed RGB 8:8:8, 24bpp, BGRBGR...
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:638:29: error: use of undeclared identifier
'PIX_FMT_BGR24'; did you mean 'AV_PIX_FMT_BGR24'?
PIX_FMT_BGR24, enc->width, enc->height );
^~~~~~~~~~~~~
AV_PIX_FMT_BGR24
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:65:5: note: 'AV_PIX_FMT_BGR24' declared here
AV_PIX_FMT_BGR24, ///< packed RGB 8:8:8, 24bpp, BGRBGR...
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:738:67: error: use of undeclared identifier
'PIX_FMT_RGB24'; did you mean 'AV_PIX_FMT_RGB24'?
avpicture_fill((AVPicture*)&rgb_picture, rgb_picture.data[0], PIX_FMT_RGB24,
^~~~~~~~~~~~~
AV_PIX_FMT_RGB24
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:64:5: note: 'AV_PIX_FMT_RGB24' declared here
AV_PIX_FMT_RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB...
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:756:17: error: use of undeclared identifier
'PIX_FMT_BGR24'; did you mean 'AV_PIX_FMT_BGR24'?
PIX_FMT_BGR24,
^~~~~~~~~~~~~
AV_PIX_FMT_BGR24
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:65:5: note: 'AV_PIX_FMT_BGR24' declared here
AV_PIX_FMT_BGR24, ///< packed RGB 8:8:8, 24bpp, BGRBGR...
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1110:15: error: use of undeclared identifier
'avcodec_alloc_frame'
picture = avcodec_alloc_frame();
^
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1113:33: error: unknown type name 'PixelFormat'; did you
mean 'AVPixelFormat'?
size = avpicture_get_size( (PixelFormat) pix_fmt, width, height);
^~~~~~~~~~~
AVPixelFormat
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
enum AVPixelFormat {
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1122:25: error: unknown type name 'PixelFormat'; did you
mean 'AVPixelFormat'?
(PixelFormat) pix_fmt, width, height);
^~~~~~~~~~~
AVPixelFormat
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
enum AVPixelFormat {
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1230:19: error: unknown type name 'PixelFormat'; did you
mean 'AVPixelFormat'?
c->pix_fmt = (PixelFormat) pixel_format;
^~~~~~~~~~~
AVPixelFormat
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
enum AVPixelFormat {
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1405:26: error: use of undeclared identifier
'PIX_FMT_BGR24'; did you mean 'AV_PIX_FMT_BGR24'?
if (input_pix_fmt == PIX_FMT_BGR24) {
^~~~~~~~~~~~~
AV_PIX_FMT_BGR24
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:65:5: note: 'AV_PIX_FMT_BGR24' declared here
AV_PIX_FMT_BGR24, ///< packed RGB 8:8:8, 24bpp, BGRBGR...
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1410:31: error: use of undeclared identifier
'PIX_FMT_GRAY8'; did you mean 'AV_PIX_FMT_GRAY8'?
else if (input_pix_fmt == PIX_FMT_GRAY8) {
^~~~~~~~~~~~~
AV_PIX_FMT_GRAY8
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:70:5: note: 'AV_PIX_FMT_GRAY8' declared here
AV_PIX_FMT_GRAY8, ///< Y , 8bpp
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1423:25: error: unknown type name 'PixelFormat'; did you
mean 'AVPixelFormat'?
(PixelFormat)input_pix_fmt, width, height);
^~~~~~~~~~~
AVPixelFormat
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
enum AVPixelFormat {
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1429:47: error: unknown type name 'PixelFormat'; did you
mean 'AVPixelFormat'?
(PixelFormat)input_pix_fmt,
^~~~~~~~~~~
AVPixelFormat
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
enum AVPixelFormat {
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1447:25: error: unknown type name 'PixelFormat'; did you
mean 'AVPixelFormat'?
(PixelFormat)input_pix_fmt, width, height);
^~~~~~~~~~~
AVPixelFormat
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
enum AVPixelFormat {
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1604:25: error: use of undeclared identifier
'PIX_FMT_BGR24'; did you mean 'AV_PIX_FMT_BGR24'?
input_pix_fmt = PIX_FMT_BGR24;
^~~~~~~~~~~~~
AV_PIX_FMT_BGR24
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:65:5: note: 'AV_PIX_FMT_BGR24' declared here
AV_PIX_FMT_BGR24, ///< packed RGB 8:8:8, 24bpp, BGRBGR...
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1607:25: error: use of undeclared identifier
'PIX_FMT_GRAY8'; did you mean 'AV_PIX_FMT_GRAY8'?
input_pix_fmt = PIX_FMT_GRAY8;
^~~~~~~~~~~~~
AV_PIX_FMT_GRAY8
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:70:5: note: 'AV_PIX_FMT_GRAY8' declared here
AV_PIX_FMT_GRAY8, ///< Y , 8bpp
^
In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1683:25: error: use of undeclared identifier
'PIX_FMT_YUV422P'; did you mean 'AV_PIX_FMT_YUV422P'?
codec_pix_fmt = PIX_FMT_YUV422P;
^~~~~~~~~~~~~~~
AV_PIX_FMT_YUV422P
/usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:66:5: note: 'AV_PIX_FMT_YUV422P' declared here
AV_PIX_FMT_YUV422P, ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/Users/myuser/opencv/modules/videoio/src/cap_qtkit.mm:46:9: fatal error: 'QTKit/QTKit.h' file not found
#import <qtkit></qtkit>QTKit.h>
^
1 error generated.
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_qtkit.mm.o] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make: *** [all] Error 2This question on openCV’s website seems to adress the same issue but there is no solution posted : http://answers.opencv.org/question/90091/error-use-of-undeclared-identifier-avcodec_free_frame-did-you-mean-avcodec_get_name/
-
Evolution #3926 : Remplacement de safehtml par le plug htmlpurifier ou autre
14 janvier 2019, par Guillaume FahrnerSorry je n’avais pas vu ce message :
cedric - a écrit :
Depuis https://core.spip.net/projects/spip/repository/revisions/24131 le plugin HTMLPurifier est fonctionel sans nécessiter de patch dans le core ?
Malheureusement si : il reste une surcharge de la fonction propre() via inc/texte.php. Elle est utilisée pour réaliser la protection HTML via echappe_html() AVANT le 1er filtrage de sécurité via echapper_html_suspect(). Un deuxième est réalisé via echappe_retour_modeles($t, $interdire_script) ou $interdire_script est vrai en espacé privé ou si le mode parano actif et faux sinon. (Je n’ai pas su faire autrement, mais il y a peut être une astuce a trouver.)
Je ne sais pas si tu considères que c’est le core mais une surchage des règles YAML de textwheel est également réalisé afin que l’on envoi bien tout qui doit l’être dans les filtres de sécurité.
Donc non pas de modification du core nécessaire pour que le plugin fonctionne. A voir si ces surcharges mériterais une "intégration directe" future.
on est bon et on peut release tel quel en indiquant que le plugin htmlpurifier est disponible pour tests et se laisser le temps ?
A mon avis oui. Pour rappel : le mode parano est actuellement inutilisable avec l’actuel safehtml(). Du coup ça peut être une approche pour l’intégrer/le tester au fil de l’eau : commencé par les gens qui utilisent le mode parano en leur recommandant chaudement/forcant ce plugin.
Ci dessous la liste des plugins que j’utilise sans problème hors textwheel/todo (cf https://core.spip.net/issues/4254) avec htmlPurifier :
Abonnements 3.3.6 - stable
Agenda 3.26.0 - stable
API de vérification 1.8.1 - stable
API Prix 0.1.16 - dev
Article PDF 1.0.10 - stable
Autorité 0.10.20 - stable
Banque&paiement 3.6.7 - stable
Cache Cool 0.5.4 - stable
Challenge Hacking 1.0.0 - stable
Champs Extras 3.11.7 - stable
Chatbox 1.0.5 - stable
Coloration Code 99 - stable
Commandes 1.15.5 - stable
Compositions 3.7.3 - stable
Crayons 1.26.18 - stable
CTF all the day 1.0.0 - stable
Facteur 3.6.2 - stable
Formulaire de contact avancé 0.16.5 - stable
Frimousses 1.5.1 - stable
GIS 4.44.24 - stable
HTML Purifier 5.0.0.1 - test
iCalendar 0.4.5 - test
Import ics 4.4.3 - stable
Imprimer document 0.2.2 - stable
LangOnet 1.4.6 - stable
MailShot 1.27.3 - stable
MailSubscribers 2.11.3 - stable
Markdown 1.0.2 - test
Messagerie 3.1.8 - test
Mini Calendrier 2.4.1 - stable
Mot de passe dès l’inscription 1.0.19 - stable
Newsletters 1.6.0 - stable
Nombres de visiteurs connectés 0.2.3 - stable
NoSPAM 1.5.18 - stable
Notation 2.4.2 - test
Notifications 3.6.8 - stable
Notifications avancées 0.4.2 - test
Pages 1.3.7 - stable
Pre & Code 99 - test
Saisies pour formulaires 3.11.1 - stable
Social tags 1.1.1 - stable
SPIP Bonux 3.4.6 - stable
Tip A Friend 1.6.9 - stable
Todo 2.2.1 - stable
Traduction entre rubriques 3.1.3 - stable
YAML 1.5.4 - stableJe pense que si on doit intégrer le plugin ça sera sur la version dev 3.3, pas sur la version stable, et ça va demander de prendre le temps de voir toutes les modifs et les impacts éventuels que tu n’aurais pas vu ou auxquelles tu n’aurais pas pensé.
Clairement je pense me faire insulter :-) Je suis prêt ^^ Plus sérieusement il faut absolument tester/restester/reretester. J’ai tenté de faire au mieux mais je ne peux pas revoir tout le code HTML généré par les plugins... Au moindre écart de conformité HTML ca ne passera pas. Le bug https://core.spip.net/issues/4254 en est un bon exemple : avec htmlpurifier l’élément
est supprimé ; avec "safehtml() standard" le code invalide est conservé et c’est le navigateur qui va corriger.
Il faut voir les bons cotés : cela force les bonnes pratiques, met SPIP au plus haut niveau du standard (Drupal fait moins bien), aide a identifier des bugs et ce qui passe dans propre() sera obligatoirement valide. C’est aussi a terme moins de problèmes d’injection XSS a traiter pour la team.
Sur la fonction de survol des logos le sujet reste ouvert ? On est en effet d’accord que cette écriture est obsolète et devrait être revue de toute façon, mais c’est donc un point à traiter dans le core le cas échéant
Euh je comprend pas, faut-il intégrer le patch des puces de statut dans ce plugin ? Je pensais plus coder le truc """proprement""" avec un JS dans le directement dans /prive/. A décolérer complètement à mon sens.
Encore merci pour le temps que tu y passes :)