Recherche avancée

Médias (91)

Autres articles (58)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (9407)

  • How to deal ffplay being too slow playing iPhone's videos ?

    8 janvier 2020, par Mikhail T.

    Trying to play a 3840x2160 video recorded by an iPhone 7 (@30fps), I get frequent pauses — in the video, music keeps playing.

    



    This happens both in firefox and when ffplay is invoked to play the file directly — from command-line. The CPU is a dual E6700 @3.20GHz — not super fast, but it should be able to play smoothly, shouldn't it ? Video is Intel's "series 4" integrated chipset — again, not a speed-daemon, but it should be adequate... Support for Intel's VA API is included.

    



    I build ffmpeg-4.1 from source using FreeBSD port. As you can see, the port has a maddening amount of options — including several different ones for the 264-codec.

    



    Any suggestions for improving the decoding speed to the point, where it is watchable by a human ? Thank you !

    


  • How to start and stop saving video frames according to a trigger with OpenCV VideoWriter

    11 août 2021, par Jacob nighFor

    I am building an app that records frames from IP camera through RTSP.

    



    My engine is in charge to save a video in mp4 with Opencv VideoWriter working well.
What I am looking for is to create a startRecord and a stopRecord class method that will respectively start and stop recording according to a trigger (it could be an argument that I pass to the thread).
Is anyone know what the best way to do that kind of stuff ?

    



    Here is my class :

    



    from threading import Thread
import cv2
import time
import multiprocessing
import threading
class RTSPVideoWriterObject(object):
    def __init__(self, src=0):
        # Create a VideoCapture object
        self.capture = cv2.VideoCapture(src)

        # Start the thread to read frames from the video stream
        self.thread = Thread(target=self.update, args=())
        self.thread.daemon = True
        self.thread.start()

    def update(self):
        # Read the next frame from the stream in a different thread
        while True:
            if self.capture.isOpened():
                (self.status, self.frame) = self.capture.read()

    def endRecord(self):
        self.capture.release()
        self.output_video.release()
        exit(1)

    def startRecord(self,endRec):

        self.frame_width = int(self.capture.get(3))
        self.frame_height = int(self.capture.get(4))
        self.codec = cv2.VideoWriter_fourcc(*'mp4v')
        self.output_video = cv2.VideoWriter('fileOutput.mp4', self.codec, 30, (self.frame_width, self.frame_height))
        while True:          
            try:
                self.output_video.write(self.frame)
                if endRec:
                    self.endRecord()
            except AttributeError:
                pass




if __name__ == '__main__':

    rtsp_stream_link = 'rtsp://foo:192.5545....'
    video_stream_widget = RTSPVideoWriterObject(rtsp_stream_link)

    stop_threads = False
    t1 = threading.Thread(target = video_stream_widget.startRecord, args =[stop_threads]) 
    t1.start() 
    time.sleep(15)
    stop_threads = True



    



    As you can see in the main I reading frames and store them in a separate thread. Then I am starting to record (record method is with an infinite loop so blocking) and then after 15 sec, I am trying to pass a 'stop_record' argument to stop recording properly.

    



    A part of the code comes from Storing RTSP stream as video file with OpenCV VideoWriter

    



    Is someone have an idea ?
I read a lot that OpenCV can be very tricky for multithreading

    



    N.

    


  • Alfresco fails to create video thumbnail

    17 octobre 2019, par Deckard

    As error log says : Empty input file ... It turned out that the source image for ImageMagick is zero sized. (/data/was/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_source_8718262212685093199.jpg). When I manually replace the source image to normal image and execute the command again, there’s no error.

    command:    /data/was/alfresco/common/bin/convert /data/was/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_source_8718262212685093199.jpg[0] -auto-orient -resize "100x100>" -strip -quiet /data/was/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_target_7652060684136589026.png

    So I think the source image is maybe made by FFMPEG by capturing some frame of the video.
    And the FFMPEG somehow failed to do it. Not sure my guess is right...

    But my FFMPEG works good as ffmpeg -version shows proper version info. And FFMPEG is run by root and the Alfresco daemon instance is run by root. It seems that there’s nothing wrong.

    Please review it. Here’s the whole Alfresco-share log :

    Caused by: org.alfresco.service.cmr.repository.ContentIOException: 09160037 Content conversion failed:
      reader: ContentAccessor[ contentUrl=store:///data/was/alfresco/tomcat/temp/Alfresco/ComplextTransformer_intermediate_mp4_262176879279399174.jpg, mimetype=image/jpeg, size=0, encoding=UTF-8, locale=en_US]
      writer: ContentAccessor[ contentUrl=store:///data/was/alfresco/tomcat/temp/Alfresco/FailoverTransformer_intermediate_ComplexContentTransformer_5223852355212570043.png, mimetype=image/png, size=0, encoding=UTF-8, locale=en_US]
      options: {use=doclib, contentReaderNodeRef=null, contentWriterNodeRef=null, sourceContentProperty=null, imageAutoOrient=true, targetContentProperty=null, commandOptions=, imageResizeOptions=ImageResizeOptions [width=100, height=100, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=false], includeEmbedded=null}
      limits: {timeoutMs=120000, pageLimit=1}
           at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:350)
           at org.alfresco.repo.content.transform.ComplexContentTransformer.transformInternal(ComplexContentTransformer.java:492)
           at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:272)
           ... 32 more
    Caused by: org.alfresco.service.cmr.repository.ContentIOException: 09160036 Failed to perform ImageMagick transformation:
    Execution result:
      os:         Linux
      command:    /data/was/alfresco/common/bin/convert /data/was/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_source_8718262212685093199.jpg[0] -auto-orient -resize "100x100>" -strip -quiet /data/was/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_target_7652060684136589026.png
      succeeded:  false
      exit code:  1
      out:
      err:        .convert.bin: Empty input file `/data/was/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_source_8718262212685093199.jpg' @ error/jpeg.c/JPEGErrorHandler/331.
    .convert.bin: NoImageForProperty "%w" @ warning/property
           at org.alfresco.repo.content.transform.magick.ImageMagickContentTransformerWorker.transformInternal(ImageMagickContentTransformerWorker.java:205)
           at org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker.transform(AbstractImageMagickContentTransformerWorker.java:284)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:79)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
           at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
           at com.sun.proxy.$Proxy28.transform(Unknown Source)
           at org.alfresco.repo.content.transform.ProxyContentTransformer.transformInternal(ProxyContentTransformer.java:107)
           at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:272)
           ... 34 more

    In alfresco-global.properties : ffmpeg.exe=/usr/local/bin/ffmpeg/ffmpeg

    * Update As Robert suggested, TransFormer log level changed to debug.
    But the log is too long to paste here. There’s 30,000 characters limit of body in SO which github doesn’t have.
    So please refer to github issue, I pasted the log there.
    https://github.com/Alfresco/share/issues/127