Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (39)

  • 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

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (8423)

  • Need to concatenate several MP4 from Garmin dashcam with telemetry

    28 juillet 2021, par Suporte JM

    I have a Garmin 66W dashcam for my work (street mapping surveyor) which produces several 1min. MP4 videos of my journey (60 min. = 60 videos). All these videos have telemetry data on it as metadata (GPS location, speed, etc...).

    


    I want to concatenate every 5 files excluding the audio but preserving the video and the telemetry in the metadata.

    


    What I have tried so far :

    


      

    • Export GPS information as GPX file (result : successful)
    • 


    


    exiftool -p gpx.fmt -ee X:\video_place\videos_1m\GRMN0005.mp4 > GRMN0005.gpx

    


      

    • Merge MP4 videos as a single MP4 video (result : partially successful)
    • 


    


    ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c copy X:\video_place\videos_1m\GRMN0005to0011.mp4

    


    When I use above command on ffmpeg I loose all my telemetry data.

    


    I tried in several different ways for days, searching on several forums, I even tried to export all GPS data from each single 1min. file merge them, and them merge the videos and put the telemetry back.

    


    The ffprobe output of my 1min. video is as following :

    


     Metadata:
    major_brand     : avc1
    minor_version   : 0
    compatible_brands: avc1isom
    creation_time   : 2021-07-26T17:08:23.000000Z
  Duration: 00:01:00.06, start: 0.000000, bitrate: 19553 kb/s
  Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 19182 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
    Metadata:
      creation_time   : 2021-07-26T17:08:23.000000Z
      handler_name    :  Ambarella AVC
      vendor_id       : [0][0][0][0]
      encoder         : Ambarella AVC encoder
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2021-07-26T17:08:23.000000Z
      handler_name    :  Ambarella AAC
      vendor_id       : [0][0][0][0]
  Stream #0:2(eng): Subtitle: mov_text (text / 0x74786574), 0 kb/s (default)
    Metadata:
      creation_time   : 2021-07-26T17:08:23.000000Z
      handler_name    :  Ambarella EXT


    


    When I use the ffmpeg code above to concatenate the videos, I get the following ffprobe without the telemetry :

    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'X:\video_place\videos_1m\GRMN0005to0011.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.4.100
  Duration: 00:07:00.42, start: 0.000000, bitrate: 19313 kb/s
  Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 19178 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
    Metadata:
      handler_name    :  Ambarella AVC
      vendor_id       : [0][0][0][0]
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 127 kb/s (default)
    Metadata:
      handler_name    :  Ambarella AAC
      vendor_id       : [0][0][0][0]


    


    I have tried as well with following code, but none of them seems to work :

    


    ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c copy -scodec copy X:\video_place\videos_1m\GRMN0005to0011_scodec.mp4

    


    ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c:s copy -c:v copy X:\video_place\videos_1m\GRMN0005to0011.mp4

    


    ffmpeg -f concat -safe 0 -i X:\video_place\videos_1m\mylist.txt -c copy -c:s mov_text X:\video_place\videos_1m\GRMN0005to0011.mp4

    


    Can a good soul please guide me on how to perform this ? I thought it was going to be simple...

    


  • Creating video thumbnail with ffmpeg from buffer

    28 juillet 2021, par J. Carpenter

    Attempting to create a child process which spawns ffmpeg command. Should use the buffer from fs.readFile to write to stdin. The -i - flag tells ffmpeg to source input from stdin but nothing is happening when running this code.

    


    If replace -i - with -i test.mp4 this script works perfectly.

    


    What is wrong with the write to stdin which is not allowing code to generate thumbnail ?

    


    (async () => {
    const spawn = require('child_process').spawn;
    const fs = require('fs/promises');
    const buffer = await fs.readFile('test.mp4');
    await new Promise((resolve) => {
        console.log('Spawning process');
        const process = spawn('ffmpeg',
            [
                '-ss', '00:00:01',
                '-i', '-',
                '-s', '256x256',
                '-vframes', '1',
                '-f', 'image2',
                'output.png'
            ]);
        process.stdin.write(buffer);
        process.stdin.end();
        process.on('close', (done) => {
            console.log("Process closed: ", done);
            resolve();
        });
    });
})();


    


    Edit :

    


    Also tried this :

    


    const ffmpeg = require('fluent-ffmpeg');
