Recherche avancée

Médias (0)

Mot : - Tags -/navigation

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

Autres articles (72)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (12038)

  • Can anyone help me with the errors ?

    11 juillet 2017, par joel

    I am a newbie to ffmpeg module. Here is my code to read audio wave files using ffmpeg and pipe.

    import numpy as np
    import subprocess as sp
    import os
    from os.path import join
    from multiprocessing import Pool
    smpler=44100
    files= list()


    for roots, dirs, filek in os.walk("/home/joel/pymusic/mu2"):
       for fi in filek:
         files.append(os.path.join("/home/joel/pymusic/mu2",fi))


    def load(filename,in_typ=np.int16,out_typ=np.float32):
      channels=1
      form={
      np.int16:'s16le'
        }
      f_s= form[in_typ]
      command=[
        'ffmpeg',
        '-i',filename,
        '-f',f_s,
        '-acodec', 'pcm_' + f_s,
        '-ar', str(smpler),
        '-ac',str(channels),'-']
      raw=b' '
      pi=sp.Popen(command, stdout=sp.PIPE, bufsize=4096)
      read_c= smpler*channels*16
      while True:
       data= pi.stdout.read(read_c )
       if data:
           raw += data
       else:
           break
      audio= np.fromstring(raw, dtype=np.int16).astype(np.float32)
      return audio
    def helper(f):
         return(load(f))
    p= Pool()
    array= p.map(helper, files)
    p.close()
    p.join()

    Where files is a list consisting of 20 audio wave files.
    I’m getting the error as :

    >File "prj2.py", line 42, in <module>
    >      array= p.map(helper, files)
    >File "/usr/lib/python2.7/multiprocessing/pool.py", line 251, in map
    >     return self.map_async(func, iterable, chunksize).get()
    >File "/usr/lib/python2.7/multiprocessing/pool.py", line 558, in get
    >     raise self._value
    >ValueError: string size must be a multiple of element size
    </module>

    Can anyone help me out with these errors ?

  • Issue opening video file with OpenCV VideoCapture

    1er mai 2017, par user1938805

    I’ve been reviewing the multitudes of similar questions for this issue, but I’m afraid I just cannot figure out why I cannot open a file in opencv

    I have a file "small.avi", which is a reencoding of "small.mp4" that I got from the internet. I reencoded it with ffmpeg -i small.mp4 small.avi, and I did this because I couldn’t open a mp4 file either and online it recommended trying an avi format first.

    Here is my code (mostly copied from a tutorial, with a few lines to show some relevant info) :

    import cv2
    import os

    for _, __, files in os.walk("."):
       for file in files:
           print file
    print ""

    cap = cv2.VideoCapture("small.mp4")
    print cap.isOpened()
    print cap.open("small.avi")
    i = 0
    while cap.isOpened() and i &lt; 10:
       i += 1
       ret, frame = cap.read()
       print "read a frame"
       gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
       cv2.imshow('frame', gray)
       if cv2.waitKey(1) &amp; 0xFF == ord('q'):
           break
    cap.release()
    cv2.destroyAllWindows()

    This produces the following output :

    "A:\Program Files\AnacondaPY\Anaconda\python.exe" A:/Documents/Final/VideoProcessor.py
    small.avi
    small.mp4
    VideoProcessor.py

    False
    False

    Process finished with exit code 0

    My program does not appear to properly open either file. Following the advice of

    Can not Read or Play a Video in OpenCV+Python using VideoCapture

    and

    Cannot open ".mp4" video files using OpenCV 2.4.3, Python 2.7 in Windows 7 machine,

    I found my cv2 version to be 3.0.0, went to

    A :\Downloads\opencv\build\x86\vc12\bin

    and copied the file opencv_ffmpeg300.dll to

    A :\Program Files\AnacondaPY\Anaconda

    Despite this, the code still does not successfully open the video file. I even tried the x64 versions, and tried naming the file opencv_ffmpeg.dll, opencv_ffmpeg300.dll, and opencv_ffmpeg300_64.dll (for the x64 version). Is there anything else I can try to fix this ?

    Thanks for any help

  • Issue opening video file with OpenCV VideoCapture

    6 décembre 2017, par user1938805

    I’ve been reviewing the multitudes of similar questions for this issue, but I’m afraid I just cannot figure out why I cannot open a file in opencv

    I have a file "small.avi", which is a reencoding of "small.mp4" that I got from the internet. I reencoded it with ffmpeg -i small.mp4 small.avi, and I did this because I couldn’t open a mp4 file either and online it recommended trying an avi format first.

    Here is my code (mostly copied from a tutorial, with a few lines to show some relevant info) :

    import cv2
    import os

    for _, __, files in os.walk("."):
       for file in files:
           print file
    print ""

    cap = cv2.VideoCapture("small.mp4")
    print cap.isOpened()
    print cap.open("small.avi")
    i = 0
    while cap.isOpened() and i &lt; 10:
       i += 1
       ret, frame = cap.read()
       print "read a frame"
       gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
       cv2.imshow('frame', gray)
       if cv2.waitKey(1) &amp; 0xFF == ord('q'):
           break
    cap.release()
    cv2.destroyAllWindows()

    This produces the following output :

    "A:\Program Files\AnacondaPY\Anaconda\python.exe" A:/Documents/Final/VideoProcessor.py
    small.avi
    small.mp4
    VideoProcessor.py

    False
    False

    Process finished with exit code 0

    My program does not appear to properly open either file. Following the advice of

    Can not Read or Play a Video in OpenCV+Python using VideoCapture

    and

    Cannot open ".mp4" video files using OpenCV 2.4.3, Python 2.7 in Windows 7 machine,

    I found my cv2 version to be 3.0.0, went to

    A :\Downloads\opencv\build\x86\vc12\bin

    and copied the file opencv_ffmpeg300.dll to

    A :\Program Files\AnacondaPY\Anaconda

    Despite this, the code still does not successfully open the video file. I even tried the x64 versions, and tried naming the file opencv_ffmpeg.dll, opencv_ffmpeg300.dll, and opencv_ffmpeg300_64.dll (for the x64 version). Is there anything else I can try to fix this ?

    Thanks for any help