Recherche avancée

Médias (0)

Mot : - Tags -/alertes

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

Autres articles (49)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • 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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (4431)

  • How can I concat several videos generated by MediaRecorder slices

    28 mai 2023, par Bruno Francisco

    I have the following frontend code :

    


    const mediaRecorder = new MediaRecorder(stream, {
        mimeType: 'video/webm'
    });

    mediaRecorder.start(10000);

    mediaRecorder.ondataavailable = (e) => {
        const formData = new FormData();

        formData.append('video', new Blob([e.data], { 'type' : 'video/webm;' }));

        fetch('http://localhost/api/session/12/video/stream', {
            method: 'POST',
            body: formData,
        }).then(() => {
            console.log('success')
        }).catch((e) => {
            console.log('error')
            console.log(e);
        });
    };


    


    Then, in the backend I'm saving the each 10 seconds video into a folder. Then, whenever the user finishes his session, we would like to stitch together all the videos together.

    


    If the user has recorded for 20 seconds, we will have 2 videos of 10 seconds.

    


    I have the following files in my folder :

    


    erKa3MVTuDfnuDUQUhUd2huUaCKfihtm8thc0KX0.bin
hAhJfVNxMEJK2MsyR99a7t7UkT3pjHkmdN1j2C9G.mkv


    


    I'm assuming that the first slice generated by MediaRecord includes the mime type, while the subsequent parts do not have mime types, generating a .bin file.

    


    Now, I run the following command to stitch all parts together :

    


    ffmpeg -i erKa3MVTuDfnuDUQUhUd2huUaCKfihtm8thc0KX0.bin -i hAhJfVNxMEJK2MsyR99a7t7UkT3pjHkmdN1j2C9G.mkv -filter_complex "concat=n=2:v=0:a=1" -vn -y final-video.mp4


    


    Then I get the following error :

    


    ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[h264 @ 0xaaaaf1ad3a70] non-existing PPS 0 referenced
    Last message repeated 1 times

...

Input #0, h264, from 'erKa3MVTuDfnuDUQUhUd2huUaCKfihtm8thc0KX0.bin':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: h264 (Baseline), yuv420p(tv, bt709, progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Input #1, matroska,webm, from 'hAhJfVNxMEJK2MsyR99a7t7UkT3pjHkmdN1j2C9G.mkv':
  Metadata:
    encoder         : Chrome
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #1:0(eng): Video: h264 (Baseline), yuv420p(tv, bt709, progressive), 1920x1080, SAR 1:1 DAR 16:9, 29.33 fps, 29.33 tbr, 1k tbn, 2k tbc (default)
Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_concat_0


    


    Is there any way to stitch all files together ? Do I have to send the mime type on each time ondataavailable is called ?

    


  • FFMPEG Error : Padded dimensions smaller then input dimensions

    17 mai 2023, par Hekimen

    I have this ffmpeg command

    


    ffmpeg -i input.mp4 \
-vf "scale=80:45:force_original_aspect_ratio=decrease,pad=80:45:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1,fps=1/5" \
-q:v 2 \
output/screenshot_%05d.jpg


    


    but it returns error :

    


    [Parsed_pad_1 @ 0x7f2014097f00] Padded dimensions cannot be smaller than input dimensions.
[Parsed_pad_1 @ 0x7f2014097f00] Failed to configure input pad on Parsed_pad_1
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!


    


    I tried command without pad filter and checked all screenshots, they are all generated with resolution 60x45. When i use same command but change scale and pad to 160x90 resolution it works without any error.

    


    I also checked ffmpeg manual for pad filter but i can't find anything helpful what should explain this error (https://ffmpeg.org/ffmpeg-filters.html#pad-1)

    


    How to make this command work ?

    


    I am using this ffmpeg version :

    


    ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.3.1 (Alpine 10.3.1_git20211027) 20211027
  configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --disable-debug
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100


    


  • ffmpeg add an audio to a video using apad, but duration not exactly same [closed]

    27 avril 2023, par Richard

    I am using ffmpeg to add an audio to a silent video, and the audio is shorter than the video, so I want to add silence to the end of the audio and make sure they have same duration. I use below command

    


    ffmpeg -i video.mp4 -i audio.mp3 -filter_complex "[1:0]apad" -c:v copy -shortest output.mp4


    


    but the output durations are not exactly the same

    


      

    1. Am I making any mistake here ?
    2. 


    3. Is there a way to make them exactly same ?
    4. 


    


    ffprobe -v error -show_entries stream=codec_type,duration,start_pts,start_time -sexagesimal output.mp4
[STREAM]
codec_type=audio
start_pts=0
start_time=0:00:00.000000
duration=0:00:03.621995
[/STREAM]
[STREAM]
codec_type=video
start_pts=0
start_time=0:00:00.000000
duration=0:00:03.640000
[/STREAM]


    


    input file info

    


    ▶ ffmpeg -i video.mp4                                                                                   
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.76.100
  Duration: 00:00:03.64, start: 0.000000, bitrate: 394 kb/s
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1080x1920, 390 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]


▶ ffmpeg  -i audio.mp3                                                                                     
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mp3, from 'audio.mp3':
  Metadata:
    TCM             : A
    TT1             : xxx
    title           : yyy
    encoded_by      : ProTranscoderTool (Apple MP3 v1
  Duration: 00:00:02.77, start: 0.000000, bitrate: 271 kb/s
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 265 kb/s