Recherche avancée

Médias (91)

Autres articles (62)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie 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 (...)

Sur d’autres sites (6311)

  • Fix comment : Enhanced AC-3 in mov is defined in ETSI TS 102 366.

    22 octobre 2011, par Carl Eugen Hoyos

    Fix comment : Enhanced AC-3 in mov is defined in ETSI TS 102 366.

  • OpenCV reading from live camera creates a short video that moves quickly

    17 novembre 2022, par user19019404

    I am reading in a live vide stream from a CCTV camera. The camera is set to 5 fps, another is set to 25fps and another to 30fps. Irrespective of the FPS that the camera is set, I can record 5 minutes but end up with a 30 second recorded clip where everyone is running around the scene.

    


    My code is the 'typical' read in video and write video code that you would find online such as (code below simplified for readability) :

    


    import cv2

video = cv2.VideoCapture(live RTSP address of camera)

if (video.isOpened() == False):
    print("Error reading video file")
else:
    frame_width = video.get(cv2.CAP_PROP_FRAME_WIDTH)
    frame_height = video.get(cv2.CAP_PROP_FRAME_HEIGHT)
    frame_fps = video.get(cv2.CAP_PROP_FPS)
    size = (frame_width, frame_height)
    result = cv2.VideoWriter('filename.avi',cv2.VideoWriter_fourcc(*'MJPG'),frame_fps , size)

    while(True):
        ret, frame = video.read()
        if ret == True:
            result.write(frame)
            cv2.imshow('Frame', frame)
        if cv2.waitKey(1) & 0xFF == ord('s'):
            break
        else:
            break
    video.release()
    result.release()
    cv2.destroyAllWindows()
print("The video was successfully saved with new fps")


    


    I have tried playing with the FPS by reading in the FPS from the live camera and using the same FPS in the video write, but all that results is a video that is a fraction of the real time and with people zooming around the scene. So watching a 5 minute smooth video results in a 20 second recorded video with everyone zooming around.

    


    Is this something that I need to fix in the writing of the video or do I need a second pass with ffmpeg to readjust the video ?

    


    Much appreciated

    


    Update, corrected the code above and :
When printing the frames read and the frame written the numbers are the same, showing that each frame that is read is being written (so I am not losing frames along the way thereby writing half the amount of frames).

    


  • Video moves sideways when captured raw from camera and piped into ffplay

    21 septembre 2018, par peetonn

    I’m trying to capture video from the camera using ffmpeg (macOS 10.12) and pipe it for preview into ffplay using rawvideo and -v copy options :

    ffmpeg -f avfoundation -pixel_format 0rgb -framerate 25 -video_size 1280x720 -i "0" -map 0:v -c copy -f rawvideo - | ffplay -f rawvideo -video_size 1280x720 -pixel_format 0rgb -i -

    Video captures just fine, however, it constantly moves sideways (see screenshot attached). What might the issue here ?

    enter image description here

    UPDATE Full ffmpeg log output :

    $ ffmpeg -f avfoundation -pixel_format 0rgb -framerate 25 -video_size 1280x720 -i "0" -map 0:v -c copy -f rawvideo - | ffplay -f rawvideo -video_size 1280x720 -pixel_format 0rgb -i -
    ffmpeg version 4.0.2ffplay version 4.0.2 Copyright © 2003-2018 the FFmpeg developers Copyright © 2000-2018 the FFmpeg developers

     built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
     built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
     libavutil      56. 14.100 / 56. 14.100
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavcodec     58. 18.100 / 58. 18.100
     libavdevice    58.  3.100 / 58.  3.100
     libavformat    58. 12.100 / 58. 12.100
     libavfilter     7. 16.100 /  7. 16.100
     libavdevice    58.  3.100 / 58.  3.100
     libavresample   4.  0.  0 /  4.  0.  0
     libavfilter     7. 16.100 /  7. 16.100
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libavresample   4.  0.  0 /  4.  0.  0
     libpostproc    55.  1.100 / 55.  1.100
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    2018-09-20 09:33:28.013 ffmpeg[45781:16452887] Error loading /Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn:  dlopen(/Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn, 262): no suitable image found.  Did find:
       /Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn: mach-o, but wrong architecture
       /Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn: mach-o, but wrong architecture
    2018-09-20 09:33:28.013 ffmpeg[45781:16452887] Cannot find function pointer New_SHP_PlugIn for factory 834FC054-C1CC-11D6-BD01-00039315CD46 in CFBundle/CFPlugIn 0x7fe63b506d00 Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin> (bundle, not loaded)
    2018-09-20 09:33:28.069 ffplay[45782:16452888] Error loading /Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn:  dlopen(/Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn, 262): no suitable image found.  Did find:
       /Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn: mach-o, but wrong architecture
       /Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn: mach-o, but wrong architecture
    2018-09-20 09:33:28.069 ffplay[45782:16452888] Cannot find function pointer New_SHP_PlugIn for factory 834FC054-C1CC-11D6-BD01-00039315CD46 in CFBundle/CFPlugIn 0x7f93f3c13020 Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin> (bundle, not loaded)
    [avfoundation @ 0x7fe63c000000] Stream #0: not enough frames to estimate rate; consider increasing probesize
    Input #0, avfoundation, from '0':
     Duration: N/A, start: 1054.178167, bitrate: N/A
       Stream #0:0: Video: rawvideo ([0]RGB / 0x42475200), 0rgb, 1280x720, 1000k tbr, 1000k tbn, 1000k tbc
    Output #0, rawvideo, to 'pipe:':   0KB vq=    0KB sq=    0B f=0/0  
     Metadata:
       encoder         : Lavf58.12.100
       Stream #0:0: Video: rawvideo ([0]RGB / 0x42475200), 0rgb, 1280x720, q=2-31, 1000k tbr, 1000k tbn, 1000k tbc
    Stream mapping:
     Stream #0:0 -> #0:0 ©
    Press [q] to stop, [?] for help
    Input #0, rawvideo, from 'pipe:':
     Duration: N/A, start: 0.000000, bitrate: 737280 kb/s
       Stream #0:0: Video: rawvideo ([0]RGB / 0x42475200), 0rgb, 1280x720, 737280 kb/s, 25 tbr, 25 tbn, 25 tbc
    frame=   16 fps=0.0 q=-1.0 size=   57600kB time=00:00:00.60 bitrate=786437.5kbits/s speed=1.frame=   29 fps= 28 q=-1.0 size=  104401kB time=00:00:01.12 bitrate=763617.4kbits/s speed=1.frame=   42 fps= 27 q=-1.0 size=  151201kB time=00:00:01.64 bitrate=755268.5kbits/s speed=1.frame=   55 fps= 26 q=-1.0 size=  198002kB time=00:00:02.16 bitrate=750939.5kbits/s speed=1.frame=   68 fps= 26 q=-1.0 size=  244802kB time=00:00:02.68 bitrate=748290.4kbits/s speed=1.av_interleaved_write_frame(): Broken pipe=    0KB sq=    0B f=0/0  
    Error writing trailer of pipe:: Broken pipe
    frame=   69 fps= 26 q=-1.0 Lsize=  247650kB time=00:00:02.72 bitrate=745863.6kbits/s speed=1.01x    
    video:248402kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Exiting normally, received signal 2.