
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (50)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...)
Sur d’autres sites (5400)
-
Video Conferencing in HTML5 : WebRTC via Socket.io
1er janvier 2014, par silviaSix months ago I experimented with Web sockets for WebRTC and the early implementations of PeerConnection in Chrome. Last week I gave a presentation about WebRTC at Linux.conf.au, so it was time to update that codebase.
I decided to use socket.io for the signalling following the idea of Luc, which made the server code even smaller and reduced it to a mere reflector :
var app = require(’http’).createServer().listen(1337) ; var io = require(’socket.io’).listen(app) ;
io.sockets.on(’connection’, function(socket)
socket.on(’message’, function(message)
socket.broadcast.emit(’message’, message) ;
) ;
) ;Then I turned to the client code. I was surprised to see the massive changes that PeerConnection has gone through. Check out my slide deck to see the different components that are now necessary to create a PeerConnection.
I was particularly surprised to see the SDP object now fully exposed to JavaScript and thus the ability to manipulate it directly rather than through some API. This allows Web developers to manipulate the type of session that they are asking the browsers to set up. I can imaging e.g. if they have support for a video codec in JavaScript that the browser does not provide built-in, they can add that codec to the set of choices to be offered to the peer. While it is flexible, I am concerned if this might create more problems than it solves. I guess we’ll have to wait and see.
I was also surprised by the need to use ICE, even though in my experiment I got away with an empty list of ICE servers – the ICE messages just got exchanged through the socket.io server. I am not sure whether this is a bug, but I was very happy about it because it meant I could run the whole demo on a completely separate network from the Internet.
The most exciting news since my talk is that Mozilla and Google have managed to get a PeerConnection working between Firefox and Chrome – this is the first cross-browser video conference call without a plugin ! The code differences are minor.
Since the specification of the WebRTC API and of the MediaStream API are now official Working Drafts at the W3C, I expect other browsers will follow. I am also looking forward to the possibilities of :
- multi-peer video conferencing like the efforts around webrtc.io,
- the media stream recording API,
- and the peer-to-peer data API.
The best places to learn about the latest possibilities of WebRTC are webrtc.org and the W3C WebRTC WG. code.google.com has open source code that continues to be updated to the latest released and interoperable features in browsers.
The video of my talk is in the process of being published. There is a MP4 version on the Linux Australia mirror server, but I expect it will be published properly soon. I will update the blog post when that happens.
-
How to build list of tasks for asyncio.gather in Python 3.8
22 juillet 2020, par mcgregor94086Below I have attached a test program to demonstrate a problem I am having with asyncio.gather throwing a TypeError.


My objective : To make multiple concurrent asynchronous calls to capture camera images to files from an array of USB cameras attached to my computer. When all cameras have completed their async captures, I want then resume processing.


The async coroutine take_image() shown here makes a system call to the "ffmpeg" application that captures an image from the specified camera to a specified file.


import asyncio
import os
import subprocess
import time

async def take_image(camera_id, camera_name, image_file_path, image_counter):
 image_capture_tic = time.perf_counter()
 try:
 run_cmd = subprocess.run( ["ffmpeg", '-y', '-hide_banner', '-f', 'avfoundation', '-i', camera_id,
 '-frames:v', '1', '-f', 'image2', image_file_path], universal_newlines=True,
 stdout=subprocess.PIPE, stderr=subprocess.PIPE) # Note, ffmpeg writes to stderr, not stdout!
 except Exception as e:
 print("Error: Unable to capture image for", image_file_path)
 return "NO IMAGE!"

 image_capture_toc = time.perf_counter()
 print(f"{image_counter}: Captured {camera_name} image in: {image_capture_toc - image_capture_tic:0.0f} seconds")
 return camera_name



The main() routine shown below takes a list of multiple cameras, and iterating over each camera in the list, main() makes creates an asyncio task for each camera using asyncio.create_task(). Each task is added to a list of tasks.


Once all image capture tasks have been started, I await their completion using await asyncio.gather(tasks).


async def main():
 tic = time.perf_counter()
 camera_list = [('0', 'FHD Camera #1'), ('1', 'FHD Camera #2'), ('2', 'FHD Camera #3'), ]
 image_counter = 1
 tasks = []
 for camera_pair in camera_list:
 camera_id, camera_name = camera_pair
 image_file_name = 'img' + str(image_counter) + "-cam" + str(camera_id) + "-" + camera_name + '.jpg'
 image_file_path = os.path.join("/tmp/test1/img", image_file_name)

 # schedule all image captures calls *concurrently*:
 tasks.append(asyncio.create_task(take_image(camera_id, camera_name, image_file_path, image_counter),
 name=image_file_name))
 image_counter = image_counter + 1

 await asyncio.gather(tasks) # <-- This line throws a TypeError!
 toc = time.perf_counter()
 print(f"Captured list of {image_counter - 1} cameras in: {toc - tic:0.0f} seconds")

