Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (50)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (9268)
-
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 ?