
Recherche avancée
Médias (2)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (62)
-
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP 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, parMediaspip 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, parLe 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 theplaceofburakI 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 jibranI 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('videoshow')
 const ffmpeg = require('@ffmpeg-installer/ffmpeg');


 var images = [
 'image1.jpg',
 'image1.jpg',
 'image1.jpg'

 ]
 var videoOptions = {
 fps: 25,
 loop: 5, // seconds 
 transition: true,
 transitionDuration: 1, // seconds 
 videoBitrate: 1024,
 videoCodec: 'libx264',
 size: '640x640',
 audioBitrate: '128k',
 audioChannels: 2,
 format: 'mp4',
 pixelFormat: 'yuv420p'
 }

 var videoOptions = {
 fps: 24,
 transition: false,
 videoBitrate: 1024 ,
 videoCodec: 'libx264', 
 size: '640x640',
 outputOptions: ['-pix_fmt yuv420p'],
 format: 'mp4' 
 }
 videoshow(images, videoOptions)
 .audio('nd.mp3')
 .save('/home/jibran/Desktop/video.avi')
 .on('start', function (command) {
 console.log('ffmpeg process started:', command)
 })
 .on('error', function (err, stdout, stderr) {
 console.error('Error:', err)
 console.error('ffmpeg stderr:', stderr)
 console.error('ffmpeg stdeout:', stdout)
 })
 .on('end', function (output) {
 console.error('Video created in:', output)
 })

 and on a console I get

 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

 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
 Error: Error: ffmpeg exited with code 1: 
 at ChildProcess.<anonymous> (/home/jibran/Desktop/hello-world/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
 at ChildProcess.emit (events.js:127:13)
 at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
 ffmpeg stderr: undefined
 ffmpeg stdeout: undefined
</anonymous>


-
Raspberry crosscompilation in Eclipse
27 juin 2018, par gogoerI 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.