Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (39)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

Sur d’autres sites (4316)

  • Error while saving RTSP to .mp4 from a Hikvision using cvlc, openRTSP or ffmpeg

    4 octobre 2020, par Rui Martins

    I'm trying to save an RTSP streaming from a hikvion camera to a .mp4 file in a USB pen drive in a raspberry pi 3.

    


    I'm using raspbian, I read a lot from the internet, and I'm using different programs to try to save the video.

    


    I used cvlc, openRTSP and ffmpeg, and all of them have errors...

    


    Some commands that I used :

    


    openRTSP -D 1 -c -B 10000000 -b 10000000 -4 -Q -F video_openRTSP_ -P 1200 -w 1920 -h 1080 -f 25 -t -u admin xxxxx rtsp://admin:xxxxx@192.168.1.64:554/h264/ch1/main/av_stream


    


    ffmpeg -i rtsp://admin:xxxxx@192.168.1.64:554/h264/ch1/main/av_stream -acodec copy -vcodec copy ffmpeg.mp4


    


    cvlc --rtsp-tcp rtsp://admin:xxxxx@192.168.1.64:554/h264/ch1/main/av_stream --sout=file/mp4:cvlc.mp4 --stop-time=900 vlc://quit


    


    I tried a lot of different parameters for each one of these 3 programs... The final result never was good. I guess the Hikvision firmware is not implementing well the RTSP protocol...

    


    Exists some alternative firmware for Hikvision cameras ? As we have openWRT and ddWRT for routers ?

    


    Someone had the same problem as me ?

    


    (I want to store at least 15 minutes, even when the .mp4 file is saved, sometimes only save few seconds of videos, and sometimes I can't reproduce the video)

    


    Pictures of the errors :

    


    openRTSP :

    


    enter image description here

    


    enter image description here

    


    ffmpeg :

    


    enter image description here

    


    enter image description here

    


  • How to pipe live video frames from ffmpeg to PIL ?

    30 janvier 2017, par Ryan Martin

    I need to use ffmpeg/avconv to pipe jpg frames to a python PIL (Pillow) Image object, using gst as an intermediary*. I’ve been searching everywhere for this answer without much luck. I think I’m close - but I’m stuck. Using Python 2.7

    My ideal pipeline, launched from python, looks like this :

    1. ffmpeg/avconv (as h264 video)
    2. Piped ->
    3. gst-streamer (frames split into jpg)
    4. Piped ->
    5. Pil Image Object

    I have the first few steps under control as a single command that writes .jpgs to disk as furiously fast as the hardware will allow.

    That command looks something like this :

    command = [
           "ffmpeg",
           "-f video4linux2",
           "-r 30",
           "-video_size 1280x720",
           "-pixel_format 'uyvy422'",
           "-i /dev/video0",
           "-vf fps=30",
           "-f H264",
           "-vcodec libx264",
           "-preset ultrafast",
           "pipe:1 -",
           "|", # Pipe to GST
           "gst-launch-1.0 fdsrc !",
           "video/x-h264,framerate=30/1,stream-format=byte-stream !",
           "decodebin ! videorate ! video/x-raw,framerate=30/1 !",
           "videoconvert !",
           "jpegenc quality=55 !",
           "multifilesink location=" + Utils.live_sync_path + "live_%04d.jpg"
         ]

    This will successfully write frames to disk if ran with popen or os.system.

    But instead of writing frames to disk, I want to capture the output in my subprocess pipe and read the frames, as they are written, in a file-like buffer that can then be read by PIL.

    Something like this :

       import subprocess as sp
       import shlex
       import StringIO

       clean_cmd = shlex.split(" ".join(command))
       pipe = sp.Popen(clean_cmd, stdout = sp.PIPE, bufsize=10**8)

       while pipe:

           raw = pipe.stdout.read()
           buff = StringIO.StringIO()
           buff.write(raw)
           buff.seek(0)

           # Open or do something clever...
           im = Image.open(buff)
           im.show()

           pipe.flush()

    This code doesn’t work - I’m not even sure I can use "while pipe" in this way. I’m fairly new to using buffers and piping in this way.

    I’m not sure how I would know that an image has been written to the pipe or when to read the ’next’ image.

    Any help would be greatly appreciated in understanding how to read the images from a pipe rather than to disk.

    • This is ultimately a Raspberry Pi 3 pipeline and in order to increase my frame rates I can’t (A) read/write to/from disk or (B) use a frame by frame capture method - as opposed to running H246 video directly from the camera chip.
  • Assembling frames into a video in Node.js using fluent-ffmpeg [closed]

    14 novembre 2024, par Andrei

    I have the original video and it's modified frames in a folder. Now I want to assemble the modified frames into a new video. I also want to take the audio from the original video and add it to the new video.

    


    My latest code is this using fluent-ffmpeg. But it's not working.

    


    await new Promise((resolve, reject) => {
  ffmpeg(path.join(processedFramesDir, "frame-%d.png"))
    .inputOptions(["-framerate 30", "-start_number 1"])
    .input(videoPath)
    .outputOptions([
      "-c:v",
      "libx264",
      "-c:a",
      "copy",
      "-shortest",
      "-r",
      "30",
      "-pix_fmt",
      "yuv420p",
    ])
    .outputOptions(["-map 0:v:0", "-map 1:a:0"])
    .save(outputVideoPath)
    .on("start", (commandLine) => {
      console.log("FFmpeg command: " + commandLine);
    })
    .on("stderr", (stderrLine) => {
      console.log("FFmpeg stderr: " + stderrLine);
    })
    .on("end", resolve)
    .on("error", (err, stdout, stderr) => {
      console.error("Error assembling video:", err);
      console.error("FFmpeg stderr:", stderr);
      reject(err);
    });
});


    


    I get this error even though the frames exist and they are valid pngs :&#xA;FFmpeg command: ffmpeg -framerate 30 -start_number 1 -i /tmp/video-processing-CyULOE/processedFrames/frame-%05d.png -i /tmp/video-processing-CyULOE/input.mp4 -y -c:v libx264 -c:a copy -shortest -r 30 -pix_fmt yuv420p -map 0:v:0 -map 1:a:0 /tmp/video-processing-CyULOE/output.mp4 2024-11-13 23:40:27 FFmpeg stderr: ffmpeg version 4.1.11-0&#x2B;deb10u1 Copyright (c) 2000-2023 the FFmpeg developers 2024-11-13 23:40:27 FFmpeg stderr:   built with gcc 8 (Debian 8.3.0-6) 2024-11-13 23:40:27 FFmpeg stderr:   configuration: --prefix=/usr --extra-version=0&#x2B;deb10u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared 2024-11-13 23:40:27 FFmpeg stderr:   libavutil      56. 22.100 / 56. 22.100 2024-11-13 23:40:27 FFmpeg stderr:   libavcodec     58. 35.100 / 58. 35.100 2024-11-13 23:40:27 FFmpeg stderr:   libavformat    58. 20.100 / 58. 20.100 2024-11-13 23:40:27 FFmpeg stderr:   libavdevice    58.  5.100 / 58.  5.100 2024-11-13 23:40:27 FFmpeg stderr:   libavfilter     7. 40.101 /  7. 40.101 2024-11-13 23:40:27 FFmpeg stderr:   libavresample   4.  0.  0 /  4.  0.  0 2024-11-13 23:40:27 FFmpeg stderr:   libswscale      5.  3.100 /  5.  3.100 2024-11-13 23:40:27 FFmpeg stderr:   libswresample   3.  3.100 /  3.  3.100 2024-11-13 23:40:27 FFmpeg stderr:   libpostproc    55.  3.100 / 55.  3.100 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x52494646F8A20000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x52494646C89F0000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x524946464EA10000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x5249464628A40000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x52494646AAA30000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x524946467CA10000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x52494646AAA30000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x52494646BAA10000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x52494646ACA30000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x5249464670A80000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x52494646E8A60000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x524946469AA60000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x5249464672A90000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x52494646B8A50000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x52494646AAA80000. 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x52494646A0A70000. 2024-11-13 23:40:27 FFmpeg stderr:     Last message repeated 1 times 2024-11-13 23:40:27 FFmpeg stderr: [png @ 0x5630fb89a880] Invalid PNG signature 0x5249464646A80000. 2024-11-13 23:40:27 FFmpeg stderr: [image2 @ 0x5630fb898a40] decoding for stream 0 failed 2024-11-13 23:40:27 FFmpeg stderr: [image2 @ 0x5630fb898a40] Could not find codec parameters for stream 0 (Video: png, none(pc)): unspecified size 2024-11-13 23:40:27 FFmpeg stderr: Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options 2024-11-13 23:40:27 FFmpeg stderr: Input #0, image2, from &#x27;/tmp/video-processing-CyULOE/processedFrames/frame-%05d.png&#x27;: 2024-11-13 23:40:27 FFmpeg stderr:   Duration: 00:00:00.60, start: 0.000000, bitrate: N/A 2024-11-13 23:40:27 FFmpeg stderr:     Stream #0:0: Video: png, none(pc), 30 fps, 30 tbr, 30 tbn, 30 tbc 2024-11-13 23:40:28 FFmpeg stderr: Input #1, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/tmp/video-processing-CyULOE/input.mp4&#x27;: 2024-11-13 23:40:28 FFmpeg stderr:   Metadata: 2024-11-13 23:40:28 FFmpeg stderr:     major_brand     : isom 2024-11-13 23:40:28 FFmpeg stderr:     minor_version   : 512 2024-11-13 23:40:28 FFmpeg stderr:     compatible_brands: isomiso2avc1mp41 2024-11-13 23:40:28 FFmpeg stderr:     encoder         : Lavf60.16.100 2024-11-13 23:40:28 FFmpeg stderr:   Duration: 00:00:00.62, start: 0.000000, bitrate: 4289 kb/s 2024-11-13 23:40:28 FFmpeg stderr:     Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 4395 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default) 2024-11-13 23:40:28 FFmpeg stderr:     Metadata: 2024-11-13 23:40:28 FFmpeg stderr:       handler_name    : VideoHandler 2024-11-13 23:40:28 FFmpeg stderr:     Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s (default) 2024-11-13 23:40:28 FFmpeg stderr:     Metadata: 2024-11-13 23:40:28 FFmpeg stderr:       handler_name    : SoundHandler 2024-11-13 23:40:28 FFmpeg stderr: Stream mapping: 2024-11-13 23:40:28 FFmpeg stderr:   Stream #0:0 -> #0:0 (png (native) -> h264 (libx264)) 2024-11-13 23:40:28 FFmpeg stderr:   Stream #1:1 -> #0:1 (copy) 2024-11-13 23:40:28 FFmpeg stderr: Press [q] to stop, [?] for help 2024-11-13 23:40:28 FFmpeg stderr: [image2 @ 0x5630fb898a40] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fb9b7700] Invalid PNG signature 0x52494646F8A20000. 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fb988dc0] Invalid PNG signature 0x52494646C89F0000. 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fba3edc0] Invalid PNG signature 0x524946464EA10000. 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fba40600] Invalid PNG signature 0x5249464628A40000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fb8c7900] Invalid PNG signature 0x52494646AAA30000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fb9b7700] Invalid PNG signature 0x524946467CA10000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fb988dc0] Invalid PNG signature 0x52494646AAA30000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fba3edc0] Invalid PNG signature 0x52494646BAA10000. 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fba40600] Invalid PNG signature 0x52494646ACA30000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr:     Last message repeated 1 times 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fb8c7900] Invalid PNG signature 0x5249464670A80000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fb9b7700] Invalid PNG signature 0x52494646E8A60000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fb988dc0] Invalid PNG signature 0x524946469AA60000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fba3edc0] Invalid PNG signature 0x5249464672A90000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fba40600] Invalid PNG signature 0x52494646B8A50000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fb8c7900] Invalid PNG signature 0x52494646AAA80000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fb9b7700] Invalid PNG signature 0x52494646A0A70000. 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fb988dc0] Invalid PNG signature 0x52494646A0A70000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr: [png @ 0x5630fba3edc0] Invalid PNG signature 0x5249464646A80000. 2024-11-13 23:40:28 FFmpeg stderr: Error while decoding stream #0:0: Invalid data found when processing input 2024-11-13 23:40:28 FFmpeg stderr:     Last message repeated 4 times 2024-11-13 23:40:28 FFmpeg stderr: Cannot determine format of input stream 0:0 after EOF 2024-11-13 23:40:28 FFmpeg stderr: Error marking filters as finished 2024-11-13 23:40:28 FFmpeg stderr: Conversion failed! 2024-11-13 23:40:28 FFmpeg stderr:  2024-11-13 23:40:28 Error assembling video: Error: ffmpeg exited with code 1: Cannot determine format of input stream 0:0 after EOF 2024-11-13 23:40:28 Error marking filters as finished 2024-11-13 23:40:28 Conversion failed! 2024-11-13 23:40:28  2024-11-13 23:40:28     at ChildProcess.<anonymous> (/usr/src/app/node_modules/fluent-ffmpeg/lib/processor.js:180:22) 2024-11-13 23:40:28     at ChildProcess.emit (node:events:519:28) 2024-11-13 23:40:28     at ChildProcess._handle.onexit (node:internal/child_process:294:12)</anonymous>

    &#xA;

    The code used to

    &#xA;

    ffmpeg(videoPath) .screenshots({ folder: framesDir, filename: "frame-%i.png", size: "?x1080", count: 10, }) .on("end", resolve) .on("error", reject);&#xA;

    &#xA;

    The pngs are valid and displaying in windows photos viewer enter image description here

    &#xA;