
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (44)
-
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 (6156)
-
FFMPEG PNG sequence into mkv cause "inflate returned error -3" every 600-800 frames [closed]
30 novembre 2023, par sergey9295I am new to ffmpeg. I try to use it for creating videos from png sequences. I have uncompressed pngs. All of them rgb24 format.


But during encoding process I get inflate errors. I compared PNG and video frame by frame. And video have approximately 1 dupe frame every 600-800 frames instead of the ones that should be on that places. I tried another codecs, tried to clear png's EXIF(it made things even worse), made sure that memory was enough. Doesn't matter.


The worst part is that this errors are pretty random. I encode one sequence 3 times and get 3 different sets of error-causing frames.


FFMPEG was downloaded from official site.


PS C:\Users\sergey9295\Desktop\Upscaler\bin> ./ffmpeg -framerate 24000/1001 -i 24o/frame%04d.png -c:v libx264 -qp 0 -r 24000/1001 -pix_fmt yuv420p BC108K.mkv
ffmpeg version N-112872-g67ce690bc6-20231128 Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 13.2.0 (crosstool-NG 1.25.0.232_c175b21)
 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libaribcaption --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20231128
 libavutil 58. 32.100 / 58. 32.100
 libavcodec 60. 35.100 / 60. 35.100
 libavformat 60. 18.100 / 60. 18.100
 libavdevice 60. 4.100 / 60. 4.100
 libavfilter 9. 13.100 / 9. 13.100
 libswscale 7. 6.100 / 7. 6.100
 libswresample 4. 13.100 / 4. 13.100
 libpostproc 57. 4.100 / 57. 4.100
Input #0, image2, from '24o/frame%04d.png':
 Duration: 00:01:32.09, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: png, rgb24(pc, gbr/bt709/iec61966-2-1), 7680x4320, 23.98 fps, 23.98 tbr, 23.98 tbn
Stream mapping:
 Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 00000231363c6280] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 00000231363c6280] profile High 4:4:4 Predictive, level 6.0, 4:2:0, 8-bit
[libx264 @ 00000231363c6280] 64 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2023 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0
Output #0, matroska, to 'BC108K.mkv':
 Metadata:
 encoder : Lavf60.18.100
 Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p(tv, unknown/bt709/iec61966-2-1, progressive), 7680x4320, q=2-31, 23.98 fps, 1k tbn
 Metadata:
 encoder : Lavc60.35.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
