Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (25)

  • Soumettre bugs et patchs

    10 avril 2011

    Un 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, par

    L’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, par

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

    &#xA;

    This code generate only one bitrate .m3u8 stream.

    &#xA;

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

    &#xA;

    Is any one have idea about this ?

    &#xA;

  • FFMPEG : Impossible to convert between the formats supported by the filter - Error reinitializing filters

    6 janvier 2021, par user1904038

    Trying to encode a mp4 file into HLS[.m3u8] using NVIDIA Cuda Using this command :

    &#xA;

    What i'm trying to do is to convert a 1080p video file into 4 renditions resolutions : 1080p 720p 480p 360p Bellow is the 720p example.

    &#xA;

    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&#xA;

    &#xA;

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

    &#xA;

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

    &#xA;

    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.

    &#xA;

    Also this is the output of ffmpeg -version

    &#xA;

    ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers&#xA;built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)&#xA;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=&#x27;-I/content/workspace/include -I/usr/local/cuda/include&#x27; --extra-ldflags=&#x27;-L/content/workspace/lib -L/usr/local/cuda/lib64&#x27; --extra-libs=&#x27;-lpthread -lm&#x27; --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&#xA;libavutil      56. 51.100 / 56. 51.100&#xA;libavcodec     58. 91.100 / 58. 91.100&#xA;libavformat    58. 45.100 / 58. 45.100&#xA;libavdevice    58. 10.100 / 58. 10.100&#xA;libavfilter     7. 85.100 /  7. 85.100&#xA;libswscale      5.  7.100 /  5.  7.100&#xA;libswresample   3.  7.100 /  3.  7.100&#xA;libpostproc    55.  7.100 / 55.  7.100&#xA;

    &#xA;

  • Trouble using ffmpeg in c# how to correctly format string to upscale videos ?

    30 décembre 2020, par user14527374

    So 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.

    &#xA;

    I think I must have a string format issue :

    &#xA;

    private void HD_Click(object sender, EventArgs e)&#xA;        {&#xA;            if (textBox1.Text == null)&#xA;            {&#xA;                MessageBox.Show("You&#x27;ve not selected your video file yet. Please do so before continuing, cheers.");&#xA;&#xA;            }&#xA;            else&#xA;            {&#xA;             &#xA;                    var originFilePath = textBox1.Text;&#xA;                    string name = Path.GetFileName(originFilePath);&#xA;                    byte[] bytes = null;&#xA;                    using (FileStream fileStream = new FileStream(originFilePath, FileMode.Open, FileAccess.Read))&#xA;                    {&#xA;                        using (MemoryStream ms = new MemoryStream())&#xA;                        {&#xA;                            fileStream.CopyTo(ms);&#xA;                            bytes = ms.ToArray();&#xA;                        }&#xA;&#xA;                        var localStoragePath = Path.Combine(Path.GetTempPath(), name);&#xA;                        var directoryPath = Path.GetDirectoryName(localStoragePath);&#xA;                        Directory.CreateDirectory(directoryPath);&#xA;                        File.WriteAllBytes(localStoragePath, bytes);&#xA;                        Console.WriteLine($"File copy successful: {File.Exists(localStoragePath)}");&#xA;                        var readBack = File.ReadAllBytes(localStoragePath);&#xA;                        Console.WriteLine($"Read file Back: {readBack.Length}, {localStoragePath}");&#xA;                    var resizedFolderPath = @"C:\upscaledvideohere";&#xA;                        Directory.CreateDirectory(resizedFolderPath);&#xA;                        var resizedFiePath = Path.Combine(resizedFolderPath, Path.GetFileName(localStoragePath));&#xA;&#xA;                        var psi = new ProcessStartInfo();&#xA;                        psi.FileName = @"C:\ffmpeg-2020-12-27-git-bff6fbead8-full_build\binffmpeg.exe";&#xA;                        psi.Arguments = $"-i \"{localStoragePath}\" -vf scale=1080 \"{resizedFiePath}\"";&#xA;                        psi.RedirectStandardOutput = false;&#xA;                        psi.RedirectStandardError = false;&#xA;                        psi.UseShellExecute = true;&#xA;                        Console.WriteLine($"Args: {psi.Arguments}");&#xA;&#xA;                        try&#xA;                        {&#xA;                            using (Process exeProcess = Process.Start(psi))&#xA;                            {&#xA;                                Console.WriteLine($"process started with processId: {exeProcess.Id}");&#xA;                                exeProcess.WaitForExit();&#xA;                                Console.WriteLine($"Exit Code: {exeProcess.ExitCode}");&#xA;                            }&#xA;                        }&#xA;                        catch (Exception ex)&#xA;                        {&#xA;                            Console.WriteLine(ex.StackTrace.ToString());&#xA;                            Console.WriteLine(ex.Message.ToString());&#xA;                            return;&#xA;                        }&#xA;                        Console.WriteLine($"process completed");&#xA;                        Console.WriteLine($"Temp Out Exists: {File.Exists(resizedFiePath)}");&#xA;                    }&#xA;&#xA;                    Console.ReadLine();&#xA;                }&#xA;            }&#xA;        &#xA;    &#xA;

    &#xA;

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

    &#xA;