Recherche avancée

Médias (91)

Autres articles (27)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

Sur d’autres sites (5267)

  • pipe:0 : could not find codec parameters

    10 avril 2018, par Harish

    I am trying to store streaming video as a segments of 15 min,it is working fine with gst-launch-1.0 my command is

    gst-launch-1.0 -e --gst-debug-level=2 v4l2src device=/dev/video0 ! vspmfilter outbuf-alloc=true ! \
    video/x-raw,width=640,height=480,framerate=15/2 ! omxh264enc target-bitrate=10485760 num-p-frames=0 ! \
    mpegtsmux name="muxer" ! fdsink fd=1 \
    alsasrc device=hw:0,0 latency-time=30000 buffer-time=800000 ! audioconvert ! audio/x-raw,format=S16LE,channel=2,rate=44100 ! \
    faac bitrate=128000 ! muxer. \
    | /usr/bin/ffmpeg -v info -i pipe:0 -map 0 -c copy -f segment \
    -reset_timestamps 1 -segment_atclocktime 1 -segment_time 900 \
    -segment_list_type csv -segment_list_size 0 \
    -segment_list /home/root/ContinuousCapture/CamFiles.txt
    -segment_list_entry_prefix /home/root/ContinuousCapture/ \
    -segment_format mpegts -strftime 1 /home/root/ContinuousCapture/video_%g%m%d_%H%M%S.mpegts

    I changed same command to gstd,my command is

    gstd-client pipeline_create p v4l2src device=/dev/video0 ! ${textoverlay} text=${dev0} ! ${clockoverlay} ! vspmfilter outbuf-alloc=true ! \
    video/x-raw,width=640,height=480,framerate=15/2 ! omxh264enc target-bitrate=10485760 num-p-frames=0 \
    mpegtsmux name="muxer" ! fdsink fd=1 \
    alsasrc device=hw:0,0 latency-time=30000 buffer-time=800000 ! audioconvert ! audio/x-raw,format=S16LE,channel=2,rate=44100 ! \
    faac bitrate=128000 ! muxer. \
    gstd-client pipeline_play p | /usr/bin/ffmpeg  -v info -i pipe:0 -map 0 -c copy -f segment \
    -reset_timestamps 1 -segment_atclocktime 1 -segment_time 900 \
    -segment_list_type csv -segment_list_size 0 \
    -segment_list /home/root/ContinuousCapture/CamFiles.txt -segment_list_entry_prefix /home/root/ContinuousCapture/ \
    -segment_format mpegts -strftime 1 /home/root/ContinuousCapture/video_%g%m%d_%H%M%S.mpegts

    its giving me the following error

    libdir=/usr/lib --shlibdir=/usr/lib --datadir=/usr/share/ffmpeg --disable-mipsdsp --disable-mipsdspr2 --cpu=generic --pkg-config=pkg-config --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --disable-avresample --enable-bzlib --enable-gpl --disable-libgsm --disable-indev=jack --disable-libvorbis --disable-libmp3lame --disable-openssl --enable-postproc --disable-libschroedinger --disable-sdl2 --disable-libspeex --enable-swresample --enable-swscale --enable-libtheora --disable-vaapi --disable-vdpau --disable-libvpx --enable-libx264 --enable-outdev=xv
    libavutil      55. 58.100 / 55. 58.100
    libavcodec     57. 89.100 / 57. 89.100
    libavformat    57. 71.100 / 57. 71.100
    libavdevice    57.  6.100 / 57.  6.100
    libavfilter     6. 82.100 /  6. 82.100
    libswscale      4.  6.100 /  4.  6.100
    libswresample   2.  7.100 /  2.  7.100
    libpostproc    54.  5.100 / 54.  5.100
    [mpegts @ 0x49450] Format mpegts detected only with low score of 2, misdetection possible!
    [mpegts @ 0x49450] Could not detect TS packet size, defaulting to non-FEC/DVHS
    pipe:0: could not find codec parameters

    Thank you

  • What is the proper input format for drawtext's timecode option in fluent-ffmpeg (node.js) ?

    24 janvier 2023, par Gil Dekel

    I am trying to generate short video clips from 3 images with a simple millisecond counter at the top left per user request. So far I was able to generate the clips using the videoshow npm lib, no issues here.

    



    However, when I try to add the timer via fluent-ffmpeg's drawtext filter to an already generated video, I run into the following issue.

    



    Here's what I have so far :

    



    ffmpeg('video.mp4')
    .on('error', function(err, stdout, stderr) {
      console.log("ffmpeg stdout:\n" + stdout);
      console.log("ffmpeg stderr:\n" + stderr);
    })
    .videoCodec('libx264')
    .format('mp4')
    .fps(fps)
    .complexFilter([
        {
            filter: 'drawtext',
            options: {
                fontsize: 15,
                timecode: '00\:00\:00\:00',  //<--- Issue is most likely here
                fontsize: 32,
                fontcolor: 'white',
                boxcolor: 'black',
                box: 1
            }
        }
    ]).save('out.mp4');


    



    From what I found online I am quite convinced that my problem is with the timecode input format. Here's my error log :

    



    ffmpeg stderr:
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --disable-jack --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-nonfree
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:00:01.03, start: 0.000000, bitrate: 585 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x1136 [SAR 923:924 DAR 130:231], 573 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default)
    Metadata:
      handler_name    : VideoHandler
