Recherche avancée

Médias (91)

Autres articles (49)

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

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (9671)

  • cannot open file using avformat_open_input - returns "Cannot open ! Invalid data found when processing input"

    21 juin 2012, par sarsonj

    I am just playing with ffmpeg on iOS 5. I started with something simple, like opening .mov file.

    The code fragment :

    AVFormatContext *pFormatCtx = NULL;
    av_register_all();

    NSString* fileName =  [[NSBundle mainBundle] pathForResource:@"test" ofType:@"mov"];
    NSLog(@"File exists? %i", [[NSFileManager defaultManager] fileExistsAtPath:fileName]);
    NSLog(@"FIle name: %@", fileName);
    char errbuf[256];

    int ret = avformat_open_input(&pFormatCtx, [fileName UTF8String], NULL, NULL);
       if(ret != 0) {
           av_strerror(ret,errbuf,sizeof(errbuf));
           NSLog(@"Cannot open! %s", errbuf);
       } else {
           NSLog(@"Opened!");
       }

    The test.mov exists in my bundle and avformat_open_input is trying to open it - but the avformat_open_input always returns (when decoded error code to string) :

    Invalid data found when processing input.

    (the error code when the file is missing is another text, I tried it).

    I suppose that maybe ffmpg is not compiled with .mov support, but I am not able to open any movie file. I tried to look at ./configure options, but didn't find any hint.

  • 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 ?