asyncio.run(main())



Unfortunately, when I attempt to run this program, I am getting this error :


TypeError : unhashable type : 'list'


and the following Traceback :


Traceback (most recent call last):
 File "scratch_10.py", line 41, in <module>
 asyncio.run(main())
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/runners.py", line 43, in run
 return loop.run_until_complete(main)
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete
 return future.result()
 File "scratch_10.py", line 36, in main
 await asyncio.gather(tasks)
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/tasks.py", line 805, in gather
 if arg not in arg_to_fut:
TypeError: unhashable type: 'list'
</module>


I have been trying to puzzle through the 3.8 documentation on asyncio, but I don't understand what is wrong.


How can I have each take_image request run asynchronously, and then resume processing in my calling routine once each task is complete ?


-
Opencv is working for my project on my laptop but stop working on raspberry pi
10 mars 2021, par Clovis TiwangeGood morning all ! I despair (This is my first post).
I am trying to set up a human detection system using the openvino toolkit. I am using an example project provided by openvino at the following openvino multi target tracking. I first tested them on my computer (ubuntu) and it worked. I have now tried to run the project on raspberry pi but it gets stuck at opencv level. I followed the following tutorial Install openvino on rasbian for setting up openvino.
While debugging, I realized that the problem was with cv2.videocapure (link). Apparently there is a problem with the backend ffmepg but also GStreamer.


I run the following command


python3 multi_camera_multi_target_tracking.py -i http://192.168.137.160:4747/video --m_detector model/intel/person-detection-retail-0013/FP32/person-detection-retail-0013.xml --m_reid model/intel/person-reidentification-retail-0031/FP32/person-reidentification-retail-0031.xml --config config.py -l /opt/intel/openvino/deployment_tools/inference_engine/lib/intel64/libcpu_extension_avx2.so



And i have the following results


INFO: 2021-03-07 21:07:34: Opening file http://192.168.137.160:4747/video
[DEBUG:0] global ../opencv/modules/videoio/src/videoio_registry.cpp (171) VideoBackendRegistry VIDEOIO: Builtin backends(8): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); V4L2(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930)

[DEBUG:0] global ../opencv/modules/videoio/src/videoio_registry.cpp (195) VideoBackendRegistry VIDEOIO: Available backends(8): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); V4L2(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930)

[ INFO:0] global ../opencv/modules/videoio/src/videoio_registry.cpp (197) VideoBackendRegistry VIDEOIO: Enabled backends(8, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); V4L2(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930)

[ WARN:0] global ../opencv/modules/videoio/src/cap.cpp (108) open VIDEOIO(FFMPEG): trying capture filename='http://192.168.137.160:4747/video' ...

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (359) getPluginCandidates VideoIO pluigin (FFMPEG): glob is 'libopencv_videoio_ffmpeg*.so', 1 location(s)

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (366) getPluginCandidates - /opt/intel/openvino/opencv/lib: 1

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (370) getPluginCandidates Found 1 plugin(s) for FFMPEG

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (175) libraryLoad load /opt/intel/openvino/opencv/lib/libopencv_videoio_ffmpeg.so => FAILED

[ WARN:0] global ../opencv/modules/videoio/src/cap.cpp (170) open VIDEOIO(FFMPEG): backend is not available (plugin is missing, or can't be loaded due dependencies or it is not compatible)

[ WARN:0] global ../opencv/modules/videoio/src/cap.cpp (108) open VIDEOIO(GSTREAMER): trying capture filename='http://192.168.137.160:4747/video' ...

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (359) getPluginCandidates VideoIO pluigin (GSTREAMER): glob is 'libopencv_videoio_gstreamer*.so', 1 location(s)

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (366) getPluginCandidates - /opt/intel/openvino/opencv/lib: 1

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (370) getPluginCandidates Found 1 plugin(s) for GSTREAMER

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (175) libraryLoad load /opt/intel/openvino/opencv/lib/libopencv_videoio_gstreamer.so => OK

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (236) PluginBackend Video I/O: loaded plugin 'GStreamer OpenCV Video I/O plugin'

[ INFO:0] global ../opencv/modules/videoio/src/cap_gstreamer.cpp (711) open OpenCV | GStreamer: http://192.168.137.160:4747/video

[ INFO:0] global ../opencv/modules/videoio/src/cap_gstreamer.cpp (744) open OpenCV | GStreamer: mode - URI



The program seems to be stuck there. No exception is thrown.