
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (106)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...) -
Amélioration de la version de base
13 septembre 2013Jolie 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 (...)
Sur d’autres sites (7907)
-
Node 18 or Node 20 break ffmpeg (in google cloud functions -> ffprobe was killed with signal SIGSEGV)
10 janvier 2024, par user20206929Please see below, the code is working on node js 16, but not when upgrading to node 18 or 20.


const ffmpeg = require("fluent-ffmpeg");

// Following is inside a .https.onRequest Google Cloud function with enough memory

try {
 const duration = new Promise((resolve, reject) => {
 ffmpeg.ffprobe(videoUrl, async (err, metadata) => {
 if (err) {
 if (res.headersSent) {
 console.error("Response already sent");
 return;
 } else {
 console.log("Metadata:", metadata);
 console.log("err: " + err);
 res.status(400).send("Error getting video metadata");
 return;
 }
 }
 const duration = metadata.format.duration;
 console.log("video duration in second: " + duration);
 resolve(duration);
 });
});
 videoDuration = await duration;
} catch (err) {
 console.log(err);
 throw err;
}



When upgrading to node 18/20 (No other change than upgrading node), the error "ffprobe not found" appears.


But setting the path manually using ffmpeg.setFfprobePath(ffprobePath) ;
trigger the error : Error : ffprobe was killed with signal SIGSEGV


So it seem its a permissions issue.


However, I tried a lot of different solutions, none of them made this work.
For instance i tried to download manually the ffprobe from the official website https://ffbinaries.com/downloads. Then manually add it to the code.


I tried to use https://www.npmjs.com/package/@ffprobe-installer/ffprobe or others package like https://www.npmjs.com/package/ffprobe-static


I also tried to download the ffprobe file to the temporary folder of google cloud, and change the permission of this folder.


All of those was doing the same error.


None of what i could think of made any difference.


Please help because i need to update node 16 to 18 or 20 before google remove node 16 on january 31 2024 and for now i don't see a solution.


I also looked for other solution to get this duration from a video file url, but using ffmpeg seem to be the only one that should work out of the box. As it is working on node 16.


Thank you,


UPDATE - 11/26/2023


GCP Functions NodeJS 16 runtime uses Ubuntu 18.04 with FFMpeg installed.
NodeJS 18/20 use Ubuntu 22.04, and Google decided not to include FFMpeg.


https://cloud.google.com/functions/docs/runtime-support#node.js
https://cloud.google.com/functions/docs/reference/system-packages


No workaround or solutions found as of now


UPDATE - 01/10/2024


Google added back ffmpeg to latest version, this is working as before now.


-
ffmpeg ignores set bitrate
13 mars 2023, par col__panicI have a folder of h264 files I am trying to convert to hevc with a lower bitrate set with -b:v flag. For context I am using python running in a Docker container. The issue is that when ffmpeg completes, the output bitrate is extremely low.


As you can see from the ffmpeg command below, I am expecting around 900k bitrate. But as the command runs, it shows around 18k bitrate.


ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i /tmp/input.ts -an -c:v hevc_nvenc -b:v 914k -b_ref_mode 0 -tag:v hvc1 /tmp/output.mp4 
ffmpeg version N-109685-gac37b2c2b1 Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
 configuration: --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
 libavutil 57. 44.100 / 57. 44.100
 libavcodec 59. 58.100 / 59. 58.100
 libavformat 59. 36.100 / 59. 36.100
 libavdevice 59. 8.101 / 59. 8.101
 libavfilter 8. 54.100 / 8. 54.100
 libswscale 6. 8.112 / 6. 8.112
 libswresample 4. 9.100 / 4. 9.100
-vsync is deprecated. Use -fps_mode
Passing a number to -vsync is deprecated, use a string argument as described in the manual.
Input #0, mpegts, from '/tmp/input.ts':
 Duration: 01:04:53.85, start: 85937.219044, bitrate: 2613 kb/s
 Program 1 
 Stream #0:0[0x101]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720, 90k tbr, 90k tbn
 Stream #0:1[0x202]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 130 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_nvenc))
Press [q] to stop, [?] for help
Output #0, mp4, to '/tmp/output.mp4':
 Metadata:
 encoder : Lavf59.36.100
 Stream #0:0: Video: hevc (Main) (hvc1 / 0x31637668), cuda(progressive), 1280x720, q=2-31, 914 kb/s, 90k fps, 90k tbn
 Metadata:
 encoder : Lavc59.58.100 hevc_nvenc
 Side data:
 cpb: bitrate max/min/avg: 0/0/914000 buffer size: 1828000 vbv_delay: N/A
frame=113118 fps=412 q=49.0 Lsize= 8925kB time=01:04:53.82 bitrate= 18.8kbits/s speed=14.2x 
video:8215kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.636624%



And then checking the output shows that it is around 18kb/s.


ffmpeg -i /tmp/output.mp4 
...
 Duration: 01:04:53.82, start: 0.000000, bitrate: 18 kb/s



For reference the input file is 2600kb/s.


ffmpeg -i /tmp/input.ts 
...
 Duration: 01:04:53.85, start: 85937.219044, bitrate: 2613 kb/s




This seems like an issue with the file itself, given that I have run the same command and had it work. Also note that even when I leave out the -b:v flag, the output is about the same.


I have tried setting -minrate:v -maxrate:v -bufsize:v and -ss 00:00:00 flags as well and they did not help.


Also there was another post that mentioned the audio track being an issue and to rule that out, I tried using -an and that didn't help either.


I saw another post that mentioned the order of the parameters being an issue but I don't think that's the issue because this same command has run successfully on other input files.


Any ideas ?


EDIT :
nvm fixed it


-
ffmpeg mp3 chunk to wav chunk adds gap in the start of the audio
13 décembre 2023, par 1MayurI have an mp3 streaming from a URL, I save the chunks in 1024 byes buffer size.
After I get all the chunks, I'm using
ffmpeg
to convert the incoming mp3 chunk (22050 mono) to a wav chunk.

When I open/play the wav chunk I see that there is an empty gap at the start of every chunk.


here is the code I'm running in Python subprocess in a loop for all the saved chunks


subprocess.run(["ffmpeg", "-i",
 f"{Path.cwd()}/input/{path}",
 f"{Path.cwd()}/temp_output/{path.replace('.mp3', '')}.wav"
])



here is the output in the terminal


processing: test-016.mp3
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
 built with Apple clang version 15.0.0 (clang-1500.0.40.1)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/6.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libjxl --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
 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
[mp3 @ 0x7fd48e104480] Format mp3 detected only with low score of 25, misdetection possible!
[mp3 @ 0x7fd48e104480] Skipping 463 bytes of junk at 0.
[mp3 @ 0x7fd48e104480] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '/Users/mayur/Projects/input/test-016.mp3':
 Duration: 00:00:00.39, start: 0.000000, bitrate: 169 kb/s
 Stream #0:0: Audio: mp3, 22050 Hz, mono, fltp, 160 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '/Users/mayur/Projects/temp_output/test-016.wav':
 Metadata:
 ISFT : Lavf60.3.100
 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16, 352 kb/s
 Metadata:
 encoder : Lavc60.3.100 pcm_s16le
size= 17kB time=00:00:00.36 bitrate= 379.7kbits/s speed= 253x 
video:0kB audio:17kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.451389%



I tried the pydub as well and faced similar issue.