Recherche avancée

Médias (91)

Autres articles (77)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

Sur d’autres sites (5405)

  • The Mystery of the No such file or directory exception

    22 avril 2022, par JohnWick

    No idea what's going on here. Set a breakpoint after the for of loop in the following function. temp/concat.txt exists but the following exception is thrown :

    


    


    Uncaught Error Error : ffmpeg exited with code 1 : temp/concat.txt : No
such file or directory

    


    


    Outputting stderr gives a bit more info :

    


    


    [concat @ 000001e2e30124c0] Impossible to open
'temp/concat.txt#voiceover #funny #fall #lol.mp4' index.js:19
temp/concat.txt : No such file or directory

    


    


    And here is the contents of concat.txt, standard ffmpeg concat demuxer format :

    


    file '#voiceover #funny #fall #lol.mp4'
file 'part 2 repost 🙄 #fyp #funny @jordond262 @princemoonjq add my snap heroicdw333.mp4'
file 'This is my hair wet wet WOAHHH #GrowUpWithMe #fyp #foryoupage #love #funny #puppy #goldenretriever #cute #dog #wetwet.mp4'
file 'POV calling your friends when your 90#FootlongShuffle #GhostMode #funny #grandma  #fyp #halloween #collegegotmelike #tiktok #foryoupage.mp4'
file 'Sam Ki Singing Kaisi Lgi 😂😜 insta-samayranarula #foryou #trending #lockdown #queen_samayra #tiktokindia #funny #gharbaithoindia 🏠 #comedyindia.mp4'
file 'Reply to @juswa646  #fyp#funny #relatable.mp4'
file 'RaNdOm ViDeOs! #fy #fypシ #viral #meme #funny #xyzbca #funnyvideos #randomvideo.mp4'
file 'Reply to @bratzdoll.maya what should I do next 🙄 #fyp #foryoupage #leethe4th #memes #tall #funny #lol.mp4'
file 'Part 2 #fyp #foryou #viral #foryoupageofficiall #funny #trending.mp4'
file 'Lmfao 😂 (via @danibreezy01) #lmao #lmfao #funny #cousins #family #fyp #foryou #foryoupage.mp4'
file 'When you are a clumsy kitty #trend #joke #Khaleesi #funny #kittensoftiktok #foryou #fyp #foryoupage #cute #catsoftiktok.mp4'
file 'Tag That Friend That Always Be Falling Asleep 😂 #foryou #funny #fail #nap #sleep #pennsylvania #SHEINcares #viral #trending #meme #memes #foryoupage.mp4'
file '#funny #funnyvideos #girlfriend #crzy #Birdshit.mp4'
file 'He forgot he was a dog.                #dog #fyp #talkingdog #cute #pet #funny.mp4'
file 'Bad Day #part1 #badday #falling #funny #memes #viral #jokes #comedy #trending #fyp #foryou #share #likes #us #uk #xyzbca  #epic #pourtoi #fail #wee.mp4'
file 'I think he got offended ( #catsoftiktok #fyp #funny #catlover #MyJob #yellow #foryoupage.mp4'
file 'They took OFF today 🐶🤠🐶 #joshbutlertv #roxyandremi #funny #comedy #dogs #viral #memes.mp4'
file 'Had to make sure momma was there #funny #fyp #raccoons #love #bff #foryoupage #ThisorThatSBLV.mp4'
file 'That\'s not how you get out... #mysterymakers #escaperoom #foryou #fyp #crazystory #friends #funny #crazy #teammate.mp4'


    


    The function throwing the exception.

    


    async function makeCompilation(paths, outPath) {
  for (const filePath of paths) {
    await fs.appendFile(
      "temp/concat.txt",
      `file '${path.basename(filePath).replace("'", "\\'")}'${os.EOL}`
    );
  }
  return new Promise((resolve, reject) => {
    ffmpeg("temp/concat.txt")
      .inputOptions(["-f concat", "-safe 0"])
      .outputOption("-c copy")
      .on("stderr", (line) => console.log(line))
      .on("end", async () => {
        await fs.rm("temp/concat.txt");
        resolve();
      })
      .save(outPath);
  });
}


    


  • Rotation on Video frame image makes video quality low and becomes green ffmpeg opencv

    21 novembre 2013, par bindal

    I am working on one application in which i have to record video on touch which includes pause recording so , i am using FFmpegFrameRecorder for that

    But when i am recording video with rear camera then in onpreviewframe
    i am getting yuvIplImage in portrait mode that is correct but when i
    am recording with front camera in portrait mode then in onPreviewframe
    i am getting image upside down , so my half, so from that result my
    half video is showing in correct portrait mode and remaining half
    video id showing upside down, so i am applying rotation on yuvIplImage
    when recording from front camera

    Here is my onPreviewFrame Method

    @Override
               public void onPreviewFrame(byte[] data, Camera camera) {

                   long frameTimeStamp = 0L;
                   if (mAudioTimestamp == 0L && firstTime > 0L)
                       frameTimeStamp = 1000L * (System.currentTimeMillis() - firstTime);
                   else if (mLastAudioTimestamp == mAudioTimestamp)
                       frameTimeStamp = mAudioTimestamp + frameTime;
                   else {
                       long l2 = (System.nanoTime() - mAudioTimeRecorded) / 1000L;
                       frameTimeStamp = l2 + mAudioTimestamp;
                       mLastAudioTimestamp = mAudioTimestamp;
                   }
                   synchronized (mVideoRecordLock) {
                       if (recording && rec && lastSavedframe != null
                               && lastSavedframe.getFrameBytesData() != null
                               && yuvIplImage != null) {
                           mVideoTimestamp += frameTime;
                           if (lastSavedframe.getTimeStamp() > mVideoTimestamp)
                               mVideoTimestamp = lastSavedframe.getTimeStamp();
                           try {
                               yuvIplImage.getByteBuffer().put(
                                       lastSavedframe.getFrameBytesData());
                               videoRecorder.setTimestamp(lastSavedframe
                                       .getTimeStamp());

                               // if (defaultCameraId == 1) {
                               // CvSize size = new CvSize(yuvIplImage.height(),
                               // yuvIplImage.width());
                               // IplImage yuvIplImage2 = opencv_core.cvCreateImage(
                               // size, yuvIplImage.depth(),
                               // yuvIplImage.nChannels());
                               //
                               // videoRecorder.record(yuvIplImage2);
                               // } else {

                               // }



                               if (defaultCameraId == 1) {
                                   yuvIplImage = rotate(yuvIplImage, 270);

                                   videoRecorder.record(yuvIplImage);
                               }else
                               {
                                   videoRecorder.record(yuvIplImage);
                               }
                               // else

                               // opencv_core.cvTranspose(yuvIplImage, yuvIplImage);
                           } catch (com.googlecode.javacv.FrameRecorder.Exception e) {
                               e.printStackTrace();
                           }
                       }
                       lastSavedframe = new SavedFrames(data, frameTimeStamp);
                   }
               }
           }

    Here is rotation function

    public static 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);
       // opencv_core.cvReleaseImage(copy);

       // 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;
    }

    But Final output of video makes half of the video green

    Thanks in advance

  • Why the audio of my mp4 file is going out of async

    16 juillet 2018, par Dop

    I am having a problem converting a wmv file to mp4. I am using x264.exe this command to get the video stream

    x264 --output temporal.264 --fps 25 --preset slow --bitrate 2048 --vbv-maxrate 2048 --vbv-bufsize 9600 --min-keyint 48 --keyint 48 --scenecut 0 --no-scenecut --pass 1 --video-filter "resize:width=640,height=480" Original.wmv

    Then I use ffmpeg.exe to extract the audio stream with this line :

    ffmpeg -i .wmv -acodec libfdk_aac -b:a 32000 temporal.aac

    finally I use MP4Box to merges each stream with this line :

    MP4Box -add temporal.264 Final.mp4
    MP4Box -add temporal.aac Final.mp4

    The problem is that the final.mp4 audio is out of sync. It starts good but with time it goes out of sync with time.

    I run this command :

    MP4Box -info 010004470063PE-10022017083824-2_MultiMedia--1.mp4

    and I discover that the estimated time of both streams are different :

    output of command

    * Movie Info *
           Timescale 600 - 2 tracks
           Computed Duration 01:00:03.643 - Indicated Duration 01:00:03.643
           Fragmented File: no
           File suitable for progressive download (moov before mdat)
           File Brand isom - version 1
                   Compatible brands: isom avc1
           Created: GMT Wed Jun 27 16:31:44 2018
           Modified: GMT Wed Jun 27 16:31:44 2018
    File has root IOD (9 bytes)
    Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
    Visual PL: AVC/H264 Profile (0x7f)
    Audio PL: AAC Profile @ Level 2 (0x29)
    No streams included in root OD
    Track # 1 Info - TrackID 1 - TimeScale 25000
    Media Duration 00:59:57.520 - Indicated Duration 00:59:57.520
    Track has 1 edit lists: track duration is 00:59:57.320
    Media Info: Language "Undetermined (und)" - Type "vide:avc1" - 89938 samples
    Visual Track layout: x=0 y=0 width=640 height=480
    MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
    AVC/H264 Video - Visual Size 640 x 480
           AVC Info: 1 SPS - 1 PPS - Profile Main @ Level 3
           NAL Unit length bits: 32
           Chroma format YUV 4:2:0 - Luma bit depth 8 - chroma bit depth 8
           SPS#1 hash: 41EE779BEF2AA71A7131EAFD3C77C7E3BC95FD8E
           PPS#1 hash: 086E1D72A40A0E8CF35D102F34A9DF6CD44D6CEF
    Self-synchronized
           RFC6381 Codec Parameters: avc1.4D401E
           Average GOP length: 250 samples
    Track # 2 Info - TrackID 2 - TimeScale 44100
    Media Duration 01:00:03.644 - Indicated Duration 01:00:03.644
    Media Info: Language "Undetermined (und)" - Type "soun:mp4a" - 155196 samples
    MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
    MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 44100
    Synchronized on stream 1
           RFC6381 Codec Parameters: mp4a.40.2
           All samples are sync

    I am not shore why this is happening, becar the original wmv is perfectly synchronize. Any help ?