Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (23)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (5767)

  • Adding subtitles with FFMpegCore in C# is not working on Azure Function

    1er février 2024, par Skerdi Berberi

    I have deployed a C# azure function with ffmpeg.exe (using FFMpegCore nuget). The function adds audio and srt/ass subtitles to a video.
When I test locally this code works (running on azurite). But, when I deploy the azure function, the audio is added to the video but the subtitles don't show up.

    


    At the begining I thought it was an issue with the Fonts because I was using ASS File for subtitles but then I switched to SRT and still is not working.

    


    I've tried with both SRT and ASS but they both don't work using this code :

    


    await FFMpegArguments
 .FromFileInput(videoInputPath, true, options =>
 {
     options.WithCustomArgument("-stream_loop -1");
 })
 .AddFileInput(audioPath, true)
 .OutputToFile(videoOutputPath, true, (options) =>
 {
     options.WithDuration(thread.AudioData.TotalAudioDuration);

     options.WithVideoCodec(VideoCodec.LibX264);   // Re-encode video using x264 codec
     options.WithAudioCodec(AudioCodec.Aac);       // Re-encode audio to AAC
     options.WithSpeedPreset(Speed.VeryFast);
     options.UsingShortest(true);

     options.WithVideoFilters((videoOptions) =>
     {
         videoOptions.HardBurnSubtitle(SubtitleHardBurnOptions.Create(subtitlesFile));
     });
 }).ProcessAsynchronously();


    


    Here's the command it creates on Azure function :

    


    ffmpeg -stream_loop -1 -i "C:\local\Temp\videoTempPath.mp4" -i "C:\local\Temp\audioTempPath.mp3" -t 00:00:22.8160000 -c:v libx264 -c:a aac -preset veryfast -shortest -vf "subtitles='C\:\\local\\Temp\\subtitles.srt'" "C:\local\Temp\output.mp4" -y


    


  • I have 22,1 GB of movie data totally that I want to put on several DVDs

    8 mars 2017, par P. Dee

    I have 22,1 GB of movie data totally that I want to put on several DVDs.

    I want ffmpeg to create one long 22.1 GB mp4 file from a lot of small files to then split them into as many 4.7 GB mp4-files as necessary(should fit on 5 DVDs), so the order is preserved.

    Which command do I need ?

    I started with ffmpeg -f concat -safe 0 -i mylist.txt -c copy -fs 5046586573 output1.mp4 with mylist.txt containing

    # this is a comment
    file '/path/to/file1'
    file '/path/to/file2'
    file '/path/to/file3'

    Then looking at the duration, to then continue with ffmpeg -ss duration -f concat -safe 0 -i mylist.txt -c copy -fs 5046586573 output2.mp4

    Which command does that at once ?

  • Font Size Mismatch When Using Fallback Fonts in FFmpeg ASS Subtitles

    6 janvier, par Mostafa Fathi

    I’m facing an issue with font size mismatch in ASS subtitles rendered by FFmpeg when combining English text with Arabic or Persian characters.

    


    Steps to Reproduce :

    


    1.Subtitle File :
Here’s an example of the ASS subtitle file :

    


    [Script Info]
Title: Generated ASS
ScriptType: v4.00+
WrapStyle: 2
ScaledBorderAndShadow: yes
YCbCr Matrix: none
PlayResX: 1920
PlayResY: 1080

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default, ABeeZee, 40, &H00FFFFFF, &H000000FF, &H00000000, &H00000000, -1, 0, 0, 0, 100, 100, 0, 0, 1, 1, 0, 2, 10, 10, 10, 1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:01.00,0:00:05.00,Default,,0,0,0,,Hello! This is English text.
Dialogue: 0,0:00:05.00,0:00:10.00,Default,,0,0,0,,سلام! This is mixed Arabic/English text.


    


      

    1. Command Used :
    2. 


    


    ffmpeg -i input.mp4 -vf "ass=subtitle.ass" output.mp4


    


      

    1. Screenshots :
Below are two screenshots of the issue :
    2. 


    


    • Text rendered with the main font (ABeeZee) is correct.

    


    


    • Text rendered with the fallback font (Cinema) appears larger/smaller in size.

    


    


      

    1. Debug Logs :
    2. 


    


    [Parsed_ass_0 @ 0xb4000079f04f8210] libass API version: 0x1701000
[Parsed_ass_0 @ 0xb4000079f04f8210] 
[Parsed_ass_0 @ 0xb4000079f04f8210] libass source: commit: 0.17.1-0-ge8ad72accd3a84268275a9385beb701c9284e5b3
[Parsed_ass_0 @ 0xb4000079f04f8210] 
[Parsed_ass_0 @ 0xb4000079f04f8210] Shaper: FriBidi 1.0.13 (SIMPLE) HarfBuzz-ng 8.0.1 (COMPLEX)
[Parsed_ass_0 @ 0xb4000079f04f8210] 
[Parsed_ass_0 @ 0xb4000079f04f8210] Using font provider fontconfig
[Parsed_ass_0 @ 0xb4000079f04f8210] 
[Parsed_ass_0 @ 0xb4000079f04f8210] Added subtitle file: '/data/***/ass_file.ass' (4 styles, 29 events)
[Parsed_ass_0 @ 0xb4000079f04f8210] 
[Parsed_ass_0 @ 0xb4000079f04f8210] fontselect: (ABeeZee, 400, 0) -> /data/***/ABeeZee_regular.ttf, 0, ABeeZee-Regular
[Parsed_ass_0 @ 0xb4000079f04f8210] 
[Parsed_ass_0 @ 0xb4000079f04f8210] Glyph 0x633 not found, selecting one more font for (ABeeZee, 400, 0)
[Parsed_ass_0 @ 0xb4000079f04f8210] 
[Parsed_ass_0 @ 0xb4000079f04f8210] fontselect: (ABeeZee, 400, 0) -> /data/***/Cinema.ttf, 0, Cinema


    


    Question :

    


    How can I ensure that text rendered with fallback fonts has the same size as the main font ? Are there specific settings in FFmpeg or the ASS subtitle format that can address this issue ? Alternatively, is there a way to manually adjust the scaling of fallback fonts in FFmpeg ?