Recherche avancée

Médias (1)

Mot : - Tags -/stallman

Autres articles (94)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (5306)

  • Extracting Y only (of YUV420p) frame from an MP4 file using fmpeg ?

    7 janvier 2020, par Anidh Singh

    My main objective is to extract the I’th, I+1’th (next), I-1’th (previous) frames in the form of Y only (of YUV 420) from an mp4 video. The procedure which I am using right now is

    1. I extracted the list of all the I frames from a video using the command - ffprobe "input.mp4" -show_frames | grep  'pict_type=I' -A 1 > frame_info.txt

    2. Next, I used a python script to parse through this txt file to find the numbers of all of the I frames and then extracting all of the frames using the command - ffmpeg -i input.mp4 -vf select='eq(n\,{1}),setpts=N/25/TB,extractplanes=y' -vsync 0 -pix_fmt gray {1}.yuv This is happening via a subprocess call from python.

    3. This is working fine for small resolution videos like 240p or 480p but as soon as I move to 1080p videos the time to extract even a single frame increases exponentially. As the ffmpeg seeks to that frame number to extract it and it has to decode the mp4 file till that point.

    I have a lot of 1080p files and I was looking to decrease the time. The solution which I was thinking was to extract all of the Y frames (of YUV 420) from mp4 and then selecting only I frames as I’ve got the list of all of the I frames from step 1.. The command I am using for this is - ffmpeg -y -i input.mp4 -vf "fps=59.94" -pix_fmt gray file_name.yuv

    • The problem with the above code is that it continuously appends the to yuv file only but I want an individual y file for one frame of the mp4 video.

    • My restriction is to use FFmpeg only as FFmpeg’s Y value is matching with what I want.

    TL:DR - I want to extract the Y part only (of YUV 420p) from an mp4 video. The y frames are the I’th and I-1th and I+1th frames.

    Thanks for helping out.

  • Recording RTSP steam with Python

    6 mai 2022, par ロジャー

    Currently I am using MediaPipe with Python to monitor RTSP steam from my camera, working as a security camera. Whenever the MediaPipe holistic model detects humans, the script writes the frame to a file.

    


    i.e.

    


    # cv2.VideoCapture(RTSP)
# read frame
# while mediapipe detect
#   cv2.VideoWriter write frame
# store file


    


    Recently I want to add audio recording support. I have done some research that it is not possible to record audio with OpenCV. It has to be done with FFMPEG or PyAudio.

    


    I am facing these difficulities.

    


      

    1. When a person walk through in front of the camera, it takes maybe less than 2 seconds. For the RTSP stream being read by OpenCV, human is detected with MediaPipe, and start FFMPEG for recording, that human should have walked far far away already. So FFMPEG method seems not working for me.

      


    2. 


    3. For PyAudio method I am currently studying, I need to create 2 threads establishing individual RTSP connections. One thread is for video to be read by OpenCV and MediaPipe. The other thread is for audio to be recorded when the OpenCV thread notice human is detected. I have tried using several devices to read the RTSP streams. The devices are showing timestamps (watermark on the video) with several seconds in difference. So I doubt if I can get video from OpenCV and audio from PyAudio in sync when merging them into one single video.

      


    4. 


    


    Is there any suggestion how to solve this problem ?

    


    Thanks.

    


  • Imagemagick & Pillow generate malformed GIF frames

    1er juin 2016, par RiTu

    I need to extract the middle frame of a gif animation.

    Imagemagick :

    convert C:\temp\orig.gif -coalesce C:\temp\frame.jpg

    generates the frames properly :

    enter image description here

    However when I extract a single frame :

    convert C:\temp\orig.gif[4] -coalesce C:\temp\frame.jpg

    then the frame is malformed, as if the -coalesce option was ignored :

    enter image description here

    Extraction of individual frames with Pillow and ffmpeg also results in malformed frames, tested on a couple of gifs.

    Download gif : https://i.imgur.com/Aus8JpT.gif

    I need to be able to extract middle frames of every gif version in either PIL, Imagemagick of ffmpeg (ideally PIL).