Recherche avancée

Médias (0)

Mot : - Tags -/organisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (39)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

Sur d’autres sites (4351)

  • Fluent-ffmpeg won't create video file sometime it will create ?

    27 mai 2022, par Himanshu Thakur

    anyone know the reason of this problem ? what is the issue ?
in this code, i am trying to convert a blob into video format. but sometime it is working and sometime not. can anyone help me in this ?

    


    

    

    const recordVideo = require('../model/recordVideo_model')
const { join, dirname } = require('path');
const { fileURLToPath } = require('url')
const { mkdir, open, unlink, writeFile } = require('fs/promises');
const {Blob, Buffer} = require('buffer');
const { path } = require('@ffmpeg-installer/ffmpeg');
const ffmpeg = require('fluent-ffmpeg');
ffmpeg.setFfmpegPath(path)
// const __dirname = dirname(fileURLToPath(import.meta.url));
const saveData = async(data, roomid, course_id)=>{
     //console.log(data);
     const videoPath = join(__dirname, '../video');
    //final folder name
    //const dirName = new Date().toLocaleDateString().replace(/\./g, '_');
    const dirName = roomid;
    // console.log(`dirName: ${dirName}`);
    //const dirPath = `${videoPath}/${dirName}`;
     const dirPath = `./public/video/canvideo/${dirName}`;
   
    const fileName= `${Date.now()}-${roomid}.webm`;
    //const fileName= `${roomid}.webm`;
    const tempFilePath = `${dirPath}/temp-${fileName}`;
    const finalFilePath = `${dirPath}/${fileName}`;
    
    let fileHandle;  
    try {
      fileHandle = await open(dirPath);
      console.log(`open the file${fileHandle}`)
    } 
  
    catch {
      await mkdir(dirPath);
      console.log(`making directory${fileHandle}`)
    } 
    
    finally {
  
      if (fileHandle) {
        fileHandle.close();
        console.log(`closing ${fileHandle}`)
      }
  
    }

    try {
        const videoBlob = new Blob(data, {
          type: 'video/webm'
        })
        const videoBuffer = Buffer.from(await videoBlob.arrayBuffer())
        const res = await recordVideo.findOne({roomid:roomid, recordType:'canvas'})
        if(!res){ 
        await writeFile(tempFilePath, videoBuffer)
        
        await ffmpeg(tempFilePath)
          .outputOptions([
            '-c:v libvpx-vp9',
            '-c:a copy',
            '-crf 35',
            '-b:v 0',
            '-vf scale=1280:720','-max_muxing_queue_size 1024'
          ])
          .on('end', async () => {
            await unlink(tempFilePath)
            console.log(`*** File ${fileName} created`)
            //insert database entry (recorded video entry with same details roomid, finename, finalfilepath, created at)  
           await recordVideo.create({roomid:roomid,filename:fileName,filePath:finalFilePath,recordType:'canvas', courseid:course_id});
          
          }).on('error', function(err) {
            console.log('An error occurred: ' + err.message);
          })
          .save(finalFilePath, dirPath);

        }  

      } 
      
      catch (e) {
        console.log('*** Erro in code ', e)
      }

}

module.exports = {saveData,};

    


    


    

if any help me in this. it would be great for me.
in this code, i am trying to convert a blob into video format. but sometime it is working and sometime not. can anyone help me in this ?


  • Convert a native Insta360 video to another format

    5 mai 2021, par Cheloute

    I'd like to figure out how to convert a Insta360 native video (360º) to a specific one (360º).

    


    mediainfo gives these metadata for the original file :

    


    

    General
