Recherche avancée

Médias (91)

Sur d’autres sites (224)

  • OpenIMAJ not able to access video file

    20 septembre 2014, par Sudh

    I am using OpenIMAJ to draw facial keypoints on a video but it is stuck at the first step itself.
    Here is the code I am trying to run: :

    Video<mbfimage> video;
       video = new XuggleVideo("file://E:/AV/out2.flv");//XuggleVideo("file:"+fileName);
       VideoDisplay<mbfimage> display = VideoDisplay.createVideoDisplay(video);
       display.addVideoListener(
                new VideoDisplayListener<mbfimage>() {
                       public void beforeUpdate( MBFImage frame ) {

                           FaceDetector fd = new HaarCascadeDetector(40);
                           List<detectedface> faces = fd.detectFaces( Transforms.calculateIntensity(frame));

                           for( DetectedFace face : faces ) {
                               frame.drawShape(face.getBounds(), RGBColour.RED);
                           }
                       }

                       public void afterUpdate( VideoDisplay<mbfimage> display ) {
                       }
         });
    </mbfimage></detectedface></mbfimage></mbfimage></mbfimage>

    When I run this It prints

    file :///E :/AV/out2.flv URL file :///E :/AV/out2.flv could not be opened
    by ffmpeg. Trying to open a stream to the URL instead. 11:14:12.505
    [Finalizer] DEBUG com.xuggle.xuggler - Closing dangling Container
    (../../../../../../../csrc/com/xuggle/xuggler/Container.cpp:146)

    on the screen and then just dies out. result is same if I use video = new XuggleVideo(new File("E :/AV/out2.flv")) ;

    Also if I keep file in the project and then do video = new XuggleVideo(new File("out2.flv")) ; I get same result.

    I am able to access the file if I put the link in the browser. What is going wrong ?

    Update : I get just this

    out2.flv 12:03:06.485 [Finalizer] DEBUG com.xuggle.xuggler - Closing
    dangling Container
    (../../../../../../../csrc/com/xuggle/xuggler/Container.cpp:146)

    If I use video = new XuggleVideo("out2.flv");

  • Invalid NAL unit size in m3u8 stream through OpenCV

    3 mai 2021, par ClownLegs

    streaming a ".m3u8" feed from a Raspberry Pi zero W that points to 10 sequenced ".m4s" video files.&#xA;when feeding this into the below cv2 library it throws the error codes shown at the bottom of this post.&#xA;these errors seem to be in sync with the output video hanging/stuttering.

    &#xA;


    &#xA;

    Code :

    &#xA;

    import cv2&#xA;import sys&#xA;import random&#xA;&#xA;faceCascade = [cv2.CascadeClassifier(x) for x in sys.argv[1:]]&#xA;&#xA;video_capture = cv2.VideoCapture(&#x27;http://*IP*:8080/camera/livestream.m3u8&#x27;)&#xA;colors = [(random.randint(0,255), random.randint(0,255), random.randint(0,255)) for i in faceCascade]&#xA;&#xA;while True:&#xA;    # Capture frame-by-frame&#xA;    ret, frame = video_capture.read()&#xA;&#xA;    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)&#xA;&#xA;&#xA;    faces = [list(face)&#x2B;[i] for i,faces in enumerate(faceCascade) for face in faces.detectMultiScale(&#xA;        gray,&#xA;        scaleFactor=1.1,&#xA;        minNeighbors=5,&#xA;        minSize=(30, 30),&#xA;        flags=cv2.CASCADE_SCALE_IMAGE&#xA;    )]&#xA;&#xA;    # Draw a rectangle around the faces&#xA;    for (x, y, w, h, i) in faces:&#xA;        cv2.rectangle(frame, (x, y), (x&#x2B;w, y&#x2B;h), colors[i], 2)&#xA;&#xA;    # Display the resulting frame&#xA;    cv2.imshow(&#x27;Video&#x27;, frame)&#xA;&#xA;    if cv2.waitKey(1) &amp; 0xFF == ord(&#x27;q&#x27;):&#xA;        break&#xA;&#xA;# When everything is done, release the capture&#xA;video_capture.release()&#xA;cv2.destroyAllWindows()&#xA;

    &#xA;


    &#xA;

    Errors :

    &#xA;

    [h264 @ 00000189507870c0] Invalid NAL unit size (2103052861 > 20986).&#xA;[h264 @ 00000189507870c0] Error splitting the input into NAL units.&#xA;

    &#xA;


    &#xA;

    Is there a way of resolving these errors with the stream ?

    &#xA;

  • nomenclature #2549 (Nouveau) : Renommer sommaire.html de façon plus explicite

    27 février 2012, par tetue -

    Qui débute en SPIP est dérouté par le nom du squelette de page d’accueil. Certains bloquent carrément face au fichier sommaire.html : « mais non, c’est pas un sommaire que je veux faire, mais la page d’accueil du site. C’est où, dans quel fichier ? » Pour eux, sommaire.html est plutôt un « plan du (...)