Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (30)

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

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • MediaSPIP : Modification des droits de création d’objets et de publication définitive

    11 novembre 2010, par

    Par défaut, MediaSPIP permet de créer 5 types d’objets.
    Toujours par défaut les droits de création et de publication définitive de ces objets sont réservés aux administrateurs, mais ils sont bien entendu configurables par les webmestres.
    Ces droits sont ainsi bloqués pour plusieurs raisons : parce que le fait d’autoriser à publier doit être la volonté du webmestre pas de l’ensemble de la plateforme et donc ne pas être un choix par défaut ; parce qu’avoir un compte peut servir à autre choses également, (...)

Sur d’autres sites (8870)

  • Issue with image rotation using JavaCV library

    26 février 2015, par intrepidkarthi

    I am writing an Android application which records video for a specified amount of time. Everything works fine if I record using the smartphone’s back camera. The app has a feature to pause/record feature like in Vine app. The issue comes when recording using the device’s front camera. The video surface frame looks fine when storing/playing the video the video is upside down. There is a lot of things discussed about this issue everywhere. But I didn’t find any solution that WORKS.

    Have a look at the code and image mentioned below.

    Here is the original image taken from front camera. I have turned it upside down for a better view.

    enter image description here

    Here is what I actually get after rotation :

    enter image description here

    Method :

        IplImage copy = cvCloneImage(image);
        IplImage rotatedImage = cvCreateImage(cvGetSize(copy), copy.depth(), copy.nChannels());
        //Define Rotational Matrix
        CvMat mapMatrix = cvCreateMat(2, 3, CV_32FC1);

        //Define Mid Point
        CvPoint2D32f centerPoint = new CvPoint2D32f();
        centerPoint.x(copy.width() / 2);
        centerPoint.y(copy.height() / 2);

        //Get Rotational Matrix
        cv2DRotationMatrix(centerPoint, angle, 1.0, mapMatrix);

        //Rotate the Image
        cvWarpAffine(copy, rotatedImage, mapMatrix, CV_INTER_CUBIC + CV_WARP_FILL_OUTLIERS, cvScalarAll(170));
        cvReleaseImage(copy);
        cvReleaseMat(mapMatrix);

    I have tried doing

        double angleTemp = angle;

        angleTemp= ((angleTemp / 90)%4)*90;      
        final int number = (int) Math.abs(angleTemp/90);

        for(int i = 0; i != number; ++i){            
            cvTranspose(rotatedImage, rotatedImage);
            cvFlip(rotatedImage, rotatedImage, 0);          
        }

    Ends up in throwing exception saying that source and destination doesn’t match with number of columns and rows.

    Update :

    Video is recorded in this way.

    IplImage newImage = null;
    if(cameraSelection == CameraInfo.CAMERA_FACING_FRONT){
       newImage = videoRecorder.rotate(yuvIplImage, 180);
       videoRecorder.record(newImage);
    }
    else
       videoRecorder.record(yuvIplImage);  

    Rotation is done in this way :

       IplImage img = IplImage.create(image.height(), image.width(),
               image.depth(), image.nChannels());

       for (int i = 0; i < 180; i++) {
           cvTranspose(image, img);
           cvFlip(img, img, 0);
       }

    Can anyone point out what is wrong here if you have experienced this before ?

  • How to edit or add video metadata of “rotation” in ts ?

    17 février 2017, par Chienchia Chang

    The source video file is flv format, and I want to remux it to ts format. I want to rotate the ts file by anticlockwise 90 degress, if so, I must decode and recode the file to use avfilter, and the process cost a lot. I want to know whether I can add metadata to the object ts file, and the player can rotate the ts file by the metadata when playing.

  • Difficulty linking filter graph with ffmpeg_next (rust-ffmpeg)

    2 mai 2023, par anvlkv

    I'm using rust ffmpeg_next::filter::Graph to create a concat filter which should accept 3x2 inputs

    


    filter.add(&filter::find("buffersink").unwrap(), "out_v", "").unwrap();
filter.add(&filter::find("abuffersink").unwrap(), "out_a", "").unwrap();
filter.add(&filter::find("buffer").unwrap(), "in_v_0", &args_v0).unwrap();
filter.add(&filter::find("buffer").unwrap(), "in_v_1", &args_v1).unwrap();
filter.add(&filter::find("buffer").unwrap(), "in_v_2", &args_v2).unwrap();
filter.add(&filter::find("abuffer").unwrap(), "in_a_0", &args_a0).unwrap();
filter.add(&filter::find("abuffer").unwrap(), "in_a_1", &args_a1).unwrap();
filter.add(&filter::find("abuffer").unwrap(), "in_a_2", &args_a2).unwrap();
filter.input("out_v", 0).unwrap()
   .input("out_a", 0).unwrap()
   .output("in_v_0", 0).unwrap()
   .output("in_v_1", 0).unwrap()
   .output("in_v_2", 0).unwrap()
   .output("in_a_0", 0).unwrap()
   .output("in_a_1", 0).unwrap()
   .output("in_a_2", 0).unwrap()
   .parse("[in_v_0][in_a_0][in_v_1][in_a_1][in_v_2][in_a_2]concat=n=3:v=1:a=1[out_v][out_a]")
   .unwrap();
filter.validate().expect("invalid filter");


    


    My validate call fails with Output pad "default" with type audio of the filter instance "in_a_0" of abuffer not connected to any destination

    


    It seems it may have to do with ffmpeg_next using avfilter_graph_parse_ptr as this stackoverflow suggests

    


    I've tried using avfilter_graph_parse2 and adding all my sinks and buffers to the spec :

    


    buffer=width=1280:height=720:pix_fmt=yuv420p:time_base=1/15360:sar=1[in_v_0];
abuffer=time_base=1/48000:sample_rate=48000:sample_fmt=fltp:channel_layout=0x3[in_a_0];
buffer=width=1280:height=720:pix_fmt=yuv420p:time_base=1/15360:sar=1[in_v_1];
abuffer=time_base=1/48000:sample_rate=48000:sample_fmt=fltp:channel_layout=0x3[in_a_1];
buffer=width=1280:height=720:pix_fmt=yuv420p:time_base=1/15360:sar=1[in_v_2];
abuffer=time_base=1/48000:sample_rate=48000:sample_fmt=fltp:channel_layout=0x3[in_a_2];
[in_v_0][in_a_0][in_v_1][in_a_1][in_v_2][in_a_2]concat=n=3:v=1:a=1[out_v][out_a];[out_v]buffersink;
[out_a]abuffersink


    


    Which then fails with Input pad "default" with type video of the filter instance "out_v" of buffersink not connected to any source

    


    I hope someone can help me understand...