Complete name                            : VID_20210503_142435_00_003(2).insv
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 329 MiB
Duration                                 : 52 s 319 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 52.7 Mb/s
Writing application                      : Lavf58.13.101
IsTruncated                              : Yes
FileExtension_Invalid                    : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L5.1
Format settings                          : CABAC / 1 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 1 frame
Format settings, GOP                     : M=1, N=32
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 52 s 319 ms
Bit rate mode                            : Variable
Bit rate                                 : 50.0 Mb/s
Width                                    : 3 840 pixels
Height                                   : 1 920 pixels
Display aspect ratio                     : 2.000
Frame rate mode                          : Constant
Frame rate                               : 29.970 (30000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.226
Stream size                              : 312 MiB (95%)
Color range                              : Full
Color primaries                          : BT.601 NTSC
Transfer characteristics                 : BT.601
Matrix coefficients                      : BT.601
Codec configuration box                  : avcC


    


    


    My goal is to convert this video to that specifications :

    


    


    General
Complete name : VID_20210503_142435_00_003(2).mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 83.5 MiB
Duration : 52 s 429 ms
Overall bit rate : 13.4 Mb/s
Writing application : Lavf58.13.101
Comment : 2021-05-03 12:24:35 +0000
Make : Insta360
Model : ONEX.Panorama

    


    Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L5
Format settings                          : CABAC / 1 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 1 frame
Format settings, GOP                     : M=1, N=4
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 52 s 429 ms
Source duration                          : 52 s 429 ms
Bit rate                                 : 13.2 Mb/s
Width                                    : 3 840 pixels
Height                                   : 1 920 pixels
Display aspect ratio                     : 2.000
Frame rate mode                          : Constant
Frame rate                               : 7.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.256
Stream size                              : 82.7 MiB (99%)
Source stream size                       : 82.7 MiB (99%)
Codec configuration box                  : avcC


    


    


    Would it be possible to do this with FFMPEG ? How ?

    


    Thanks

    


  • ffmpeg messing up audio when copying PCM streams

    2 juin 2022, par lioumens

    I'm using ffmpeg to compress videos, but when trying to copy the audio stream from one video file using the same codec and container, the audio is completely corrupted and unusable.

    


    The video I'm trying to compress has stream data :

    


    $ ffprobe -hide_banner -i testing.mov
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testing.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    creation_time   : 2019-04-25T05:37:35.000000Z
    com.apple.quicktime.make: Apple
    com.apple.quicktime.model: MacBookPro15,2
    com.apple.quicktime.software: Mac OS X 10.14.2 (18C54)
    com.apple.quicktime.creationdate: 2019-04-25T00:28:40-0500
  Duration: 00:06:35.75, start: 0.000000, bitrate: 66117 kb/s
  Stream #0:0[0x1](und): Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(tv, smpte170m/bt709/bt709, progressive), 1280x720, 65923 kb/s, 29.01 fps, 29.01 tbr, 30k tbn (default)
    Metadata:
      creation_time   : 2019-04-25T05:37:35.000000Z
      handler_name    : Core Media Video
      vendor_id       : appl
      encoder         : Apple ProRes 422
  Stream #0:1[0x2](und): Audio: pcm_s16be (lpcm / 0x6D63706C), 8000 Hz, 1 channels, s16, 128 kb/s (default)
    Metadata:
      creation_time   : 2019-04-25T05:37:35.000000Z
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]


    


    Just working with the audio, I tried to copy the audio into a separate file with ffmpeg -i testing.mov -vn -channel_layout mono -c:a copy tmp.mov, which results in a video file with stream data :

    


    $ ffprobe -hide_banner -i tmp.mov
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tmp.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf59.16.100
  Duration: 00:06:35.26, start: 0.018000, bitrate: 128 kb/s
  Stream #0:0[0x1]: Audio: pcm_s16be (twos / 0x736F7774), 8000 Hz, mono, s16, 128 kb/s (default)
    Metadata:
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]


    


    It seems the only difference when copying the audio is the original says pcm_s16be (lpcm / 0x6D63706C) while the resulting audio has pcm_s16be (twos / 0x736F7774). My understanding is that twos is Apple Quicktime's FOURCC identifier for signed 16 bit big-endian., which is correct and shouldn't affect the audio.

    


    It seems another forum user had a similar issue, but they were using a hex editor to directly manipulate bits, which I'm not comfortable doing. Is there a fix from within ffmpeg ?

    


    EDIT :
I've uploaded a sample of the clip that has this problem.