
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (96)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-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
Sur d’autres sites (4996)
-
jpg images to gif ffmpeg no data found in image
3 juillet 2023, par Idk123I was trying to use ffmpeg to create a gif from jpg images, but I wasn't able to convert them, not through a python code and not even from the dir itself in cmd




python code :


input_files = f"{BASE_DIR}\\qr_images\\qr%d.jpg"
command = f'ffmpeg -i {input_files} output.gif'
os.system(f'start /wait cmd /k {command}')





I need the files in the dir to be able to convert to gif using ffmpeg (I have it installed correctly)


this is the complete cmd dialog (if I run it from the dir in cmd or if i run the python code :


ffmpeg version 6.0-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12.2.0 (Rev10, Built by MSYS2 project) configuration : —enable-gpl —enable-version3
—enable-static —disable-w32threads —disable-autodetect —enable-fontconfig —enable-iconv —enable-gnutls —enable-libxml2 —enable-gmp —enable-bzlib —enable-lzma —enable-zlib —enable-libsrt —enable-libssh —enable-libzmq —enable-avisynth —enable-sdl2 —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxvid —enable-libaom —enable-libopenjpeg —enable-libvpx —enable-mediafoundation —enable-libass —enable-libfreetype —enable-libfribidi —enable-libvidstab —enable-libvmaf —enable-libzimg —enable-amf —enable-cuda-llvm —enable-cuvid —enable-ffnvcodec —enable-nvdec —enable-nvenc —enable-d3d11va —enable-dxva2 —enable-libvpl —enable-libgme —enable-libopenmpt —enable-libopencore-amrwb —enable-libmp3lame —enable-libtheora —enable-libvo-amrwbenc —enable-libgsm —enable-libopencore-amrnb —enable-libopus —enable-libspeex —enable-libvorbis —enable-librubberband libavutil 58. 2.100 / 58. 2.100 libavcodec 60. 3.100 / 60. 3.100 libavformat 60. 3.100 /
60. 3.100 libavdevice 60. 1.100 / 60. 1.100 libavfilter 9. 3.100 / 9. 3.100 libswscale 7. 1.100 / 7. 1.100 libswresample 4. 10.100 / 4. 10.100 libpostproc 57. 1.100 /
57. 1.100 [mjpeg @ 000002000696bfc0] No JPEG data found in image [mjpeg @ 000002000696bfc0] unable to decode APP fields : Invalid data found when processing input
Last message repeated 1 times [mjpeg @ 000002000696bfc0] No JPEG data found in image [mjpeg @ 000002000696bfc0] unable to decode APP fields : Invalid data found when processing input
Last message repeated 1 times [mjpeg @ 000002000696bfc0] Found EOI before any SOF, ignoring [mjpeg @ 000002000696bfc0] No JPEG data found in image [mjpeg @ 000002000696bfc0] bits 159 is invalid [mjpeg @ 000002000696bfc0] unable to decode APP fields : Invalid data found when processing input
Last message repeated 2 times [mjpeg @ 000002000696bfc0] bits 247 is invalid [mjpeg @ 000002000696bfc0] unable to decode APP fields : Invalid data found when processing input [mjpeg @ 000002000696bfc0] No JPEG data found in image [mjpeg @ 000002000696bfc0] unable to decode APP fields : Invalid data found when processing input [mjpeg @ 000002000696bfc0] No JPEG data found in image [image2 @ 000002000696aec0] Could not find codec parameters for stream 0 (Video : mjpeg (Progressive), none(bt470bg/unknown/unknown)) : unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, image2, from 'c :\Test_proj\qr_images\qr%d.jpg' : Duration : 00:00:00.28, start :
0.000000, bitrate : N/A Stream #0:0 : Video : mjpeg (Progressive), none(bt470bg/unknown/unknown), 25 fps, 25 tbr, 25 tbn Stream mapping : Stream #0:0 -> #0:0 (mjpeg (native) -> gif (native)) Press [q] to stop, [?] for help [mjpeg @ 00000200069a35c0] mjpeg : unsupported coding type (c5) [mjpeg @ 00000200069a35c0] mjpeg : unsupported coding type (ca) Error while decoding stream #0:0 : Invalid data found when processing input [mjpeg @ 00000200069a35c0] unable to decode APP fields : Invalid data found when processing input
Last message repeated 1 times [mjpeg @ 00000200069a35c0] mjpeg : unsupported coding type (ce) [mjpeg @ 00000200069a35c0] No JPEG data found in image Error while decoding stream #0:0 : Invalid data found when processing input [mjpeg @ 00000200069a35c0] unable to decode APP fields : Invalid data found when processing input
Last message repeated 1 times [mjpeg @ 00000200069a35c0] mjpeg : unsupported coding type (cb) [mjpeg @ 00000200069a35c0] Found EOI before any SOF, ignoring [mjpeg @ 00000200069a35c0] Can not process SOS before SOF, skipping [mjpeg @ 00000200069a35c0] No JPEG data found in image Error while decoding stream #0:0 : Invalid data found when processing input [mjpeg @ 00000200069a35c0] bits 159 is invalid Error while decoding stream #0:0 : Invalid data found when processing input [mjpeg @ 00000200069a35c0] unable to decode APP fields : Invalid data found when processing input
Last message repeated 2 times [mjpeg @ 00000200069a35c0] bits 247 is invalid Error while decoding stream #0:0 : Invalid data found when processing input [mjpeg @ 00000200069a35c0] unable to decode APP fields : Invalid data found when processing input [mjpeg @ 00000200069a35c0] mjpeg : unsupported coding type (c6) [mjpeg @ 00000200069a35c0] No JPEG data found in image Error while decoding stream #0:0 : Invalid data found when processing input [mjpeg @ 00000200069a35c0] Can not process SOS before SOF, skipping [mjpeg @ 00000200069a35c0] unable to decode APP fields : Invalid data found when processing input [mjpeg @ 00000200069a35c0] Can not process SOS before SOF, skipping
Last message repeated 2 times [mjpeg @ 00000200069a35c0] No JPEG data found in image Error while decoding stream #0:0 : Invalid data found when processing input Cannot determine format of input stream 0:0 after EOF Error marking filters as finished Conversion failed !


-
Leading Google Analytics alternative, Matomo, parodies Christopher Nolan blockbuster ahead of the UA sunset
4 juillet 2023, par Erin — Press Releases -
Ffmpeg configuration to stream the frames of my webcam
6 juillet 2023, par RidwengI'm trying to build a server in NodeJs to stream in RTSP my webcam using Angular to retrieve the frames and connecting using websockets. The server side is using "express-ws" module to create the Websocket.


I was successfull in sending the frames from the webcam to the server in base64, the server is receiving these messages from a function on interval of (1000 / 30)ms.


The issue relies on the implementation of my Ffmpeg child process. I retrieve the message and convert it into a buffer to then write this in the function of Ffmpeg.


My current implementation is this one :


const { spawn } = require('child_process');
exports.stream = (ws ,req) => {
 try{
 const mess = `connection from: ${req._remoteAddress} at ${req._startTime}.`
 const initialMess =`Started ${mess}`
 ws.uuid = uuidv4()
 console.log(initialMess)

 ws.on('message', function incoming(message) {
 message = JSON.parse(message)
 console.log(`Res: ${message.width} x ${message.height}`);
 const ffmpeg = spawn('ffmpeg', [
 '-f', 'rawvideo',
 '-pixel_format', 'rgb24',
 '-video_size', `${message.width}x${message.height}`,
 '-framerate', `${message.framerate}`,
 '-i', '-',
 '-codec:v', 'libx264',
 '-preset', 'ultrafast',
 '-tune', 'zerolatency',
 '-f', 'rtsp',
 'rtsp://127.0.0.1:554/rtsp/stream',
 ]);
 const base64Data = message.video;
 const videoData = Buffer.from(base64Data, 'base64');

 ffmpeg.stdin.write(videoData);
 ffmpeg.stdin.end();
 
 ffmpeg.stderr.on('data', (data) => {
 console.error(`FFmpeg : ${data}`);
 });

 ffmpeg.on('exit', (code, signal) => {
 if (dev) console.log(`FFmpeg process exited with code ${code} and signal ${signal}`);
 
 // Close the WebSocket connection
 ws.close();
 });
 });
 ws.on('close', () => {
 const finalMess = `Stopped ${mess}`
 rem(ws.uuid)
 console.log(finalMess)
 })
 }catch(err){
 console.log(err)
 }
}



In terms of the message received, this is the Angular side sending the message :


const imageData = this.canvas.toDataURL('image/jpeg');
socket.send(JSON.stringify({video: imageData, width: this.canvas.width, height: this.canvas.height, framerate: interval }));



The interval variable is the divisor of the interval that is triggering the function (in this case 30).


I'm currently receiving the error message from Ffmpeg :


ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
 built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)

