Recherche avancée

Médias (1)

Mot : - Tags -/ogg

Autres articles (54)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (6329)

  • OpenCV (3.3.0) returns fail on VideoCapture with Video but works with Webcam [OS X]

    1er novembre 2017, par njoye

    Thanks for reading already, I’ve been trying to get this to work for a day and I didn’t get closer to the solution.

    I’m trying to get this object tracker to work. When I use a video from my webcam (with : python object-tracker-single.py -d 0, everything works as expected.

    But as soon as I’m trying to use a video file (i’ve tried different formats : .mp4, .mkv & .avi. I also tried to use the file given in the repository, that didn’t work as well. To see if there is a File not found-Error, I passed an invalid path to the function and an error got printed, that has not been printed when I used the other videos. So the file(s) i’m using is(/are) valid and not corrupted.

    I installed dlib through homebrew following this article and compiled OpenCV from the official source. This is the CMakeCache.txt that CMake spit out. After the first time I compiled it, I added opencv_contrib to the mix, thinking that it could help (I also think that I actually needed it), but that didn’t fix the problem.

    This is the code I’m having problems with :

    # Create the VideoCapture object
    cam = cv2.VideoCapture(source)

    # If Camera Device is not opened, exit the program
    if not cam.isOpened():
       print "Video device or file couldn't be opened"
       exit()

    print "Press key `p` to pause the video to start tracking"
    while True:
       # Retrieve an image and Display it.
       retval, img = cam.read() #<-- this returns false when trying to read a video
       if not retval:
           print "Cannot capture frame device"
           exit()

    At the marked line, retval equals False and image equals None.
    It would already help me if I could somehow debug this behavior, but I didn’t find any way of doing so.

    I found that many Windows Users had problems with missing ffmpeg support, but that is not the case for me, since I used ffmpeg in previous (not OpenCV-related) projects and CMakeCache.txt reports that ffmpeg has been found and the compilation succeeded.

    I also tried using a fully qualified file-name for the video file, which either resulted in Video device or file couldn't be opened or the given problem.

    If you have any idea how this problem can be completely resolved, have an Idea on how to solve it or can provide me with a way of properly debugging this behavior, I’d be super glad to here it !

    Thanks already !

    -

    System : MacBook Pro (macOS Sierra 10.12.6)

    OpenCV Version : 3.3.0

    Dlib Version (not necessary imo, but hey) : 19.4.0

    Edit 2
    Output of cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-master/modules ../ >> result.txt : pastebin

  • ffmpeg avcodec_open2 returns -22 if I change my speaker configuration

    5 octobre 2014, par pacificator

    I keep having a strange issue lately.
    Depending on how I set up my audio configuration in windows ( stereo/quad/5.1 ), a ffmpeg call to avcodec_open2() fails with error -22 or just works.
    Not being able to find much about that error, I thought I should ask about it here.
    The main flow goes like this :

    c = st->codec;
    avformat_alloc_output_context2(&oc, NULL, NULL, "video.mpeg");
    oc->fmt->audio_codec = AV_CODEC_ID_MP2;
    AVDictionary* dict = NULL;
    ret = av_dict_set(&dict, "ac", "2", 0);
    c->request_channels = 2;

    ret = avcodec_open2(c, codec, &dict); //HERE IT FAILS WITH -22 if speaker configuration  is not stereo

    The codec context ’c’ is set up like this in a stream :

    st = avformat_new_stream(oc, *codec);
    c = st->codec;
    c->channels     = 2;
    c->channel_layout = AV_CH_LAYOUT_STEREO;
    c->sample_fmt   = AV_SAMPLE_FMT_S16;
    c->codec_id     = codec_id;

    Most of it is copied from their one of the muxing examples found in the documentation.
    Everything works as expected if in windows I have set the output to stereo.

    If I set my speaker configuration to 5.1 ( 6 channels ), avcodec_open2 fails with error -22.

    So I have a hard time understanding what am I doing wrong. Normally it should not be any relationship between my speaker configuration and the result of avcodec_open2.

    Are there some other parameters that I need to set ?

  • FFmpeg returns empty byte when retrieving frames with python

    13 août 2020, par Ronald Saunfe

    I am trying to retrieve frames from a video frame by frame using ffmpeg which i downloaded here but i get an empty response as byte :
i need someone to outline what my problem is.I got the solution from a blog here
Here is my source code :

    


    import subprocess as sp

command=['bin\\ffmpeg.exe',
'-i','%s'%self.source,
'-f','image2pipe',
'-pix_fmt','rgb24',
'-vcodex','rawvideo','-']

self.pipe = sp.Popen(command, stdout = sp.PIPE, bufsize = 10**8)
Raw_image = self.pipe.stdout.read(420*360*3)