Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (42)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (8630)

  • Using FFMPEG to save 2 seconds slices, every 5 seconds interval [closed]

    15 mars 2024, par Eduardo

    What I want to do is to save 2 seconds, skip 5 seconds and keep going until the end of the video.
It's ok to encode as long its mp4, since I will use the slices on Vegas.
The end resolt will be a bunch of random 2 seconds segments videos, from a larger file.

    


    I can cut a slice

    


    ffmpeg -i video.mp4 -ss 00:00:00 -t 00:00:02 -async 1 -strict -2 slice.mp4


    


    I need to loop it and also move the 5 seconds interval every pass.

    


  • How to save a video on top of it a text widget changes every couple of seconds flutter ?

    23 septembre 2023, par abdallah mostafa

    I've been working on auto subtitle tool for videos but I did not How to save a final video.
should I record the video or get screenshots of all the frames and combine them together to be a video.

    


    I've used FFmpegKit but it's so hard to make the position of the text

    


      Future<void> saveSubtitle(&#xA;      {required double leftPosition,&#xA;      required double topPosition,&#xA;      required double opacityOfBackground,&#xA;      required String backgroundColor,&#xA;      required String subtitleColor}) async {&#xA;    emit(ExportSubtitleLoading());&#xA;&#xA;    String fontDirectoryPath =&#xA;        await _exportSubtitle.writeFontToFile(&#x27;assets/fonts/arial.ttf&#x27;);&#xA;    if (backgroundColor == &#x27;Transparent&#x27;) {&#xA;      opacityOfBackground = 0.0;&#xA;      backgroundColor = &#x27;black&#x27;;&#xA;    }&#xA;    String subtitleFilter = "";&#xA;    for (var subtitle in subtitles!.fotmatedSubtitle!) {&#xA;      double startTime = _exportSubtitle.timeToSeconds(subtitle.interval![0]);&#xA;      double endTime = _exportSubtitle.timeToSeconds(subtitle.interval![1]);&#xA;      String text = subtitle.displayText!.replaceComma;&#xA;      int fontSize = controller!.value.aspectRatio > 0.5625 ? 24 * 3 : 24;&#xA;      if (countWords(text) > 9 &amp;&amp; countWords(text) &lt;= 15) {&#xA;        // Add line breaks ("\n") to the text&#xA;        text = _exportSubtitle.addLineBreaks(&#xA;          text,&#xA;        );&#xA;      } else {&#xA;        text = _exportSubtitle.addLineBreaks(text, true);&#xA;      }&#xA;      final centeredNumber = text.split(&#x27;\n&#x27;);&#xA;      // centeredNumber[2].split(&#x27; &#x27;).logger;&#xA;      // return;&#xA;      for (var i = 0; i &lt; centeredNumber.length; i&#x2B;&#x2B;) {&#xA;        if (i == 0) {&#xA;          if (centeredNumber.length > 1 &amp;&amp;&#xA;              centeredNumber[i].split(&#x27; &#x27;).join().length >&#xA;                  centeredNumber[i &#x2B; 1].split(&#x27; &#x27;).join().length) {&#xA;            subtitleFilter &#x2B;=&#xA;                " drawtext=text=&#x27;${centeredNumber[i]}&#x27;:enable=&#x27;between(t,$startTime,$endTime)&#x27;:x=$leftPosition-30:y=$topPosition:fontsize=$fontSize:fontcolor=$subtitleColor:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@$opacityOfBackground,";&#xA;          } else {&#xA;            subtitleFilter &#x2B;=&#xA;                " drawtext=text=&#x27;${centeredNumber[i]}&#x27;:enable=&#x27;between(t,$startTime,$endTime)&#x27;:x=$leftPosition&#x2B;20:y=$topPosition:fontsize=$fontSize:fontcolor=$subtitleColor:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@$opacityOfBackground,";&#xA;          }&#xA;        } else if (i == 1) {&#xA;          subtitleFilter &#x2B;=&#xA;              " drawtext=text=&#x27;${centeredNumber[i]}&#x27;:enable=&#x27;between(t,$startTime,$endTime)&#x27;:x=$leftPosition:y=$topPosition&#x2B;25:fontsize=$fontSize:fontcolor=$subtitleColor:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@$opacityOfBackground,";&#xA;        } else {&#xA;          if (centeredNumber.length > 1 &amp;&amp;&#xA;              centeredNumber[i - 1].split(&#x27; &#x27;).join().length >&#xA;                  centeredNumber[i].split(&#x27; &#x27;).join().length) {&#xA;            subtitleFilter &#x2B;=&#xA;                " drawtext=text=&#x27;${centeredNumber[i]}&#x27;:enable=&#x27;between(t,$startTime,$endTime)&#x27;:x=$leftPosition&#x2B;text_w/16:y=$topPosition&#x2B;50:fontsize=$fontSize:fontcolor=$subtitleColor:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@$opacityOfBackground,";&#xA;          } else {&#xA;            subtitleFilter &#x2B;=&#xA;                " drawtext=text=&#x27;${centeredNumber[i]}&#x27;:enable=&#x27;between(t,$startTime,$endTime)&#x27;:x=$leftPosition-text_w/16:y=$topPosition&#x2B;50:fontsize=$fontSize:fontcolor=$subtitleColor:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@$opacityOfBackground,";&#xA;          }&#xA;        }&#xA;      }&#xA;&#xA;      // subtitleFilter &#x2B;=&#xA;      //     " drawtext=text=&#x27;$text&#x27;:enable=&#x27;between(t,$startTime,$endTime)&#x27;:x=$leftPosition:y=$topPosition:fontsize=24:fontcolor=$subtitleColor:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@$opacityOfBackground,";&#xA;    }&#xA;&#xA;    final finalFilter = "\"$subtitleFilter\"";&#xA;    // final finalFilter =&#xA;    //     "\"$subtitleFilter split[s1][s2];[s1]crop=w=576:h=1024,scale=576:1024[p];[s2][p]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2[v]\"";&#xA;    final dir = await getTemporaryDirectory();&#xA;    String outputPath = &#x27;${dir.path}/ex_vid.mp4&#x27;;&#xA;    final arguments = [&#xA;      &#x27;-y&#x27;,&#xA;      &#x27;-i&#x27;,&#xA;      inputFile,&#xA;      &#x27;-vf&#x27;,&#xA;      finalFilter,&#xA;      &#x27;-c:v&#x27;,&#xA;      &#x27;libx264&#x27;,&#xA;      &#x27;-c:a&#x27;,&#xA;      &#x27;copy&#x27;,&#xA;      outputPath&#xA;    ];&#xA;    arguments.join(&#x27; &#x27;).logger;&#xA;    // return;&#xA;    // String command =&#xA;    //     "-y -i $inputFile -vf \" drawtext=text=&#x27;You know those cat are memes that everybody uses\nin their videos and the TV movie clips that people use.&#x27;:enable=&#x27;between(t,0,4.000)&#x27;:x=(w-text_w)/2:y=(h-text_h)/2:fontsize=24:fontcolor=white:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@0.5, drawtext=text=&#x27;Well, who are the four best free\nwebsites to find a move?&#x27;:enable=&#x27;between(t,4.000,6.240)&#x27;:x=(w-text_w)/2:y=(h-text_h)/2&#x2B;30:fontsize=24:fontcolor=white:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@0.5, split[s1][s2];[s1]crop=w=576:h=1024,scale=576:1024[p];[s2][p]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2[v]\" -c:v libx264 -c:a copy $outputPath";&#xA;&#xA;    String command =&#xA;        "-y -i $inputFile -vf \" drawtext=text=&#x27;You know those cat are memes that everybody uses\nin their videos and the TV movie clips that people use.&#x27;:enable=&#x27;between(t,0,4.000)&#x27;:x=(w-text_w)/2:y=(h-text_h)/2:fontsize=24:fontcolor=white:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@0.5, drawtext=text=&#x27;Well, who are the four best free\nwebsites to find a move?&#x27;:enable=&#x27;between(t,4.000,6.240)&#x27;:x=$leftPosition:y=$topPosition:fontsize=24:fontcolor=white:fontfile=$fontDirectoryPath:box=1:boxcolor=$backgroundColor@0.5 \" -c:v libx264 -c:a copy $outputPath";&#xA;&#xA;    &#x27;=================&#x27;.logger;&#xA;    // FFmpegKitConfig.enableUTF8Charset();&#xA;    command.logger;&#xA;    await FFmpegKit.execute(arguments.join(&#x27; &#x27;)).then((session) async {&#xA;      final returnCode = await session.getReturnCode();&#xA;&#xA;      if (ReturnCode.isSuccess(returnCode)) {&#xA;        (&#x27;The Converstion is Success&#x27;).logger;&#xA;        final path = await _exportSubtitle.exportFile(File(outputPath));&#xA;        emit(ExportSubtitleSuccess(path));&#xA;      } else if (ReturnCode.isCancel(returnCode)) {&#xA;        // CANCEL&#xA;        (&#x27;The Converstion is Cancelled&#x27;).logger;&#xA;      } else {&#xA;        emit(ExportSubtitleerror());&#xA;        (&#x27;The Converstion Have an Error&#x27;).logger;&#xA;      }&#xA;    });&#xA;  }&#xA;</void>

    &#xA;

    This function, named saveSubtitle. It is responsible for applying subtitle to a video using FFmpeg. Here's a breakdown of what this function does :

    &#xA;

    It starts by emitting an event to indicate that the subtitle export process is loading.

    &#xA;

    It obtains the file path of a font (arial.ttf) from assets and stores it in fontDirectoryPath.

    &#xA;

    It checks if the background color for subtitles is set to "Transparent." If so, it sets the opacityOfBackground to 0.0 and changes the backgroundColor to black.

    &#xA;

    It initializes an empty subtitleFilter string, which will store FFmpeg filter commands for each subtitle.

    &#xA;

    It iterates through the subtitles and calculates the start and end time, text, and font size for each subtitle.

    &#xA;

    For each subtitle, it calculates the position (x and y coordinates) based on the leftPosition and topPosition. It also sets the font color, font file path, and background color with opacity for the subtitle.

    &#xA;

    It appends the FFmpeg drawtext filter command for each subtitle to the subtitleFilter string.

    &#xA;

    After processing all subtitles, it wraps the subtitleFilter string in double quotes and prepares to use it as an argument for the FFmpeg command.

    &#xA;

    It specifies the output path for the video with subtitles.

    &#xA;

    It constructs the FFmpeg command using various arguments, including the input video file, the subtitle filter, video and audio codecs, and the output path.

    &#xA;

    It executes the FFmpeg command using FFmpegKit and waits for the conversion process to complete.

    &#xA;

    Once the conversion is finished, it checks the return code to determine if it was successful. If successful, it emits a success event with the path to the exported video with subtitles. If canceled or if an error occurred, it emits corresponding events to indicate the status.

    &#xA;

    In summary, this function is used to add subtitles to a video by overlaying text on specific positions and with specified styles. It utilizes FFmpeg for video processing and emits events to notify the application about the export status.

    &#xA;

  • Why my output.mp4 from ffmpeg freeze in the last 3 seconds ? [closed]

    3 juin 2023, par mega gaming

    I know someone who already asked something like this but in his case, the solution was to run all in one instead of running 2 commands I have only one command that I run and I experience the same problem.

    &#xA;

    Here the FFmpeg

    &#xA;

    ffmpeg -i "downloaded_file.mp4" -i "video2.mp4" -filter_complex "[1:v]crop=iw:ih-686[bg];[0:v][bg]overlay=0:0[out]" -map "[out]" -map 1:a -c:v libx264 -c:a copy -shortest -y output.mp4&#xA;

    &#xA;

    and the output.mp4 froze in the last 3s and I don't know what to do about it

    &#xA;