module.exports =
    async (stream) => {
        ffmpeg(stream)
        .addOption('-f','rawvideo')
        .inputFormat('mov')
        .toFormat('mp4')
        .thumbnail({
            count:1,
            size:'256x256',
            filename:'test.png',
            timemarks:["00:00:03"]
        })
        .on('stdout',(stdout)=>{
            console.log(stdout);
        })
        .on('stderr',(err)=>{
            console.log(err);
        });
    }


    


    With this error output :

    


    ffmpeg version N-102781-g05f9b3a0a5 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10-win32 (GCC) 20210408
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp
  libavutil      57.  0.100 / 57.  0.100
  libavcodec     59.  1.102 / 59.  1.102
  libavformat    59.  3.101 / 59.  3.101
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  0.102 /  8.  0.102
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000025220812340] stream 0, offset 0x24: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000025220812340] Could not find codec parameters for stream 1 (Video: h264 (avc1 / 0x31637661), none(bt709), 640x360, 2630 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:0':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    creation_time   : 2021-07-25T11:06:03.000000Z
  Duration: 00:00:17.38, start: 0.000000, bitrate: N/A
  Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      creation_time   : 2021-07-25T11:06:03.000000Z
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]
  Stream #0:1(und): Video: h264 (avc1 / 0x31637661), none(bt709), 640x360, 2630 kb/s, 29.98 fps, 29.97 tbr, 600 tbn (default)     
    Metadata:
      creation_time   : 2021-07-25T11:06:03.000000Z
      handler_name    : Core Media Video
      vendor_id       : [0][0][0][0]
      encoder         : H.264
  Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
    Metadata:
      creation_time   : 2021-07-25T11:06:03.000000Z
      handler_name    : Core Media Metadata
  Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
    Metadata:
      creation_time   : 2021-07-25T11:06:03.000000Z
      handler_name    : Core Media Metadata
Stream mapping:
  Stream #0:1 (h264) -> scale
  split -> Stream #0:0 (libx264)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000025220812340] stream 1, offset 0xb1bf9: partial file
pipe:0: Invalid data found when processing input
Cannot determine format of input stream 0:1 after EOF
Error marking filters as finished
Conversion failed!

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: ffmpeg exited with code 1: pipe:0: Invalid data found when processing input
Cannot determine format of input stream 0:1 after EOF
Error marking filters as finished
Conversion failed!


    


  • how to record screen using ffmpeg with variable framerate

    20 mai 2024, par AJ Dev

    I want to record desktop using ffmpeg with variable framerate.

    


    set a limit of fps to 120fps
now ffmpeg handle automatically that my max limit is 120
if pc is highly configured then record to 120
otherwise record auto fps like 5,10 whatever

    


    i searched on google i found -vsync 2 and -vsync vfr but these are not working.

    


    my command is

    


    ffmpeg -use_wallclock_as_timestamps 1 -re -vsync vfr -thread_queue_size 1024 -rtbufsize 1024 -indexmem 1024 -probesize 32 -analyzeduration 0 -framerate 120 -f rawvideo -pix_fmt rgb32 -video_size 1366x768 -i \.\pipe\testscreen-4c0b1a88-d4d0-4f6a-55a6-c4587a0ccb7c3 -async 1 -thread_queue_size 1024 -rtbufsize 1024 -indexmem 1024 -probesize 32 -f s16le -acodec pcm_s16le -ar 44100 -ac 2 -i \.\pipe\testscreen-d185c2a9-ac89-4966-b8d7-cec897848790 -fflags +genpts -fflags nobuffer -r 120 -vcodec libx264 -crf 21 -pix_fmt yuv420p -preset ultrafast -b:v 0 -maxrate 0 -bf 0 -profile:v high -x264opts "keyint=300:bframes=0:sliced_threads=1:slices=4:lookahead_threads=4:threads=4" -tune zerolatency -movflags +faststart -y -fflags +genpts -c:a aac -strict -2 -b:a 128k "C :\2021-08-16_13-21-38-815.mp4"