
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (86)
-
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 (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (5848)
-
Python : What's the fastest way to load a video file into memory ?
8 juillet 2017, par michaelhFirst some background
I am trying to write my own set of tools for video analysis, mainly for detecting render errors like flashing frames and possibly some other stuff in the future.
The (obvious) goal is to write a script, that is faster and more accurate than me watching the file in real time.
Using OpenCV, I have something that looks like this :
import cv2
vid = cv2.VideoCapture("Video/OpenCV_Testfile.mov", cv2.CAP_FFMPEG)
width = 1024
height = 576
length = vid.get(cv2.CAP_PROP_FRAME_COUNT)
for f in range(length):
blue_values = []
vid.set(cv2.CAP_PROP_POS_FRAMES, f)
is_read, frame = vid.read()
if is_read:
for row in range(height):
for col in range(width):
blue_values.append(frame[row][col][0])
print(blue_values)
vid.release()This just prints out a list of all blue values of every frame.
Just for simplicity (My actual script compares a few values across each frame and only saves the frame number when all are equal)
Although this works, it is not a very fast operation. (Nested loops, but most important, the
read()
method has to be called for every frame, which is rather slow.
I tried to use multiprocessing but basically ended up having the same crashes as described here :how to get frames from video in parallel using cv2 & multiprocessing in python
I have a 20s long 1024x576@25fps Testfile which performs as follows :
- mov, ProRes : 15s
- mp4, h.264 : 30s (too slow)
My machine is capable of playing back h.264 in 1920x1080@50fps with mplayer (which uses ffmpeg to decode). So, I should be able to get more out of this. Which leads me to
my Question
How can I decode a video and simply dump all pixel values into a list for further (possibly multithreaded) operations ? Speed is really all that matters. Note : I’m not fixated on OpenCV. Whatever works best.
Thanks !
-
lavf/qtpalette : Ignore greyscale bit in certain cases
2 janvier 2016, par Mats Petersonlavf/qtpalette : Ignore greyscale bit in certain cases
The QuickTime File Format Specification states the following :
"Depth : A 16-bit integer that indicates the pixel depth of the
compressed image. Values of 1, 2, 4, 8 ,16, 24, and 32 indicate the
depth of color images. The value 32 should be used only if the image
contains an alpha channel. Values of 34, 36, and 40 indicate 2-, 4-, and
8-bit grayscale, respectively, for grayscale images."There is no mention of value 33, i.e. 1-bit video (0x01) with the
greyscale bit (0x20) set. I therefore suggest that we ignore the
greyscale bit when processing 1-bit video. Another reason to do this is
that the first 1-bit sample file below will be displayed properly with
blue colors in QuickTime in Windows or Mac *in spite of* the greyscale
bit being set.Also, QuickTime in Windows or Mac ignores the greyscale bit if the
video sample description contains a palette, regardless of bit depth.
This is undocumented behaviour, but I think we should do the same, and
it seems pretty logical after all, since one wouldn’t really bother
putting a customized palette into a grayscale file anyway. See the
second 8-bit sample file below, which has the greyscale bit set, and
which contains a palette in the video sample description. In Windows or
Mac, it will be displayed with the palette in the sample description, in
spite of the greyscale bit being set.Sample file 1 (1-bit QuickTime Animation) :
https://drive.google.com/open?id=0B3_pEBoLs0faTThSek1EeXQ0ZHM
Earth Spin 1-bit qtrle orig.movSample file 2 (8-bit QuickTime Animation) :
https://drive.google.com/open?id=0B3_pEBoLs0fad2s0V1YzUWo5aDA
quiz-palette+gs.movSigned-off-by : Michael Niedermayer <michael@niedermayer.cc>
-
FFMPEG installation & configuration with xampp on fedora
10 octobre 2013, par UMII have running Fedora 8, where I have installed XAMPP-Linux. First I installed latest version with Xampp-Linux-1.8.3 including PHP 5.5 from "http://www.apachefriends.org/en/xampp-linux.html".
After setting up everything, tried to install "FFMPEG" from "http://www.nixgurus.com/fedora/installing-ffmpeg-using-yum-on-centos-redhat-fedora/". This is the only guide which gets completed with successful installation and configuration, otherwise all other tried tutorials got leave me middle of nowhere.
Note : While installing FFMPEG following above provided URL, "phpize" did not work to me so I had to install php-devel by running "yum install php-devel" command. I always got different "Zend Module" and "Zend Extension API" versions.
When I installed ffmpeg and put extension in "php.ini" with correct path, it never appeared in phpinfo().
Then after searching, I got a hint that installed "FFMPEG" will not be compatible to the installed PHP version. So I removed complete pack of XAMMP-LINUX and installed old one with Xampp-Linux-1.8.2 including PHP 5.4. But it result were same.
Then, I decided to use more older version and it was Xampp-Linux-1.8.1 including PHP 5.4. Now currently I have this version but having version results are totally changed that after installation of FFMPEG when I put ffmpeg.so with its correct path in PHP.INI (definitely restart the server on every change) server behaves strange way that PHP files get downloaded by browsers and when I comment same line and restart web server everything works well.
Just to let you know that, even I have given path "extension=/usr/lib/php/modules/ffmpeg.so" which did not work and even moved files to default extension path "/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525" as well but in vain.
Looking forward to your help please.