
Recherche avancée
Autres articles (57)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
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 (7465)
-
Anomalie #4799 (Fermé) : Validité du RSS
7 juillet 2021, par b bC’est intégré, je ferme car amha le point sur les multiples enclosures est négligeable, cf :
According to the RSS Advisory Board’s Best Practices Profile, support for the enclosure element in RSS software varies significantly because of disagreement over whether the specification permits more than one enclosure per item. Although the author intended to permit no more than one enclosure in each item, this limit is not explicit in the specification.
For best support in the widest number of aggregators, an item should not contain more than one enclosure.
Meanwhile, be aware that multiple-enclosure support varies widely from tool tool to tool, and therefore should be avoided if at all possible. -
AWS EC2 and OpenCV with UDP consumer
22 juillet 2021, par NoobZikI have two EC2


- 

- A That grabs the video feed from Amazon Kinesis Video to send it into via UDP to B
- B the consumer which it will grab the UDP feed from the A






While debugging my opencv not grabbing the UDP feed, I suspect something is wrong with ffpmeg, so I am going to make sure that ffplay can read packets sent from A.


Now when I try to read udp packets with
ffplay {adress-ip-with-port}
I have the following error :

Could not initialize SDL - No available video device
(Did you set the DISPLAY variable?)



How do I fix this one since there is no display on EC2.


Also if it can help, this is my code for the consumer part


Create your views here.
from django.http import HttpResponse
from django.template import loader
from django.shortcuts import render
# from .models import Vehicule
import cv2
import threading
from django.views.decorators import gzip
from django.http import StreamingHttpResponse


@gzip.gzip_page
def webcam(request):
 try:
 cam = VideoCamera()
 return StreamingHttpResponse(gen(cam), content_type="multipart/x-mixed-replace;boundary=frame")
 except:
 pass
 return render(request, 'vebcam.html')

#capture video
class VideoCamera(object):
 def __init__(self):
 self.video = cv2.VideoCapture('udp://172.31.57.243:55055', cv2.CAP_FFMPEG)
 (self.grabbed, self.frame) = self.video.read()
 threading.Thread(target=self.update, args=()).start()

 def __del__(self):
 self.video.release()

 def get_frame(self):
 image = self.frame
 _, jpeg = cv2.imencode('.jpg', image)
 return jpeg.tobytes()

 def update(self):
 while True:
 (self.grabbed, self.frame) = self.video.read()

def gen(camera):
 while True:
 frame = camera.get_frame()
 yield (b'--frame\r\n'b'Content-Type: image/jpeg\r\n\r\n' + frame + b'\r\n\r\n')



It runs fine on local but not on EC2


This is the log that led me to check ffplay


Traceback (most recent call last):
 File "/usr/lib/python3.8/wsgiref/handlers.py", line 138, in run
 self.finish_response()
 File "/usr/lib/python3.8/wsgiref/handlers.py", line 183, in finish_response
 for data in self.result:
 File "/home/ubuntu/.local/lib/python3.8/site-packages/django/utils/text.py", line 304, in compress_sequence
 for item in sequence:
 File "/home/ubuntu/site/mysite/mysite/views.py", line 42, in gen
 frame = camera.get_frame()
 File "/home/ubuntu/site/mysite/mysite/views.py", line 33, in get_frame
 _, jpeg = cv2.imencode('.jpg', image)
cv2.error: OpenCV(4.5.3) /tmp/pip-req-build-xw6jtoah/opencv/modules/imgcodecs/src/loadsave.cpp:978: error: (-215:Assertion failed) !image.empty() in function 'imencode'



-
FFMPEG seems to not be reading files from .txt file [closed]
15 août 2021, par user3266908I have the following command


ffmpeg -f concat -safe 0 -i C:\location1\location2\01\video.txt -f concat -safe 0 -i C:\lcation2\location2\01\image.txt -filter_complex_script C:\location1\location2\01\script.txt C:\PollyBot\audio\morning.mp4



the video.txt , image.txt and the script.txt reads as follow. Side note the script.txt file applies a filter.


video.txt
file 'c:\videos\video.mp4'


images.txt
file 'c:\images\image01.png'
file 'c:\images\image02.png'

script
[0:V]scale=1080:-1,pad=0:1920:0:(oh-ih)/2[vid];
[vid][1:0]overlay=enable='between(t,10,15)'[i1];
[i1][1:1]overlay=enable='between(t,20,35)'



What happens is that the scale of the video is scaled but streams for the images only every displays 1 images and never returns a stream for the second image. I have tried different versions of ffmpeg, removing the overlay and just forcibly calling the second stream with out it being listed but nothing works. I also noticed that this issue is present in the other .txt files as well. It seems like ffmpeg only reads the first item in the .txt file and ignores everything else. this issue is repeatable in the other files as well. Just one video, the first is seen. I'm new to FFMPEG so any pointers is welcome. Keep in mind that I'm doing this all from the windows machine and if I run the command with just one image/overlay files it runs with out issue.




To me it looks that something is wrong with my .txt file and that it is unable to read anything past the first line since if I'm just overlaying one item it works just fine.