
Recherche avancée
Médias (1)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
Autres articles (51)
-
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 (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (8888)
-
How can we use ffmpeg or fluent-ffmpeg with angular cli ?
25 juillet 2019, par Nileshdeora1122How to use ffmpeg with angular2+ application ?
im tring to use ffmpeg inside my angular application but it is throwing some error during importing ffmpeg in angular like this :
// import * as ffmpeg from 'fluent-ffmpeg';
but getting errors like this :
ERROR in ./node_modules/fluent-ffmpeg/lib/ffprobe.js
Module not found: Error: Can't resolve 'child_process' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib'
ERROR in ./node_modules/fluent-ffmpeg/lib/utils.js
Module not found: Error: Can't resolve 'child_process' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib'
ERROR in ./node_modules/fluent-ffmpeg/lib/processor.js
Module not found: Error: Can't resolve 'child_process' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib'
ERROR in ./node_modules/fluent-ffmpeg/lib/processor.js
Module not found: Error: Can't resolve 'fs' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib'
ERROR in ./node_modules/fluent-ffmpeg/lib/capabilities.js
Module not found: Error: Can't resolve 'fs' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib'
ERROR in ./node_modules/fluent-ffmpeg/lib/recipes.js
Module not found: Error: Can't resolve 'fs' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib'
ERROR in ./node_modules/isexe/mode.js
Module not found: Error: Can't resolve 'fs' in '/home/pfacode1/angularApplication/careerfable2/node_modules/isexe'
ERROR in ./node_modules/isexe/windows.js
Module not found: Error: Can't resolve 'fs' in '/home/pfacode1/angularApplication/careerfable2/node_modules/isexe'
ERROR in ./node_modules/isexe/index.js
Module not found: Error: Can't resolve 'fs' in '/home/pfacode1/angularApplication/careerfable2/node_modules/isexe'
ERROR in ./node_modules/fluent-ffmpeg/lib/utils.js
Module not found: Error: Can't resolve 'os' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib'
ERROR in ./node_modules/fluent-ffmpeg/lib/recipes.js
Module not found: Error: Can't resolve 'path' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib'
ERROR in ./node_modules/fluent-ffmpeg/lib/processor.js
Module not found: Error: Can't resolve 'path' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib'
ERROR in ./node_modules/fluent-ffmpeg/lib/capabilities.js
Module not found: Error: Can't resolve 'path' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib'
ERROR in ./node_modules/fluent-ffmpeg/lib/fluent-ffmpeg.js
Module not found: Error: Can't resolve 'path' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib'
ERROR in ./node_modules/fluent-ffmpeg/lib/options/misc.js
Module not found: Error: Can't resolve 'path' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib/options'
ERROR in ./node_modules/which/which.js
Module not found: Error: Can't resolve 'path' in '/home/pfacode1/angularApplication/careerfable2/node_modules/which'
ERROR in ./node_modules/fluent-ffmpeg/lib/recipes.js
Module not found: Error: Can't resolve 'stream' in '/home/pfacode1/angularApplication/careerfable2/node_modules/fluent-ffmpeg/lib' -
FFMPEG loudnorm filter does not work in combination with silenceremove filter
12 mai 2021, par MareikePI want to consistently normalize audio files for TTS model training. The output audio files should meet the following criteria :


- 

- mono channel
- sample rate of 22050 Hz
- wav format
- no silence at beginning and end of audio clip
- volume of -24 dB












I have already fulfilled the first 4 criteria. So far, it works properly.


Normalizing the volume basically works as well with this ffmpeg command
-af loudnorm=I=-24:LRA=11:TP=-1.5
, but not in combination with the silence removal : As soon as I remove silence with this ffmpeg commandagate=threshold=0.045:attack=0.5:release=500:ratio=5000,silenceremove=start_periods=1:start_threshold=0.0075,areverse,silenceremove=start_periods=1:start_threshold=0.0075,areverse
, the loudness normalization does not work any longer : the output volume now varies between -25dB and -32dB instead of the desired -24 dB.

This is the complete ffmpeg command I used :


ffmpeg -i filename.flac -ac 1 -af agate=threshold=0.045:attack=0.5:release=500:ratio=5000,silenceremove=start_periods=1:start_threshold=0.0075,areverse,silenceremove=start_periods=1:start_threshold=0.0075,areverse,loudnorm=I=-24:LRA=11:TP=-1.5,aresample=22050 -y -hide_banner filename.wav



And this is the piece of code that I'm using to run it :


import os

INPUT_DIR = '/home/username/all_data'
OUTPUT_DIR = '/home/username/normalized_data'
for filename in os.listdir(INPUT_DIR):
 wav_filename = filename[:-5] + '.wav'
 command = (f'ffmpeg -i {INPUT_DIR}/{filename} -ac 1 -af agate='
 f'threshold=0.045:attack=0.5:release=500:ratio=5000,'
 f'silenceremove=start_periods=1:start_threshold=0.0075,'
 f'areverse,silenceremove=start_periods=1:start_threshold='
 f'0.0075,areverse,loudnorm=I=-24:LRA=11:TP=-1.5,aresample'
 f'=22050 -y -hide_banner {OUTPUT_DIR}/{wav_filename}')
 os.system(command)



EDIT :


A complete log from the ffmpeg command can be seen here :


username@pop-os:~$ ffmpeg -i /home/username/audios/filename.flac -ac 1 -af agate=threshold=0.045:attack=0.5:release=500:ratio=5000,silenceremove=start_periods=1:start_threshold=0.0075,areverse,silenceremove=start_periods=1:start_threshold=0.0075,areverse,loudnorm=I=-24:LRA=11:TP=-1.5,aresample=22050 /home/username/result.wav
ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
 configuration: --prefix=/usr --extra-version=1ubuntu0.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
Input #0, flac, from '/home/mareike/tts_data/save/audios_flac/0a6c8520-7536-11eb-8338-b7015f354987.flac':
 Duration: 00:00:04.64, start: 0.000000, bitrate: 1090 kb/s
 Stream #0:0: Audio: flac, 44100 Hz, stereo, s32 (24 bit)
Stream mapping:
 Stream #0:0 -> #0:0 (flac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '/home/mareike/result_0a6c8520-7536-11eb-8338-b7015f354987.wav':
 Metadata:
 ISFT : Lavf58.29.100
 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16, 352 kb/s
 Metadata:
 encoder : Lavc58.54.100 pcm_s16le
size= 138kB time=00:00:03.19 bitrate= 353.0kbits/s speed=14.3x 
video:0kB audio:138kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.055375%



Can anyone tell me what I'm doing wrong and how I can finally get the volume normalized to -24 dB (in combination with silence removal) ? Any help is appreciated, thank you very much !


-
FFmpeg error m4v to flv requested bitrate is too low
20 décembre 2012, par Pradeep SinghFFMPEG OUTPUT
COMMAND
/usr/local/bin/ffmpeg -i '/home/machine/public_html/video_1355531272.m4v' -s '640x480' -sameq -ab '64k' -ar '44100' -f 'flv' -pass '1' -passlogfile '/home/machine/public_html/tmp/1355531273-50cbc4090d696-multipass' -y /home/machine/public_html/tmp/1355531273-50cbc4090d2a9.flv &> /home/machine/public_html/tmp/1355531273-50cbc4090da7c.info
/usr/local/bin/ffmpeg -i '/home/machine/public_html/video_1355531272.m4v' -s '640x480' -sameq -ab '64k' -ar '44100' -f 'flv' -pass '2' -passlogfile '/home/machine/public_html/tmp/1355531273-50cbc4090d696-multipass' -y /home/machine/public_html/tmp/1355531273-50cbc4090d2a9.flv &> /home/machine/public_html/tmp/1355531273-50cbc4090da7c.info
eng): Video: h264, yuv420p, 960x540, 3428 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 5994 tbc
Metadata:
creation_time : 2012-12-14 22:50:55
Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16, 111 kb/s
Metadata:
creation_time : 2012-12-14 22:50:55
[buffer @ 0xdd079d0] w:960 h:540 pixfmt:yuv420p
[scale @ 0xdd07da0] w:960 h:540 fmt:yuv420p -> w:640 h:480 fmt:yuv420p flags:0xa0000004
[flv @ 0xdd041c0] requested bitrate is too low
Output #0, flv, to '/home/machine/public_html/tmp/1355531273-50cbc4090d2a9.flv':
Stream #0.0(eng): Video: flv, yuv420p, 640x480, q=2-31, pass 2, 200 kb/s, 90k tbn, 29.97 tbc
Metadata:
creation_time : 2012-12-14 22:50:55
Stream #0.1(eng): Audio: adpcm_swf, 44100 Hz, stereo, s16, 64 kb/s
Metadata:
creation_time : 2012-12-14 22:50:55
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
-------------------------------
RESULT
-------------------------------
Execute error. Output for file "/home/machine/public_html/video_1355531272.m4v" was found, but the file contained no data. Please check the available codecs compiled with FFmpeg can support this type of conversion. You can check the encode decode availability by inspecting the output array from PHPVideoToolkit::getFFmpegInfo().