Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (86)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (11909)

  • avformat/rcwtdec : add RCWT Closed Captions demuxer

    2 avril 2024, par Marth64
    avformat/rcwtdec : add RCWT Closed Captions demuxer
    

    RCWT (Raw Captions With Time) is a format native to ccextractor,
    a commonly used OSS tool for processing 608/708 Closed Captions (CC).
    RCWT can be used to archive the original extracted CC bitstream.
    The muxer was added in January 2024. In this commit, add the demuxer.

    One can now demux RCWT files for rendering in ccaption_dec or interop
    with ccextractor (which produces RCWT). Using the muxer/demuxer combo,
    the CC bits can be kept for processing or rendering with either tool.
    This can be an effective way to backup an original CC stream, including
    format extensions like EIA-708 and overall original presentation.

    Signed-off-by : Marth64 <marth64@proxyid.net>

    • [DH] Changelog
    • [DH] doc/demuxers.texi
    • [DH] libavformat/Makefile
    • [DH] libavformat/allformats.c
    • [DH] libavformat/rcwtdec.c
  • How can I remove every nth frame from raw video using ffmpeg ?

    15 juin 2024, par DaveB44

    Question moved to SuperUser, please reply there

    &#xA;

    I have many cine films that have been digitally converted. They have been converted as a 25 fps with 2 frames in every 23 duplicated. I need to remove the duplicated frames using a bitstream filter so there is no decoding/encoding.

    &#xA;

    After removing the frames I will change to the original cine frame rate of 18 fps. I will then change the frame rate to 25 fps using duplicated frames. I don't want to interpolate as I want to preserve the jerky format of the cine. Finally I will video editing software that will do the final encoding.

    &#xA;

    All the additional steps will cause several stages of decoding/encoding, that I need to avoid.

    &#xA;

    First I used a combination of the answers to FFmpeg remove video frames at specific intervals and FFmpeg remove every 6th frame starting from the 3rd frame, on an mp4 file to check it works. I modified it to remove every 4th and 17th frame in 25.

    &#xA;

    ffmpeg -loglevel warning -i cine.mp4 -an -vf "select=&#x27;if((mod(n-4,25)),(mod(n-17,25)))&#x27;,setpts=&#x27;N/FRAME_RATE/TB&#x27;" cine-23.mp4&#xA;

    &#xA;

    This works fine, but I end up with a file a quarter the size.

    &#xA;

    I now used Gyan's answer in Using ffmpeg to change framerate to extract the raw bitstream.

    &#xA;

    ffmpeg -loglevel warning -i cine.mp4 -c copy -f h264 cine.h264&#xA;

    &#xA;

    This created the h264 file as expected, surprisingly it was 16 kB smaller than the original (67 GB file size).

    &#xA;

    I then modified the code to use the .h264 file.

    &#xA;

    ffmpeg -loglevel warning -i cine.h264 -vf "select=&#x27;if((mod(n-4,25)),(mod(n-17,25)))&#x27;,setpts=&#x27;N/FRAME_RATE/TB&#x27;" cine-23.h264&#xA;

    &#xA;

    This gave the following error, but created the cine-23.h264 file although it was the same size as cine-23.mp4 in the test above

    &#xA;

    [h264 @ 00000245ec0bfb80] non-existing SPS 0 referenced in buffering period&#xA;    Last message repeated 1 times&#xA;

    &#xA;

    I then checked the ffmpeg bitstream filter documentation and found the bitstream filter setts. I changed my code to the following.

    &#xA;

    ffmpeg -loglevel warning -i cine.h264 -bsf:v "select=&#x27;if((mod(n-4,25)),(mod(n-17,25)))&#x27;,setts=pts=&#x27;N/FRAME_RATE/TB&#x27;" cine-23.h264&#xA;

    &#xA;

    Which resulted in the following error.

    &#xA;

    [vost#0:0/libx264 @ 000002916cf173c0] Error parsing bitstream filter sequence &#x27;select=&#x27;if((mod(n-4,25)),(mod(n-17,25)))&#x27;,setts=pts=&#x27;N/FRAME_RATE/TB&#x27;&#x27;: Bitstream filter not found&#xA;Error opening output file cine-23.h264.&#xA;Error opening output files: Bitstream filter not found&#xA;

    &#xA;

    I'm assuming the error is because setts does not support select. Is there another way to achieve what I am looking for ?

    &#xA;

    I could use mpdecimate but as that has to compare each frame it is much slower than defining it only needs to delete frames 4 and 17 in every second.

    &#xA;

    This is the output of ffprobe on my original file.

    &#xA;

    ffprobe version 2023-11-28-git-47e214245b-full_build-www.gyan.dev Copyright (c) 2007-2023 the FFmpeg developers&#xA;  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;  libavutil      58. 32.100 / 58. 32.100&#xA;  libavcodec     60. 35.100 / 60. 35.100&#xA;  libavformat    60. 18.100 / 60. 18.100&#xA;  libavdevice    60.  4.100 / 60.  4.100&#xA;  libavfilter     9. 14.100 /  9. 14.100&#xA;  libswscale      7.  6.100 /  7.  6.100&#xA;  libswresample   4. 13.100 /  4. 13.100&#xA;  libpostproc    57.  4.100 / 57.  4.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;cine.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 19529864&#xA;    compatible_brands: mp42isom&#xA;    creation_time   : 2024-02-19T21:01:10.000000Z&#xA;  Duration: 00:01:00.00, start: 0.000000, bitrate: 9245 kb/s&#xA;  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 720x576 [SAR 35:32 DAR 175:128], 9243 kb/s, 25 fps, 25 tbr, 25 tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2024-02-19T21:01:10.000000Z&#xA;      handler_name    : Video Media Handler&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : AVC Coding&#xA;

    &#xA;

  • Struggling to add subtitles to a video using FFMPEG and C#

    19 mars 2024, par MattHodson

    I'm trying to add subtitles to my videos, 100% with code using FFMPEG and C#.

    &#xA;

    But I'm getting the following error :

    &#xA;

    &#xA;

    ffmpeg version 2024-02-04-git-7375a6ca7b-essentials_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers&#xA;built with gcc 12.2.0 (Rev10, Built by MSYS2 project)&#xA;configuration : —enable-gpl —enable-version3 —enable-static —pkg-config=pkgconf —disable-w32threads —disable-autodetect —enable-fontconfig —enable-iconv —enable-gnutls —enable-libxml2 —enable-gmp —enable-bzlib —enable-lzma —enable-zlib —enable-libsrt —enable-libssh —enable-libzmq —enable-avisynth —enable-sdl2 —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxvid —enable-libaom —enable-libopenjpeg —enable-libvpx —enable-mediafoundation —enable-libass —enable-libfreetype —enable-libfribidi —enable-libharfbuzz —enable-libvidstab —enable-libvmaf —enable-libzimg —enable-amf —enable-cuda-llvm —enable-cuvid —enable-ffnvcodec —enable-nvdec —enable-nvenc —enable-dxva2 —enable-d3d11va —enable-libvpl —enable-libgme —enable-libopenmpt —enable-libopencore-amrwb —enable-libmp3lame —enable-libtheora —enable-libvo-amrwbenc —enable-libgsm —enable-libopencore-amrnb —enable-libopus —enable-libspeex —enable-libvorbis —enable-librubberband&#xA;libavutil 58. 36.101 / 58. 36.101&#xA;libavcodec 60. 38.100 / 60. 38.100&#xA;libavformat 60. 20.100 / 60. 20.100&#xA;libavdevice 60. 4.100 / 60. 4.100&#xA;libavfilter 9. 17.100 / 9. 17.100&#xA;libswscale 7. 6.100 / 7. 6.100&#xA;libswresample 4. 13.100 / 4. 13.100&#xA;libpostproc 57. 4.100 / 57. 4.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C :\Users\Gamer\source\repos\XXXX\bin\Debug\net8.0\ce31c8ab-4b53-44e8-9e25-d02ba5466144\output.mp4' :&#xA;Metadata :&#xA;major_brand : isom&#xA;minor_version : 512&#xA;compatible_brands : isomiso2avc1mp41&#xA;encoder : Lavf60.20.100&#xA;Duration : 00:03:18.84, start : 0.000000, bitrate : 101 kb/s&#xA;Stream #0:00x1 : Video : h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1024x1792, 26 kb/s, 1 fps, 1 tbr, 16384 tbn (default)&#xA;Metadata :&#xA;handler_name : VideoHandler&#xA;vendor_id : [0][0][0][0]&#xA;encoder : Lavc60.38.100 libx264&#xA;Stream #0:10x2 : Audio : aac (LC) (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 74 kb/s (default)&#xA;Metadata :&#xA;handler_name : SoundHandler&#xA;vendor_id : [0][0][0][0]&#xA;[Parsed_subtitles_0 @ 000001a87404e3c0] Unable to parse option value "UsersGamersourcereposXXXXbinDebugnet8.0ce31c8ab-4b53-44e8-9e25-d02ba5466144output.srt" as image size&#xA;Error applying option 'original_size' to filter 'subtitles' : Invalid argument&#xA;[vost#0:0/libx264 @ 000001a874064a40] Error initializing a simple filtergraph&#xA;Error opening output file C :\Users\Gamer\source\repos\XXXX\bin\Debug\net8.0\ce31c8ab-4b53-44e8-9e25-d02ba5466144\videoWithSubtitles.mp4.&#xA;Error opening output files : Invalid argument

    &#xA;

    &#xA;

    It seems to be something related to paths, but I have tried EVERYTHING in my knowledge to fix this, still no luck... spent the majority of the day on it, no luck... so StackOverflow here I come !

    &#xA;

    My code :

    &#xA;

       public static async Task AddSubtitlesToVideoAsync(string videoPath, string subtitlesPath, string outputPath)&#xA;    {&#xA;        if (File.Exists(videoPath) &amp;&amp; File.Exists(subtitlesPath))&#xA;        {&#xA;            //string subtitlesPathForwardSlashes = subtitlesPath.Replace("\\", "/");&#xA;            //string ffmpegCommand = $"-i \"{videoPath}\" -filter_complex \"subtitles=&#x27;{subtitlesPathForwardSlashes}&#x27;\" \"{outputPath}\"";&#xA;            //string ffmpegCommand = $"-i \"{videoPath}\" -vf subtitles={subtitlesPathForwardSlashes} \"{outputPath}\"";&#xA;            //string ffmpegCommand = $"-i \"{videoPath}\" -vf subtitles=\"{subtitlesPath}\" \"{outputPath}\"";&#xA;            string subtitlesPathEscaped = subtitlesPath.Replace("\\", "\\\\");&#xA;            string ffmpegCommand = $"-i \"{videoPath}\" -vf subtitles=\"{subtitlesPathEscaped}\" \"{outputPath}\"";&#xA;&#xA;&#xA;            //output    -i C:\Users\Gamer\source\repos\XXXX\bin\Debug\net8.0\d745a08d-b932-47ac-a81c-45e9483590a7\output.mp4 -vf subtitles="C:/Users/Gamer/source/repos/XXXX/bin/Debug/net8.0/d745a08d-b932-47ac-a81c-45e9483590a7/generatedSubtitles.srt" C:\Users\Gamer\source\repos\XXXX\bin\Debug\net8.0\d745a08d-b932-47ac-a81c-45e9483590a7\videoWithSubtitles.mp4&#xA;            await ExecuteSubtitleCommandAsync(ffmpegCommand);&#xA;        }&#xA;        else&#xA;        {&#xA;            Console.WriteLine("Files can&#x27;t be found.");&#xA;        }&#xA;    }&#xA;&#xA;    public static async Task ExecuteSubtitleCommandAsync(string arguments)&#xA;    {&#xA;        string ffmpegExecutablePath = ffmpegRoot;&#xA;        var startInfo = new ProcessStartInfo(ffmpegExecutablePath, arguments)&#xA;        {&#xA;            CreateNoWindow = true,&#xA;            UseShellExecute = false,&#xA;            RedirectStandardOutput = true,&#xA;            RedirectStandardError = true&#xA;        };&#xA;&#xA;        using (var process = new Process { StartInfo = startInfo })&#xA;        {&#xA;            process.EnableRaisingEvents = true; // Enable the Exited event.&#xA;            process.Exited &#x2B;= (sender, e) =>&#xA;            {&#xA;                Console.WriteLine($"FFmpeg process exited with code {process.ExitCode}.");&#xA;            };&#xA;&#xA;            try&#xA;            {&#xA;                process.Start();&#xA;                // Asynchronously read the standard output and standard error of the process&#xA;                var outputTask = process.StandardOutput.ReadToEndAsync();&#xA;                var errorTask = process.StandardError.ReadToEndAsync();&#xA;                // Wait for both asynchronous tasks to complete&#xA;                await Task.WhenAll(outputTask, errorTask);&#xA;&#xA;                var output = await outputTask;&#xA;                var error = await errorTask;&#xA;&#xA;                if (!string.IsNullOrEmpty(error))&#xA;                {&#xA;                    Console.WriteLine("FFmpeg error: " &#x2B; error);&#xA;                }&#xA;                else&#xA;                {&#xA;                    Console.WriteLine("FFmpeg process completed successfully.");&#xA;                }&#xA;            }&#xA;            catch (Exception ex)&#xA;            {&#xA;                Console.WriteLine("Error: " &#x2B; ex.Message);&#xA;            }&#xA;            finally&#xA;            {&#xA;                // Wait for the process to exit if it hasn&#x27;t already.&#xA;                if (!process.HasExited)&#xA;                {&#xA;                    process.WaitForExit();&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;

    &#xA;