Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (50)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

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

Sur d’autres sites (4922)

  • Pipe video frames from ffmpeg to numpy array without loading whole movie into memory

    2 mai 2021, par marcman

    I'm not sure whether what I'm asking is feasible or functional, but I'm experimenting with trying to load frames from a video in an ordered, but "on-demand," fashion.

    


    Basically what I have now is to read the entire uncompressed video into a buffer by piping through stdout, e.g. :

    


    H, W = 1080, 1920 # video dimensions
video = '/path/to/video.mp4' # path to video

# ffmpeg command
command = [ "ffmpeg",
            '-i', video,
            '-pix_fmt', 'rgb24',
            '-f', 'rawvideo',
            'pipe:1' ]

# run ffmpeg and load all frames into numpy array (num_frames, H, W, 3)
pipe = subprocess.run(command, stdout=subprocess.PIPE, bufsize=10**8)
video = np.frombuffer(pipe.stdout, dtype=np.uint8).reshape(-1, H, W, 3)

# or alternatively load individual frames in a loop
nb_img = H*W*3 # H * W * 3 channels * 1-byte/channel
for i in range(0, len(pipe.stdout), nb_img):
    img = np.frombuffer(pipe.stdout, dtype=np.uint8, count=nb_img, offset=i).reshape(H, W, 3)


    


    I'm wondering if it's possible to do this same process, in Python, but without first loading the entire video into memory. In my mind, I'm picturing something like :

    


      

    1. open the a buffer
    2. 


    3. seeking to memory locations on demand
    4. 


    5. loading frames to numpy arrays
    6. 


    


    I know there are other libraries, like OpenCV for example, that enable this same sort of behavior, but I'm wondering :

    


      

    • Is it possible to do this operation efficiently using this sort of ffmpeg-pipe-to-numpy-array operation ?
    • 


    • Does this defeat the speed-up benefit of ffmpeg directly rather than seeking/loading through OpenCV or first extracting frames and then loading individual files ?
    • 


    


  • using file info from txt file to bull trim audio with ffmpeg

    26 juin 2018, par thirtylightbulbs

    I have found how to trim individual audio files with ffmpeg. Is there any way to do it on bulk ? I have thousands of audio files each with different segments that need to be saved separately. The input file, time to start clipping, and duration are all in separate columns, row by row, in a text/excel file.

  • Programmatically sending bytes to ffmpeg via STDIN to create still image file

    8 octobre 2019, par Sam Marrocco

    I am attempting to use vb.net code to send individual pixel information as bytes to ffmpeg with the purpose of saving a still DPX image file. I have already successfully read DPX files and output them via STDOUT into vb.net code.

    There seem to be many examples out there of piping movie files but there are also discrepancies, such as some people using image2pipe and others using rawvideo. I am uncertain when to use one over the other. The various methods I’ve tried result in ffmpeg returned errors such as "Packet too small for DPX header" or "Error while decoding stream #0:0 : Invalid data found when processing input". As I understand it, I am not providing a header, only the raw individual pixel RGBRGBRGB.... values as a byte array.

    The arguments sent to ffmpeg via command line are :

    -f image2pipe -pix_fmt rgb24 -s 16x16 -bits_per_raw_sample 8 -c:v dpx -i - \MyPath\MyFilename.dpx

    My vb.net code is as follows :

    Dim P As New Process
    P.StartInfo.FileName = m_FFMPEGExecutable_PathFile
    P.StartInfo.Arguments = (see above arguments)
    P.StartInfo.UseShellExecute = False
    P.StartInfo.CreateNoWindow = True
    P.StartInfo.RedirectStandardInput = True
    p.Start


    'Test image: A single red, green, blue, black and white pixel followed by all black

    Dim Tiny((16 * 16) - 1) As Byte

    Tiny(0) = 255
    Tiny(1) = 0
    Tiny(2) = 0

    Tiny(3) = 0
    Tiny(4) = 255
    Tiny(5) = 0

    Tiny(6) = 0
    Tiny(7) = 0
    Tiny(8) = 255

    For i As byte = 9 To ((16x16)-1)
      Tiny(i) = 255
    Next

    'Send the rgb byte array to ffmpeg:
    P.StandardInput.BaseStream.Write(Tiny, 0, Tiny.Length)
    P.StandardInput.Flush()
    P.StandardInput.Close()

    I have tried many variations on the above ffmpeg arguments but cannot seem to avoid these errors. Any suggestions would be appreciated, including information on when to use image2pipe vs. rawvideo.