[Parsed_drawtext_0 @ 0x7f91aa700700] Both text and text file provided. Please provide only one
[AVFilterGraph @ 0x7f91aa700440] Error initializing filter 'drawtext' with args 'fontsize=32:timecode=00:00:00:00:fontcolor=white:boxcolor=black:box=1'
Error initializing complex filters.
Invalid argument


    



    Specifically this :

    



    [Parsed_drawtext_0 @ 0x7f91aa700700] Both text and text file provided. Please provide only one


    



    When I run what should be the equivalent to my code in shell, it works perfectly :

    



    ffmpeg -i video.mp4 \
       -vf drawtext="fontsize=15:timecode='00\:00\:00\:00':rate=60:fontsize=32:fontcolor='white':\
           boxcolor=0x000000AA:box=1" \
       -f mp4 out.mp4


    



    I already spent a whole day trying to find any previous solutions to this problem, or documentation online regarding the proper format of drawtext's timecode option within node.js with no luck. It seems most of the information out there is for bash/shell use. I need to do this programmatically on a server per request, and I just can't find the right example to solve this.

    



    Any help to resolve this would be appreciated.

    


  • Nodejs - ffmpeg - unable to live convert webcam to hls file

    26 mai 2020, par Jeff55

    Okay so long story short : I need to be able to accept a video stream from my usb port and offer this up to my frontend (React) using HLS/RTMP/WebRTC. I opted for HLS because it seems to have the least amount of dependencies and this may end up running on a Pi, so simplicity is good.

    



    const { spawn } = require('child_process');
var args = [
    '-pix_fmt', 'uyvy422',
    '-f', 'avfoundation',
    '-framerate', '30',
    '-i', '0',
    '-c:v', 'libx264',
    '-crf', '21',
    '-preset', 'veryfast',
    '-f', 'hls',
    '-hls_time', '4',
    '-hls_playlist_type', 'event', 'stream.m3u8'
]
const ffmpeg = spawn('ffmpeg', args);

ffmpeg.stdout.on('data', (data) => {
  console.log(`stdout: ${data}`);
});

ffmpeg.stderr.on('data', (data) => {
    console.error(`stderr: ${data}`);
});

ffmpeg.on('close', (code, signal) => {
  if(code) console.log(`child process exited with code ${code}`);
  else if(signal) console.log(`child process exited with signal ${signal}`);
});


    



    My expectation is that this should grab the 0th video input and encode to hls. Unfortunately, I get this as a result.

    



    stderr: ffmpeg version 4.2.3
stderr:  Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.59)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100

stderr: [AVFoundation input device @ 0x7fcac2604600] Configuration of video device failed, falling back to default.

child process exited with signal SIGABRT


    



    I have no clue why I'm getting a SIGABRT signal but when I manually type in the device (-i "FaceTime HD Camera"), I don't get the config error but the process exits without doing its usual frame=   38 fps=0.0 q=27.0 size=N/A time=00:00:00.46 bitrate=N/A speed=0.869x, it just exits with a SIGABRT.

    



    If I type the exact command (ffmpeg -f avfoundation -framerate 30 -i "0" -c:v libx264 -crf 21 -preset veryfast -f hls -hls_time 4 -hls_playlist_type event out/test.m3u8), everything works as expected and I get an output.

    



    I read here that it could be due to a static build but I'm not really sure why that would cause an issue. For reference, this is on MacOS and will most likely eventually move to Ubuntu.

    



    And idea why this is happening ? Thanks.