Recherche avancée
Autres articles (102)
-
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 (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (10055)
-
FFMPEG : Impossible to convert between the formats supported by the filter - Error reinitializing filters
6 janvier 2021, par user1904038Trying to encode a mp4 file into HLS[.m3u8] using NVIDIA Cuda Using this command :


What i'm trying to do is to convert a 1080p video file into 4 renditions resolutions :
1080p720p480p360pBellow is the720pexample.

ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -vf scale=w=1280:h=720:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -b:a 128k -c:v h264_nvenc -profile:v main -crf 20 -g 48 -keyint_min 48 -sc_threshold 0 -b:v 2500k -maxrate 2675k -bufsize 3750k -hls_time 4 -hls_playlist_type vod -hls_segment_filename output/720p_%03d.ts output/720p.m3u8


But this is the error i get when i run the command


Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0


I think my issue is somewhere in the
-vf scale=w=1280:h=720:force_original_aspect_ratio=decreasecommand but not sure with what i can replace it since i need the scale function.

Also this is the output of
ffmpeg -version

ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-libnpp --enable-cuda-llvm --pkgconfigdir=/content/workspace/lib/pkgconfig --prefix=/content/workspace --pkg-config-flags=--static --extra-cflags='-I/content/workspace/include -I/usr/local/cuda/include' --extra-ldflags='-L/content/workspace/lib -L/usr/local/cuda/lib64' --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libvidstab --enable-libaom --enable-libsrt
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100


-
ffmpeg-python multiple outputs at different resolutions
3 janvier 2021, par Darius MandresI am using
ffmpeg-pythonto convert.mp4files to HLS streamable formats. Currently I can get it to work at full resolution using this piece of code

video = ffmpeg.input(file_path)
output = ffmpeg.output(
 video,
 filename=f"{base_path}{uuid}.m3u8",
 format="hls",
 start_number=0,
 hls_time=10,
 hls_list_size=0
)

output.run()


If the original video is
1920x1080the resulting.tsfiles will be of the same resolution. What do I have to do to get multiple resolutions ? Say360p480p,720p?

And how does
ffmpeghandle a resolution when the original is smaller ? Say I try to convert a480pvideo to a resolution of720p?

-
How to create mp4 to multi bitrate hls(.m3u8) Stream With fluent-ffmpeg
6 janvier 2023, par Vinay Vadachhakffmpeg -hide_banner -y -i beach.mkv \
 -vf scale=w=640:h=360:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 800k -maxrate 856k -bufsize 1200k -b:a 96k -hls_segment_filename beach/360p_%03d.ts beach/360p.m3u8 \
 -vf scale=w=842:h=480:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 1400k -maxrate 1498k -bufsize 2100k -b:a 128k -hls_segment_filename beach/480p_%03d.ts beach/480p.m3u8 \
 -vf scale=w=1280:h=720:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 2800k -maxrate 2996k -bufsize 4200k -b:a 128k -hls_segment_filename beach/720p_%03d.ts beach/720p.m3u8 \
 -vf scale=w=1920:h=1080:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 5000k -maxrate 5350k -bufsize 7500k -b:a 192k -hls_segment_filename beach/1080p_%03d.ts beach/1080p.m3u8


Convert this command to fluent-ffmpeg node js :


My Code :


let ffmpeg = require('fluent-ffmpeg');
new ffmpeg()
 .addInput('./public/class.mp4')
 .outputOptions([
 '-map 0:v',
 '-map 0:v',
 '-map 0:a',
 '-map 0:a',
 '-s:v:0 426x240',
 '-c:v:0 libx264',
 '-b:v:0 400k',
 '-c:a:0 aac',
 '-b:a:0 64k',
 '-s:v:1 640x360',
 '-c:v:1 libx264',
 '-b:v:1 700k',
 '-c:a:1 aac',
 '-b:a:1 96k',
 //'-var_stream_map', '"v:0,a:0 v:1,a:1"',
 '-master_pl_name playlist.m3u8',
 '-f hls',
 '-max_muxing_queue_size 1024',
 '-hls_time 4',
 '-hls_playlist_type vod',
 '-hls_list_size 0',
 '-hls_segment_filename ./public/output/v%v/segment%03d.ts'
 ])
 .output('./public/output/v%v/master.m3u8')
 .on('start', function (commandLine) {
 console.log('Spawned Ffmpeg with command: ' + commandLine);
 res.write('<p>' + commandLine + '</p>');
 })
 .on('error', function (err, stdout, stderr) {
 console.error('An error occurred: ' + err.message, err, stderr);
 res.write('<p>' + err.message + '</p>');
 })
 .on('progress', function (progress) {
 console.log('Processing: ' + progress.percent + '% done');
 console.log(progress);
 /*percent = progress.percent;
 res.write('<h1>' + percent + '</h1>');*/
 })
 .on('end', function (err, stdout, stderr) {
 console.log('Finished processing!' /*, err, stdout, stderr*/);
 res.write('Finished processing!');
 })
 .run();


This code generate only one bitrate .m3u8 stream.


I have tried many ways to generate multi bitrate hls stream through node js but always generate single bitrate.
i have tried bash command and that was work fine, now i want to convert this command to nodejs script.


Is any one have idea about this ?