Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (47)

  • 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 (5487)

  • How to add subtitles using FFmpeg-kit ?

    17 novembre 2024, par Mohammed Bekele

    I'm running a Flutter app with Ffmpeg-kit package to burn a subtitle on a video. I have a words list with the timings and map that to generate an srt and ass file, but when executing this it didn't work.

    


    Firstly, here is how I generated the Ass file.

    


    Future<string> _createAssFile() async {&#xA;    String filePath = await getAssOutputFilePath();&#xA;&#xA;    final file = File(filePath);&#xA;    final buffer = StringBuffer();&#xA;&#xA;    // Write ASS headers&#xA;    buffer.writeln(&#x27;[Script Info]&#x27;);&#xA;    buffer.writeln(&#x27;Title: Generated ASS&#x27;);&#xA;    buffer.writeln(&#x27;ScriptType: v4.00&#x2B;&#x27;);&#xA;    buffer.writeln(&#x27;Collisions: Normal&#x27;);&#xA;    buffer.writeln(&#x27;PlayDepth: 0&#x27;);&#xA;    buffer.writeln(&#x27;Timer: 100,0000&#x27;);&#xA;    buffer.writeln(&#x27;[V4&#x2B; Styles]&#x27;);&#xA;    buffer.writeln(&#xA;        &#x27;Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding&#x27;);&#xA;    buffer.writeln(&#xA;        &#x27;Style: Default,Arial,40,&amp;H00FFFFFF,&amp;H000000FF,&amp;H00000000,&amp;H80000000,1,1,1,1,100,100,0,0,1,1,1,2,10,10,10,1&#x27;);&#xA;    buffer.writeln(&#x27;[Events]&#x27;);&#xA;    buffer.writeln(&#xA;        &#x27;Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text&#x27;);&#xA;&#xA;    // Write events (subtitles)&#xA;    for (int i = 0; i &lt; widget.words.length; i&#x2B;&#x2B;) {&#xA;      final word = widget.words[i];&#xA;      final startTime = _formatAssTime(word[&#x27;startTime&#x27;].toDouble());&#xA;      final endTime = _formatAssTime(word[&#x27;endTime&#x27;].toDouble());&#xA;      final text = word[&#x27;word&#x27;];&#xA;&#xA;      buffer.writeln(&#x27;Dialogue: 0,$startTime,$endTime,Default,,0,0,0,,$text&#x27;);&#xA;    }&#xA;&#xA;    await file.writeAsString(buffer.toString());&#xA;    return filePath;&#xA;  }&#xA;&#xA;  String _formatAssTime(double seconds) {&#xA;    final int hours = seconds ~/ 3600;&#xA;    final int minutes = ((seconds % 3600) ~/ 60);&#xA;    final int secs = (seconds % 60).toInt();&#xA;    final int millis = ((seconds - secs) * 1000).toInt() % 1000;&#xA;&#xA;    return &#x27;${hours.toString().padLeft(1, &#x27;0&#x27;)}:${minutes.toString().padLeft(2, &#x27;0&#x27;)}:${secs.toString().padLeft(2, &#x27;0&#x27;)}.${(millis ~/ 10).toString().padLeft(2, &#x27;0&#x27;)}&#x27;;&#xA;  }&#xA;</string>

    &#xA;

    Then I used this command which was the official way of adding ass file to a video.

    &#xA;

      String newCmd = "-i $videoPath -vf ass=$assFilePath -c:a copy $_outputPath";&#xA;

    &#xA;

    Yet when executing this command it did not work. However I changed it to this command

    &#xA;

    String newCmd = "-i $videoPath -i $assFilePath $_outputPath";&#xA;

    &#xA;

    Well, that code works but the styling is not being applied. So I tried yet another command to filter and position the ass file.

    &#xA;

    String newCmd = "-i $videoPath -i $assFilePath -filter_complex \"[0:v][1:s]ass=\\an5:text=&#x27;%{event.text}&#x27;,scale=iw*0.8:ih*0.8,setdar=16/9[outv]\" -map [outv] -c:a copy $_outputPath";&#xA;

    &#xA;

    This made it even worse, because the app crashed when I ran this. Also there is a log for this command before crashing

    &#xA;

    F/libc    (19624): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x19 in tid 21314 (pool-4-thread-7), pid 19624 (ple.caption_app)&#xA;*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***&#xA;Build fingerprint: &#x27;samsung/a15nsxx/a15:14/UP1A.231005.007/A155FXXU1AWKA:user/release-keys&#x27;&#xA;Revision: &#x27;5&#x27;&#xA;ABI: &#x27;arm64&#x27;&#xA;Processor: &#x27;7&#x27;&#xA;Timestamp: 2024-07-10 19:27:40.812476860&#x2B;0300&#xA;Process uptime: 1746s&#xA;Cmdline: com.example.caption_app&#xA;pid: 19624, tid: 21314, name: pool-4-thread-7  >>> com.example.caption_app &lt;&lt;&lt;&#xA;uid: 10377&#xA;tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)&#xA;signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000019&#xA;Cause: null pointer dereference&#xA;    x0  0000000000000001  x1  b400006ec98d8660  x2  0000000000000000  x3  0000000000000002&#xA;    x4  0000006f62d1ea12  x5  b400006e04f745ea  x6  352f35372f64352f  x7  7f7f7f7f7f7f7f7f&#xA;    x8  632ace36577a905e  x9  632ace36577a905e  x10 0000006e191378c0  x11 0000000000000001&#xA;    x12 0000000000000001  x13 0000000000000000  x14 0000000000000004  x15 0000000000000008&#xA;    x16 0000006e27ffa358  x17 0000006e27dbfb00  x18 0000006e00d48000  x19 0000006f62d1f0e8&#xA;    x20 0000006f62d24000  x21 0000006e27ffc5d0  x22 0000006e27ffc5f0  x23 0000000000000000&#xA;    x24 b400006f3f089248  x25 0000006f62d1f220  x26 b400006f3f057b20  x27 0000000000000002&#xA;    x28 0000000000000088  x29 0000006f62d1f100&#xA;    lr  0000006e27dbfb0c  sp  0000006f62d1f0a0  pc  0000006e27dbfb10  pst 0000000060001000&#xA;1 total frames&#xA;backtrace:&#xA;      #00 pc 0000000000121b10  /data/app/~~oWqjrGA2indQhuEw6u_J2A==/com.example.caption_app-u2Ofk54FVtMc5D-i3SLC6g==/base.apk!libavfilter.so (offset 0x10a46000) (avfilter_inout_free&#x2B;16)    &#xA;Lost connection to device.&#xA;

    &#xA;

    I tried the normal command in my local machine on Windows, and this is what I used

    &#xA;

    ffmpeg -i F:\ffmpeg\video.avi -vf subtitles=&#x27;F\:\\ffmpeg\\caption.srt&#x27;:force_style=&#x27;Fontsize=24&#x27; F:\ffmpeg\new.mp4&#xA;

    &#xA;

    As you can see above when subtitles are used it had an extra backslashes for each path and a pre backslash after the partition letter. But I don't know if this does apply for android devices. How can I make sense of this ?

    &#xA;

  • Fluent-ffmpeg randomly doesn't add the text I want to the video, even though it's in the filters

    15 décembre 2022, par ToborWinner

    I am making a simple script to add some text to a 4 seconds video, it all works fine, but sometimes it randomly doesn't add some of the text.&#xA;You can find here the relevant parts of my code :

    &#xA;

    &#xA;const video = ffmpeg(&#x27;path/to/video.mp4&#x27;)&#xA;&#xA;let index = 0&#xA;let left = true&#xA;&#xA;const filters = [{&#xA;  filter: &#x27;drawtext&#x27;,&#xA;  options: {&#xA;    //fontfile:&#x27;font.ttf&#x27;,&#xA;    text: title,&#xA;    fontsize: 30,&#xA;    fontcolor: &#x27;white&#x27;,&#xA;    x: &#x27;(main_w/2-text_w/2)&#x27;,&#xA;    y: 130,&#xA;    shadowcolor: &#x27;black&#x27;,&#xA;    shadowx: 2,&#xA;    shadowy: 2&#xA;  }&#xA;}]&#xA;&#xA;for (let thought of thoughts) {&#xA;    if (thought.length == 0) {&#xA;      continue&#xA;    }&#xA;    thought = wrap(thought, {width: 35})&#xA;    const strings = thought.split("\n")&#xA;    let line = 0&#xA;    for (const string of strings&#xA;      .filter(string => string.length > 0)&#xA;      .map(string => string.trim())&#xA;      ) {&#xA;      let yoffset = 130&#x2B;(130*(index&#x2B;1))&#x2B;(line*20)&#xA;      if (yoffset &lt; 0) {&#xA;        yoffset = 0&#xA;      }&#xA;      console.log(string, yoffset)&#xA;      filters.push({&#xA;        filter: &#x27;drawtext&#x27;,&#xA;        options: {&#xA;          //fontfile:&#x27;font.ttf&#x27;,&#xA;          text: string,&#xA;          fontsize: 18,&#xA;          fontcolor: &#x27;white&#x27;,&#xA;          x: `(main_w${left ? "*0.3" : "*0.7"}-text_w/2)`,&#xA;          y: yoffset,&#xA;          shadowcolor: &#x27;black&#x27;,&#xA;          shadowx: 2,&#xA;          shadowy: 2&#xA;        }&#xA;      })&#xA;      line&#x2B;&#x2B;;&#xA;    }&#xA;    index&#x2B;&#x2B;;&#xA;    left = !left&#xA;  }&#xA;&#xA;&#xA;video.videoFilters(filters)&#xA;video.noAudio()&#xA;&#xA;&#xA;video.save(&#x27;path/to/output.mp4&#x27;);&#xA;&#xA;

    &#xA;

    The wrap function comes from the package word-wrap (const wrap = require(&#x27;word-wrap&#x27;);)&#xA;Thoughts is a list of strings that aren't too long (with the wrap function they end up being like 2-4 lines).

    &#xA;

    This is inside an async function.

    &#xA;

    For some reason only a few lines appear on the output video.&#xA;Sometimes, when it doesn't do that, it also throws an error saying that one of the inputs is invalid (while processing filters).&#xA;The wrap function seems to work, and also the yoffset, I have printed them.

    &#xA;

    If someone has an idea why, please help me solve this.

    &#xA;

    I tried chasing the text in thoughts, and for example, this works with no problems (shows the title, and the texts right, left, right, left, ...).

    &#xA;

    const thoughts = ["Nothing is on fire, fire is on things","Nothing is on fire, fire is on things","Nothing is on fire, fire is on things","Nothing is on fire, fire is on things","Nothing is on fire, fire is on things"]&#xA;

    &#xA;

  • Small discord bot with a set of working music commands, about 6 days ago the play function completely stopped functioning (more below)

    24 février 2021, par TheColoradoKid

    It is a small discord python bot for my server with various features, which had included music commands until they stopped out of the blue without showing any error for the problem.&#xA;It uses FFMpeg, and youtubeDl along with pytube to gather the song and store it locally to play it, I have pip updated all of these and they are definitely on the current versions as I have made sure of this online.&#xA;Any help or insight anyone could provide would be greatly appreciated. I'm sorry if the code is convoluted in the way it's written I'm still pretty new to coding and this is one of my first proper larger projects.

    &#xA;

    If you need any information I'm happy to give what I can to help.

    &#xA;

    Here is the code for the play command :

    &#xA;

    @client.command()&#xA;async def play(ctx, *args):&#xA;    global queu&#xA;    #global autom&#xA;    if not args:&#xA;        voice = get(client.voice_clients, guild=ctx.guild)&#xA;        if not voice.is_playing():&#xA;            server = ctx.message.guild&#xA;            voice_channel = server.voice_client&#xA;            if queu:&#xA;                async with ctx.typing():&#xA;                    player = await YTDLSource.from_url(queu[0], loop=client.loop)&#xA;                    voice_channel.play(player, after=lambda e: print(&#x27;Player error: %s&#x27; % e) if e else None)&#xA;&#xA;                await ctx.send(&#x27;**Now playing:** {}&#x27;.format(player.title))&#xA;                del(queu[0])&#xA;                # while autom == True:&#xA;                #     try:&#xA;                #         a = client.get_command(&#x27;auto&#x27;)&#xA;                #         await ctx.invoke(a)&#xA;                #     except:&#xA;                #         print(&#x27;&#x27;)&#xA;            elif not queu:&#xA;                await ctx.send("You can&#x27;t play if there isn&#x27;t anything in the queue\nIf auto mode was on it has now been disabled, to use it gain please add to the queue and run ``;auto on``")&#xA;                autom = False&#xA;    if args:&#xA;        global gueu&#xA;        search_keywords = ""&#xA;        print(args)&#xA;        for word in args:&#xA;            search_keywords &#x2B;= word&#xA;            search_keywords &#x2B;= &#x27;&#x2B;&#x27;&#xA;        link = "https://www.youtube.com/results?search_query="&#xA;        link &#x2B;= search_keywords&#xA;        #print(link)&#xA;        html = urllib.request.urlopen(link)&#xA;        video_ids = re.findall(r"watch\?v=(\S{11})", html.read().decode())&#xA;        url = ("https://www.youtube.com/watch?v=" &#x2B; video_ids[0])&#xA;        #print(url)&#xA;        queu.append(url)&#xA;        #print(queu)&#xA;        await ctx.send("``{}`` added to queue!\n If the song doesn&#x27;t start please either let the current song end and run ``;play``/``;next`` again or run ``;next`` to play now".format(url))&#xA;        try:&#xA;            p = client.get_command(&#x27;play&#x27;)&#xA;            await ctx.invoke(p)&#xA;        except:&#xA;            print(&#x27;failed&#x27;)&#xA;

    &#xA;