[png @ 00000231363c8880] inflate returned error -301:02.72 bitrate=698356.0kbits/s speed=0.171x
[vist#0:0/png @ 00000231363c16c0] Error submitting packet to decoder: Generic error in an external library
[png @ 00000231363c8880] inflate returned error -301:15.24 bitrate=679969.1kbits/s dup=1 drop=0 speed=0.172x
[vist#0:0/png @ 00000231363c16c0] Error submitting packet to decoder: Generic error in an external library3x
[png @ 00000231363f32c0] inflate returned error -301:16.65 bitrate=694583.2kbits/s dup=2 drop=0 speed=0.171x
[vist#0:0/png @ 00000231363c16c0] Error submitting packet to decoder: Generic error in an external library1x
[png @ 000002313646a100] inflate returned error -301:20.78 bitrate=742902.6kbits/s dup=3 drop=0 speed=0.167x
[vist#0:0/png @ 00000231363c16c0] Error submitting packet to decoder: Generic error in an external library6x
[png @ 000002313646ea00] inflate returned error -301:26.92 bitrate=839679.5kbits/s dup=4 drop=0 speed=0.159x
[vist#0:0/png @ 00000231363c16c0] Error submitting packet to decoder: Generic error in an external library8x
[png @ 00000231363cc740] inflate returned error -301:29.38 bitrate=874703.4kbits/s dup=5 drop=0 speed=0.156x
[vist#0:0/png @ 00000231363c16c0] Error submitting packet to decoder: Generic error in an external library6x
[out#0/matroska @ 00000231363a7200] video:9827779kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000442%
frame= 2208 fps=3.8 q=-1.0 Lsize= 9827822kB time=00:01:32.05 bitrate=874625.3kbits/s dup=6 drop=0 speed=0.158x



IMO the problem is zlib from libpng. But I don't have skills to recompile it with libspng that doesn't require zlib. Maybe there is a ffmpeg version without this error ?


-
node-fluent-ffmpeg conversion to mp3 does not fire any "end" or "finish" event
27 février 2024, par 1voyI am downloading a video using ytdl-core and converting it to mp3 using node-fluent-ffmpeg. It seems that the code after the ffmpeg conversion gets executed before the conversion finishes as trying to upload the .mp3 file to a Google Cloud Storage bucket throws an error. I am trying to detect 'end' or 'finish' events but none are being triggered.


Code :


ytdl(url?.toString() as string)
 .once('data', (data) => {
 console.log('start', data);
 })
 .on('progress', async function (progress, downloaded, total) {
 console.log(parseInt(((downloaded / total) * 100).toString()) + '%');
 
 })
 .on('finish', async function () {
 console.log('Download finished...');
 
 console.log('using ffmpeg to convert into mp3');
 Ffmpeg({ source: `/Users/user/project/server/output/${videoId}.mp4` })
 .setFfmpegPath(ffmpeg.path)
 .toFormat('mp3')
 .saveToFile(`/Users/user/project/server/output/${videoId}.mp3`)
 .on('finish', () => {
 console.log('finished conversion');
 });
 console.log('after ffmpeg mp3 conversion');

 const storage = new Storage({
 keyFilename: `./key.json`,
 });

 const bucketName = 'bucketname';
 const bucket = storage.bucket(bucketName);
 let mp3_url;
 console.log(
 fs.existsSync(`/Users/user/project/server/output/${videoId}.mp3`)
 ); // returns false
 bucket.upload(
 `/Users/user/project/server/output/${videoId}.mp3`,
// Error uploading: Error: ENOENT: no such file or directory, open '/Users/me/project/server/output/RMvenf7E-Dg.mp3'
 {
 destination: `${userId}/${videoId}.mp3`,
 },
 function (err, file) {
 if (err) {
 console.error(`Error uploading: ${err}`);
 } else {
 console.log(`mp3 uploaded to ${bucketName}.`);
 console.log(file?.publicUrl());
 }
 }
 );

 
 .pipe(
 fs.createWriteStream(`/Users/me/project/server/output/${videoId}.mp4`)
 );

 console.log('after download and conversion');

 req.on('close', async () => {
 res.end();
 });



Error uploading: Error: ENOENT: no such file or directory, open '/Users/polo/makeklips/server/output/RMvenf7E-Dg.mp3'
[1] /Users/me/project/server/node_modules/.pnpm/fluent-ffmpeg@2.1.2/node_modules/fluent-ffmpeg/lib/processor.js:182
[1] handleExit(new Error('ffmpeg exited with code ' + code));
[1] ^
[1] Error: ffmpeg exited with code 1: Output #0, mp3, to '/Users/me/project/server/output/RMvenf7E-Dg.mp3':
[1] Output file #0 does not contain any stream



-
FFmpeg "Non-monotonous DTS in output stream" error when processing video from Safari's MediaRecorder
17 juillet 2024, par HackermonI'm recording a video stream in Safari with
MediaRecorder
, then sending it to a remote server which then uses ffmpeg to reencode the video. When reencoding with FFmpeg, I get a lot of warnings and the final video is broken, frame are glitching and out of sync but the audio sounds fine.

Here's my MediaRecorder script :


const camera = await navigator.mediaDevices.getUserMedia({ audio: true, video: true });
const recorder = new MediaRecorder(camera, {
 mimeType: 'video/mp4', // Safari only supports MP4
 bitsPerSecond: 1_000_000,
});

recorder.ondataavailable = async ({ data: blob }) => {
 // open contents in new tab
 var fileURL = URL.createObjectURL(file);
 window.open(fileURL, '_blank');
};

recorder.start();
setTimeout(() => recorder.stop(), 5000);



I download the video blob from Safari and use this command to reencode it :


ffmpeg -i ./blob.mp4 -preset ultrafast -strict -2 -threads 10 -c copy ./output.mp4



Logs :


ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
 configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 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
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x559826616000] DTS 29 < 313 out of order
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './chunk1.mp4':
 Metadata:
 major_brand : iso5
 minor_version : 1
 compatible_brands: isomiso5hlsf
 creation_time : 2024-07-17T14:30:47.000000Z
 Duration: 00:00:01.00, start: 0.000000, bitrate: 3937 kb/s
 Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(progressive), 640x480 [SAR 1:1 DAR 4:3], 6218 kb/s, 33.36 fps, 600 tbr, 600 tbn, 1200 tbc (default)
 Metadata:
 creation_time : 2024-07-17T14:30:47.000000Z
 handler_name : Core Media Video
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 420 kb/s (default)
 Metadata:
 creation_time : 2024-07-17T14:30:47.000000Z
 handler_name : Core Media Audio
File './safari3.mp4' already exists. Overwrite ? [y/N] Output #0, mp4, to './safari3.mp4':
 Metadata:
 major_brand : iso5
 minor_version : 1
 compatible_brands: isomiso5hlsf
 encoder : Lavf58.29.100
 Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(progressive), 640x480 [SAR 1:1 DAR 4:3], q=2-31, 6218 kb/s, 33.36 fps, 600 tbr, 19200 tbn, 600 tbc (default)
 Metadata:
 creation_time : 2024-07-17T14:30:47.000000Z
 handler_name : Core Media Video
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 420 kb/s (default)
 Metadata:
 creation_time : 2024-07-17T14:30:47.000000Z
 handler_name : Core Media Audio
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x559826644340] Non-monotonous DTS in output stream 0:0; previous: 10016, current: 928; changing to 10017. This may result in incorrect timestamps in the output file.
[mp4 @ 0x559826644340] Non-monotonous DTS in output stream 0:0; previous: 10017, current: 1568; changing to 10018. This may result in incorrect timestamps in the output file.
[mp4 @ 0x559826644340] Non-monotonous DTS in output stream 0:0; previous: 10018, current: 2208; changing to 10019. This may result in incorrect timestamps in the output file.
...x100
frame= 126 fps=0.0 q=-1.0 Lsize= 479kB time=00:00:00.97 bitrate=4026.2kbits/s speed= 130x 
video:425kB audio:51kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.652696%



Not sure what's happening or how to fix it. This issue only happens in Safari, videos from Chrome are perfectly fine.


I've tried various flags :


-fflags +igndts
-bsf:a aac_adtstoasc
-c:v libvpx-vp9 -c:a libopus
etc



None of them seem to fix the issue.