FFmpeg : configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
 libavutil 58. 2.100 / 58. 2.100
 libavcodec 60. 3.100 / 60. 3.100
 libavformat 60. 3.100 / 60. 3.100
 libavdevice 60. 1.100 / 60. 1.100
 libavfilter 9. 3.100 / 9. 3.100
 libswscale 7. 1.100 / 7. 1.100
 libswresample 4. 10.100 / 4. 10.100
 libpostproc 57. 1.100 / 57. 1.100

FFmpeg : [rawvideo @ 0x150005ff0] Packet corrupt (stream = 0, dts = 0).

FFmpeg : Input #0, rawvideo, from 'fd:':
 Duration: N/A, start: 0.000000, bitrate: 221184 kb/s
 Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 640x480, 221184 kb/s, 30 tbr, 30 tbn

FFmpeg : Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))

FFmpeg : fd:: corrupt input packet in stream 0
[rawvideo @ 0x14ef24290] Invalid buffer size, packet size 76343 < expected frame_size 921600

FFmpeg : Error while decoding stream #0:0: Invalid argument

FFmpeg : [libx264 @ 0x14ef25a20] using cpu capabilities: ARMv8 NEON

FFmpeg : [libx264 @ 0x14ef25a20] profile High 4:4:4 Predictive, level 3.0, 4:4:4, 8-bit

FFmpeg : [libx264 @ 0x14ef25a20] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=7 lookahead_threads=7 sliced_threads=1 slices=7 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0

FFmpeg : [tcp @ 0x1500078a0] Connection to tcp://127.0.0.1:554?timeout=0 failed: Connection refused
[out#0/rtsp @ 0x14ef24b00] Could not write header (incorrect codec parameters ?): Connection refused

FFmpeg : [vost#0:0/libx264 @ 0x14ef256d0] Error initializing output stream: 

FFmpeg : Conversion failed!

FFmpeg process exited with code 1 and signal null



This is the reason I believe the issue relies on the configuration of Ffmpeg and how to set it for this case. It would be great to being able to play this RTSP link in my VLC to conclude it as successfull.


I would apreciate any suggestions or guidence.
Thanks in advance.