Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (62)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • 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

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (8912)

  • Error with RTSP Stream in Node.js : Could not find codec parameters for stream 0 (Video : h264, none)

    7 août 2023, par theplaceofburak

    I have a Node.js application that uses the node-rtsp-stream package to stream an RTSP video from an IP camera. However, when I run the application, I encounter the following errors in the console after a few minutes :

    


    [rtsp @ 000002402795dd80] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, rtsp, from 'rtsp://fake_test:jksdfhskhdfsomethingfake@111.111.11.1111:50213/cam/realmonitor?channel=1&subtype=1'(fake rtsp link used for privacy)':
  Metadata:
    title           : Media Server
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: h264, none, 90k tbr, 90k tbn
Output #0, mpegts, to 'pipe:':
[out#0/mpegts @ 0000024027987b80] Output file does not contain any stream
Error opening output file -.
Error opening output files: Invalid argument
RTSP stream exited with error


    


    I am certain that the RTSP stream from the camera is in H.264 - MPEG-4 AVC format, and I can play it in VLC without any issues. However, when I try to stream it using the node-rtsp-stream package, I encounter these errors.

    


    Here is my Node.js code :

    


    const express = require('express');
const Stream = require('node-rtsp-stream');

const app = express();
const port = 4000;


const stream = new Stream({
  name: 'rtsp_server_name',
  streamUrl: 'rtsp://fake_test:jksdfhskhdfsomethingfake@111.111.11.1111:50213/cam/realmonitor?channel=1&subtype=1'(fake rtsp link used for privacy),
  wsPort: 9999,
  ffmpegOptions: {
    '-stats': '', // an option with no necessary value uses a blank string
    '-r': 30, // options with required values specify the value after the key
  },
});

// Middleware to log each request
app.use((req, res, next) => {
  console.log(`${req.method} ${req.url}`);
  next();
});

app.get('/', (req, res) => {
  res.send('Hello World');
});

app.listen(port, () => {
  console.log(`Server running at http://localhost:${port}/`);
});

// Event listener to check if the RTSP stream is ready
stream.on('data', (data) => {
  if (data.includes('frame=')) {
    console.log('RTSP stream is ready and streaming.');
  }
});


    


    I have tried increasing the values for 'analyzeduration' and 'probesize' options, but the errors persist. How can I resolve these errors and successfully stream the RTSP video in H.264 format using the node-rtsp-stream package ? Any help or guidance would be appreciated. Thank you !

    


  • Error : ffmpeg exited with code 1 :

    16 juin 2022, par jibran

    I am using the videoshow node package to create straightforward video slideshows based on images using ffmpeg, with additional features such as audio. I am following the documentation exactly but I get the following error :

    



    


    Error : ffmpeg exited with code 1 :

    


    



    Here is the code :

    



        var videoshow = require(&#x27;videoshow&#x27;)&#xA;    const ffmpeg = require(&#x27;@ffmpeg-installer/ffmpeg&#x27;);&#xA;&#xA;&#xA;    var images = [&#xA;      &#x27;image1.jpg&#x27;,&#xA;      &#x27;image1.jpg&#x27;,&#xA;      &#x27;image1.jpg&#x27;&#xA;&#xA;    ]&#xA;    var videoOptions = {&#xA;      fps: 25,&#xA;      loop: 5, // seconds &#xA;      transition: true,&#xA;      transitionDuration: 1, // seconds &#xA;      videoBitrate: 1024,&#xA;      videoCodec: &#x27;libx264&#x27;,&#xA;      size: &#x27;640x640&#x27;,&#xA;      audioBitrate: &#x27;128k&#x27;,&#xA;      audioChannels: 2,&#xA;      format: &#x27;mp4&#x27;,&#xA;      pixelFormat: &#x27;yuv420p&#x27;&#xA;    }&#xA;&#xA;     var videoOptions = {&#xA;      fps: 24,&#xA;      transition: false,&#xA;      videoBitrate: 1024 ,&#xA;      videoCodec: &#x27;libx264&#x27;, &#xA;      size: &#x27;640x640&#x27;,&#xA;      outputOptions: [&#x27;-pix_fmt yuv420p&#x27;],&#xA;      format: &#x27;mp4&#x27; &#xA;    }&#xA;    videoshow(images, videoOptions)&#xA;      .audio(&#x27;nd.mp3&#x27;)&#xA;      .save(&#x27;/home/jibran/Desktop/video.avi&#x27;)&#xA;      .on(&#x27;start&#x27;, function (command) {&#xA;        console.log(&#x27;ffmpeg process started:&#x27;, command)&#xA;      })&#xA;      .on(&#x27;error&#x27;, function (err, stdout, stderr) {&#xA;        console.error(&#x27;Error:&#x27;, err)&#xA;        console.error(&#x27;ffmpeg stderr:&#x27;, stderr)&#xA;        console.error(&#x27;ffmpeg stdeout:&#x27;, stdout)&#xA;      })&#xA;      .on(&#x27;end&#x27;, function (output) {&#xA;        console.error(&#x27;Video created in:&#x27;, output)&#xA;      })&#xA;&#xA;    and on a console I get&#xA;&#xA;    ffmpeg process started: ffmpeg -i /tmp/videoshow-44a65b07-0949-4b1b-8a6e-bf8a71d5f5ca -i /tmp/videoshow-c7dd4222-385d-406e-8f10-c4160df3db17 -i /tmp/videoshow-2324c514-1738-4c6b-96dc-ab1cc3551d67 -y -filter_complex concat=n=3:v=1:a=0 /home/jibran/Desktop/video.avi&#xA;&#xA;    ffmpeg process started: ffmpeg -i /tmp/videoshow-0ff6909b-db19-4ba1-91ba-dc961127317f -i nd.mp3 -y -r 24 -b:v 1024k -vcodec libx264 -filter:v scale=w=640:h=640 -pix_fmt yuv420p -f mp4 -map 0:0 -map 1:0 -t 15 -af afade=t=in:ss=0:st=0:d=3 -af afade=t=out:st=12:d=3 /home/jibran/Desktop/video.avi&#xA;    Error: Error: ffmpeg exited with code 1: &#xA;        at ChildProcess.<anonymous> (/home/jibran/Desktop/hello-world/node_modules/fluent-ffmpeg/lib/processor.js:182:22)&#xA;        at ChildProcess.emit (events.js:127:13)&#xA;        at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)&#xA;    ffmpeg stderr: undefined&#xA;    ffmpeg stdeout: undefined&#xA;</anonymous>

    &#xA;

  • Raspberry crosscompilation in Eclipse

    27 juin 2018, par gogoer

    I want to compile an application for Raspberry in Eclipse (in windows). I installed SysGCC, configured Eclipse for crosscompiling. And if I create something like "Hello world" - everything is ok. Eclipse creates binaries which wonderfully works on Raspberry.
    But i need use FFMPEG libraries in my application . Here the minimal code of application :

    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libswscale></libswscale>swscale.h>

    int main(void) {
       av_register_all();
       return EXIT_SUCCESS;
    }

    I added libraries in project config. Project compiles good, but linker gives a lot of errors :

    C:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\local\lib\libavcodec.a(aaccoder.o): In function `quantize_and_encode_band_cost_template':
    /usr/src/ffmpeg/libavcodec/aacenc_quantization.h:108: undefined reference to `cbrtf'
    /usr/src/ffmpeg/libavcodec/aacenc_quantization.h:108: undefined reference to `cbrtf'
    /usr/src/ffmpeg/libavcodec/aacenc_quantization.h:108: undefined reference to `cbrtf'
    /usr/src/ffmpeg/libavcodec/aacenc_quantization.h:108: undefined reference to `cbrtf'
    C:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\local\lib\libavcodec.a(aacenc_is.o): In function `quantize_and_encode_band_cost_template':
    /usr/src/ffmpeg/libavcodec/aacenc_quantization.h:108: undefined reference to `cbrtf'
    C:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\local\lib\libavcodec.a(aacenc_is.o):/usr/src/ffmpeg/libavcodec/aacenc_quantization.h:108: more undefined references to `cbrtf' follow
    C:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\local\lib\libavcodec.a(adx.o): In function `ff_adx_calculate_coeffs':
    /usr/src/ffmpeg/libavcodec/adx.c:30: undefined reference to `cos'
    /usr/src/ffmpeg/libavcodec/adx.c:34: undefined reference to `lrintf'
    /usr/src/ffmpeg/libavcodec/adx.c:35: undefined reference to `lrintf'
    /usr/src/ffmpeg/libavcodec/adx.c:30: undefined reference to `cos'
    /usr/src/ffmpeg/libavcodec/adx.c:34: undefined reference to `lrintf'
    /usr/src/ffmpeg/libavcodec/adx.c:35: undefined reference to `lrintf'
    collect2.exe: error: ld returned 1 exit status
    make: *** [ffmpeg] Error 1

    02:21:24 Build Finished (took 8s.394ms)

    SOLVED :

    i used next command :

    arm-linux-gnueabihf-gcc -L"C:\SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\local\lib" -L"C:\SysGCC\Raspberry\arm-linux-gnueabihf\lib" -o "ffmpeg"  ./src/ffmpeg.o   -lc -lm -lpthread -lavformat -lavcodec -lswscale -lavutil -lavfilter -lavdevice -lswresample -lpostproc -ldl -lx264 -lgcc -lz

    where -lc -lm -lpthread -lavformat -lavcodec -lswscale -lavutil -lavfilter -lavdevice -lswresample -lpostproc -ldl -lx264 -lgcc -lz are libraries linker needs (maybe not all of them).
    please note that order is important.