Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (100)

  • 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

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (11687)

  • how i can save overlay text box with a video in gallery by using ffmpeg ?

    10 septembre 2024, par Umair Manzoor

    final escapedOverlayText = overlayText.replaceAll(''', '\'') ;
final command =
'-i $videoPath -vf "drawtext=text='$escapedOverlayText':x=10:y=10:fontsize=24:fontcolor=white" -c:a copy $outputPath' ;

    


      print('Executing command: $command');

  final session = await FFmpegKit.execute(command);
  final returnCode = await session.getReturnCode();
  print('here is errror Return code: $returnCode');


    


    that those section of code where this ffmpeg returns the following error
I/flutter ( 6329) : here is errror Return code : 1
I/flutter ( 6329) : FFmpeg failed with return code : 1

    


    i am trying to save the video with overlay text data in the gallery.

    


  • python cv2 video playing quality

    10 août 2017, par TheRutubeify

    Why it is so big difference in quality between MPC-CH Windows Media Player and cv2 cv2.VideoCapture(’*.mp4’) when playing the same file ! Codec H. 264 E

    How I can improve quality with cv2 ?

    Here is the screenshot Left(cv2) Rigth(MPC-CH) :
    Left cv2, Right MPC-CH Windows Media Player

    cv2.namedWindow("Final", 0)
    cv2.resizeWindow("Final", 300, 200)
    cap = cv2.VideoCapture('1.mp4')
    while(cap.isOpened()):
       qwe, frame = cap.read()
       cv2.waitKey(30)
       gray = cv2.cvtColor(frame, cv2.COLOR_BGR2BGRA) #COLOR_RGB2RGBA
       cv2.imshow('Final',gray)

    Any suggestions ?

  • FFmpegFrameGrabber and FFmpegFrameRecorder Audio Issue

    20 août 2015, par Sheheryar Chagani

    I am compress an existing camera recorded video using FFmpegframerecorder and ffmpegFrameGrabber.

    The issue is that its audio is not occurring after compression.

    Please note that I am using googlecode.javacv along with javacpp and armeabi in lib folder.

    Below is the code which I have used.

    public void compressVideo(String filePath)

       FrameGrabber grabber = new FFmpegFrameGrabber(filePath);
       grabber.start();
       fileoutput = filePath.replace("trimmed", "compressed");
       // recorder.setAudioCodec(grabber.get);
       FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(fileoutput, 480,
               480, grabber.getAudioChannels());
       recorder.setFrameRate(grabber.getFrameRate());
       recorder.setSampleRate(grabber.getSampleRate());
       recorder.setSampleFormat(grabber.getSampleFormat());
       recorder.setFormat(grabber.getFormat());
       // recorder.setPixelFormat(grabber.getPixelFormat());

       recorder.start();
       Frame frame;
       int count = 0;
       while ((frame = grabber.grabFrame()) != null) {
           if (frame.image != null) {
               publishProgress(count);
               count++;
               IplImage rotateImage = rotate(frame.image, 90);
               IplImage cropImage = resizeImage(rotateImage, 480, 480, true);
               frame.image = cropImage;
               recorder.record(frame);
               if (rotateImage != null)
                   opencv_core.cvReleaseImage(rotateImage);
               if (cropImage != null)
                   opencv_core.cvReleaseImage(cropImage);
           } else {
               recorder.record(frame);
           }

       }
       recorder.stop();
       grabber.stop();
       recorder.release();
       grabber.release();
    }

    IplImage resizeImage(IplImage origImg, int newWidth, int newHeight,
           boolean keepAspectRatio) {

       IplImage outImg;
       int origWidth = 0;
       int origHeight = 0;
       if (origImg != null) {
           origWidth = origImg.width();
           origHeight = origImg.height();
       }
       if (newWidth <= 0 || newHeight <= 0 || origImg == null
               || origWidth <= 0 || origHeight <= 0) {
           // cerr << "ERROR: Bad desired image size of " << newWidth
           // << "x" << newHeight << " in resizeImage().\n";
           return null;
       }

       if (keepAspectRatio) {
           // Resize the image without changing its aspect ratio,
           // by cropping off the edges and enlarging the middle section.
           CvRect r;
           // input aspect ratio
           float origAspect = (origWidth / (float) origHeight);
           // output aspect ratio
           float newAspect = (newWidth / (float) newHeight);
           // crop width to be origHeight * newAspect
           if (origAspect > newAspect) {
               int tw = (origHeight * newWidth) / newHeight;
               // System.out.println((origWidth - tw) / 2+" "+)
               r = opencv_core.cvRect((origWidth - tw) / 2, 0, tw, origHeight);
           } else { // crop height to be origWidth / newAspect
               int th = (origWidth * newHeight) / newWidth;
               r = opencv_core.cvRect(0, (origHeight - th) / 2, origWidth, th);
           }
           IplImage croppedImg = cropImage(origImg, r);

           // Call this function again, with the new aspect ratio image.
           // Will do a scaled image resize with the correct aspect ratio.
           outImg = resizeImage(croppedImg, newWidth, newHeight, false);
           opencv_core.cvReleaseImage(croppedImg);

       } else {

           // Scale the image to the new dimensions,
           // even if the aspect ratio will be changed.
           outImg = opencv_core.cvCreateImage(
                   opencv_core.cvSize(newWidth, newHeight), origImg.depth(),
                   origImg.nChannels());
           if (newWidth > origImg.width() && newHeight > origImg.height()) {
               // Make the image larger
               opencv_core.cvResetImageROI((IplImage) origImg);
               // CV_INTER_LINEAR: good at enlarging.
               // CV_INTER_CUBIC: good at enlarging.
               cvResize(origImg, outImg, CV_INTER_LINEAR);
           } else {
               // Make the image smaller
               opencv_core.cvResetImageROI((IplImage) origImg);
               // CV_INTER_AREA: good at shrinking (decimation) only.
               cvResize(origImg, outImg, CV_INTER_AREA);
           }

       }
       return outImg;
    }

    // Returns a new image that is a cropped version (rectangular cut-out)
    // of the original image.
    IplImage cropImage(IplImage img, CvRect region) {
       IplImage imageCropped;
       opencv_core.CvSize size = new CvSize();

       if (img.width() <= 0 || img.height() <= 0 || region.width() <= 0
               || region.height() <= 0) {
           // cerr << "ERROR in cropImage(): invalid dimensions." << endl;
           return null;
       }

       if (img.depth() != opencv_core.IPL_DEPTH_8U) {
           // cerr << "ERROR in cropImage(): image depth is not 8." << endl;
           return null;
       }

       // Set the desired region of interest.
       opencv_core.cvSetImageROI((IplImage) img, region);
       // Copy region of interest into a new iplImage and return it.
       size.width(region.width());
       size.height(region.height());
       imageCropped = opencv_core.cvCreateImage(size,
               opencv_core.IPL_DEPTH_8U, img.nChannels());
       opencv_core.cvCopy(img, imageCropped); // Copy just the region.

       return imageCropped;
    }

    public IplImage rotate(IplImage image, double angle) {
       IplImage copy = opencv_core.cvCloneImage(image);

       IplImage rotatedImage = opencv_core.cvCreateImage(
               opencv_core.cvGetSize(copy), copy.depth(), copy.nChannels());
       CvMat mapMatrix = opencv_core.cvCreateMat(2, 3, opencv_core.CV_32FC1);

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

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

       // Rotate the Image
       opencv_imgproc.cvWarpAffine(copy, rotatedImage, mapMatrix,
               opencv_imgproc.CV_INTER_CUBIC
                       + opencv_imgproc.CV_WARP_FILL_OUTLIERS,
               opencv_core.cvScalarAll(170));
       opencv_core.cvReleaseImage(copy);
       opencv_core.cvReleaseMat(mapMatrix);
       return rotatedImage;
    }

    I am rotating the video frame and then resizing the frame image.

    The code was working fine 3 days ago but not suddenly it started messing up.