
Recherche avancée
Médias (3)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (25)
-
Soumettre bugs et patchs
10 avril 2011Un logiciel n’est malheureusement jamais parfait...
Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
Si vous pensez avoir résolu vous même le bug (...) -
Installation en mode standalone
4 février 2011, parL’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
[mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...) -
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 ;
Sur d’autres sites (6294)
-
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 ?


-
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 :
1080p
720p
480p
360p
Bellow is the720p
example.

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=decrease
command 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



-
Trouble using ffmpeg in c# how to correctly format string to upscale videos ?
30 décembre 2020, par user14527374So I am writing an app in c# to upscale videos to a certain resolution. It uses ffmpeg to do this. What happens is after selecting the video file, and clicking 1080p it creates the directory folder but does not actually write the upscaled video to it.


I think I must have a string format issue :


private void HD_Click(object sender, EventArgs e)
 {
 if (textBox1.Text == null)
 {
 MessageBox.Show("You've not selected your video file yet. Please do so before continuing, cheers.");

 }
 else
 {
 
 var originFilePath = textBox1.Text;
 string name = Path.GetFileName(originFilePath);
 byte[] bytes = null;
 using (FileStream fileStream = new FileStream(originFilePath, FileMode.Open, FileAccess.Read))
 {
 using (MemoryStream ms = new MemoryStream())
 {
 fileStream.CopyTo(ms);
 bytes = ms.ToArray();
 }

 var localStoragePath = Path.Combine(Path.GetTempPath(), name);
 var directoryPath = Path.GetDirectoryName(localStoragePath);
 Directory.CreateDirectory(directoryPath);
 File.WriteAllBytes(localStoragePath, bytes);
 Console.WriteLine($"File copy successful: {File.Exists(localStoragePath)}");
 var readBack = File.ReadAllBytes(localStoragePath);
 Console.WriteLine($"Read file Back: {readBack.Length}, {localStoragePath}");
 var resizedFolderPath = @"C:\upscaledvideohere";
 Directory.CreateDirectory(resizedFolderPath);
 var resizedFiePath = Path.Combine(resizedFolderPath, Path.GetFileName(localStoragePath));

 var psi = new ProcessStartInfo();
 psi.FileName = @"C:\ffmpeg-2020-12-27-git-bff6fbead8-full_build\binffmpeg.exe";
 psi.Arguments = $"-i \"{localStoragePath}\" -vf scale=1080 \"{resizedFiePath}\"";
 psi.RedirectStandardOutput = false;
 psi.RedirectStandardError = false;
 psi.UseShellExecute = true;
 Console.WriteLine($"Args: {psi.Arguments}");

 try
 {
 using (Process exeProcess = Process.Start(psi))
 {
 Console.WriteLine($"process started with processId: {exeProcess.Id}");
 exeProcess.WaitForExit();
 Console.WriteLine($"Exit Code: {exeProcess.ExitCode}");
 }
 }
 catch (Exception ex)
 {
 Console.WriteLine(ex.StackTrace.ToString());
 Console.WriteLine(ex.Message.ToString());
 return;
 }
 Console.WriteLine($"process completed");
 Console.WriteLine($"Temp Out Exists: {File.Exists(resizedFiePath)}");
 }

 Console.ReadLine();
 }
 }
 
 



I am wondering where the string format error could be ? Thank you.