Recherche avancée

Médias (91)

Autres articles (75)

  • 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 ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (9959)

  • "TypeError : byte indices must be integers or slices, not str" Converting bytes to ints

    13 janvier 2017, par Lewis

    I am using a different program (ffmpeg) to grab the length of a youtube video that was downloaded in order to randomize a specific point in the video. However I am getting this error when I am trying to execute this code :

    def grabTimeOfDownloadedYoutubeVideo(youtubeVideo):
       process = subprocess.Popen(['/usr/local/bin/ffmpeg', '-i', youtubeVideo], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
       stdout, stderr = process.communicate()
       matches = str(re.search(b"Duration:\s{1}(?P<hours>\d+?):(?P<minutes>\d+?):(?P<seconds>\d+\.\d+?),", stdout, re.DOTALL).groupdict()).encode()
       print(matches)
       hours = int(matches['hours'])
       minutes = int(matches['minutes'])
       seconds = int(matches['seconds'])
       total = 0
       total += 60 * 60 * hours
       total += 60 * minutes
       total += seconds
       print(total)
    </seconds></minutes></hours>

    The matches variable prints out to this :

    b"{'minutes': b'04', 'hours': b'00', 'seconds': b'24.94'}"

    So all of the output comes out with a ’b’ at the beginning of it. How do I remove the ’b’ and just get the number ?

    Full error message here :

    Traceback (most recent call last):
     File "bot.py", line 87, in <module>
       grabTimeOfDownloadedYoutubeVideo("videos/1.mp4")
     File "bot.py", line 77, in grabTimeOfDownloadedYoutubeVideo
       hours = int(matches['hours'])
    TypeError: byte indices must be integers or slices, not str
    </module>
  • FFMPEG how do i add 1 image to 1 video

    15 avril 2020, par das

    ok I found a code online from 1 of the StackOverflow page tested it and it adds 10 seconds black screen before the video starts.
    &#xA;Summary
    &#xA;i have 55.mp4 and logo.png i want to replace black screen with png logo

    &#xA;&#xA;

    ffmpeg -i 55.mp4 -filter_complex "[0:v]tpad=start_duration=10:color=black[v];[0:a]adelay=10000|10000[a]" -map "[v]" -map "[a]" -y out2222.mp4&#xA;

    &#xA;&#xA;

    I have logo.png in the same path how do I use that instead of black screen.
    &#xA;I do not wish to use overlays. I want it as it is, just replace black-screen with my png

    &#xA;

  • FFMPEG(?) Error : [out#0/s16le @ 000002452f906a00] Output file does not contain any stream

    11 mars 2024, par Ondosh
    FFMPEG_OPTIONS = {&#xA;    &#x27;before_options&#x27;: &#x27;-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5&#x27;,&#xA;    &#x27;options&#x27;: &#x27;-vn&#x27;}&#xA;YDL_OPTIONS = {&#xA;    &#x27;format&#x27;: &#x27;bestaudio/best&#x27;,&#xA;    &#x27;extractaudio&#x27;: True,&#xA;    &#x27;noplaylist&#x27;: True,&#xA;    &#x27;simulate&#x27;: &#x27;True&#x27;,&#xA;    &#x27;preferredquality&#x27;: &#x27;192&#x27;,&#xA;    &#x27;preferredcodec&#x27;: &#x27;mp3&#x27;,&#xA;    &#x27;key&#x27;: &#x27;FFmpegExtractAudio&#x27;}&#xA;@bot.command(aliases=[&#x27;Ping&#x27;, &#x27;PING&#x27;, &#x27;Пинг&#x27;, &#x27;ПИНГ&#x27;, &#x27;зштп&#x27;, &#x27;ЗШТП&#x27;, &#x27;Зштп&#x27;,&#xA;                      &#x27;пинг&#x27;])&#xA;async def ping(ctx):&#xA;    await ctx.message.reply(f&#x27;Ping: {round(bot.latency * 1000)}ms&#x27;)&#xA;#########################[PLAY MUSIC BLOCK]#########################&#xA;@bot.command()&#xA;async def add(ctx, *url):&#xA;    url = &#x27; &#x27;.join(url)&#xA;    with yt_dlp.YoutubeDL(YDL_OPTIONS) as ydl:&#xA;        try:&#xA;            info = ydl.extract_info(url, download=False)&#xA;        except:&#xA;            info = ydl.extract_info(f"ytsearch:{url}",&#xA;                                    download=False)[&#x27;entries&#x27;][0]&#xA;&#xA;    URL = info[&#x27;formats&#x27;][0][&#x27;url&#x27;]&#xA;    name = info[&#x27;title&#x27;]&#xA;    time = str(datetime.timedelta(seconds=info[&#x27;duration&#x27;]))&#xA;    songs_queue.q_add([name, time, URL])&#xA;    embed = nextcord.Embed(description=f&#x27;Записываю [{name}]({url}) в очередь &#128221;&#x27;,&#xA;                           colour=nextcord.Colour.red())&#xA;    await ctx.message.reply(embed=embed)&#xA;def step_and_remove(voice_client):&#xA;    if loop_flag:&#xA;        songs_queue.q_add(songs_queue.get_value()[0])&#xA;    songs_queue.q_remove()&#xA;    audio_player_task(voice_client)&#xA;def audio_player_task(voice_client):&#xA;    if not voice_client.is_playing() and songs_queue.get_value():&#xA;        voice_client.play(nextcord.FFmpegPCMAudio(&#xA;            executable="ffmpeg\\bin\\ffmpeg.exe",&#xA;            source=songs_queue.get_value()[0][2],&#xA;            **FFMPEG_OPTIONS),&#xA;            after=lambda e: step_and_remove(voice_client))&#xA;@bot.command(aliases=[&#x27;Play&#x27;, &#x27;PLAY&#x27;, &#x27;играй&#x27;, &#x27;ИГРАЙ&#x27;, &#x27;Играй&#x27;, &#x27;сыграй&#x27;,&#xA;                      &#x27;Сыграй&#x27;, &#x27;СЫГРАЙ&#x27;, &#x27;здфн&#x27;, &#x27;Здфн&#x27;, &#x27;ЗДФН&#x27;, &#x27;p&#x27;, &#x27;P&#x27;,&#xA;                      &#x27;pl&#x27;, &#x27;PL&#x27;, &#x27;Pl&#x27;, &#x27;Плей&#x27;,&#xA;                      &#x27;ПЛЕЙ&#x27;, &#x27;плей&#x27;])&#xA;async def play(ctx, *url):&#xA;    await join(ctx)&#xA;    await add(ctx, &#x27; &#x27;.join(url))&#xA;    await ctx.message.add_reaction(emoji=&#x27;&#127928;&#x27;)&#xA;    voice_client = ctx.guild.voice_client&#xA;    audio_player_task(voice_client)&#xA;@bot.command(aliases=[&#x27;Queue&#x27;, &#x27;QUEUE&#x27;, &#x27;йгугу&#x27;, &#x27;Йгугу&#x27;, &#x27;ЙГУГУ&#x27;, &#x27;очередь&#x27;,&#xA;                      &#x27;Очередь&#x27;, &#x27;ОЧЕРЕДЬ&#x27;, &#x27;список&#x27;, &#x27;Список&#x27;, &#x27;СПИСОК&#x27;,&#xA;                      &#x27;list&#x27;, &#x27;List&#x27;, &#x27;LIST&#x27;, &#x27;дшые&#x27;, &#x27;Дшые&#x27;, &#x27;ДШЫЕ&#x27;, &#x27;Лист&#x27;,&#xA;                      &#x27;лист&#x27;, &#x27;ЛИСТ&#x27;, &#x27;песни&#x27;, &#x27;Песни&#x27;, &#x27;ПЕСНИ&#x27;, &#x27;songs&#x27;,&#xA;                      &#x27;Songs&#x27;, &#x27;SONGS&#x27;, &#x27;ыщтпы&#x27;, &#x27;ЫЩТПЫ&#x27;, &#x27;Ыщтпы&#x27;, &#x27;q&#x27;])&#xA;async def queue(ctx):&#xA;    if len(songs_queue.get_value()) > 0:&#xA;        only_names_and_time_queue = []&#xA;        for i in songs_queue.get_value():&#xA;            name = i[0]&#xA;            if len(i[0]) > 30:&#xA;                name = i[0][:30] &#x2B; &#x27;...&#x27;&#xA;            only_names_and_time_queue.append(f&#x27;&#128192; `{name:&lt;33}   {i[1]:>20}`\n&#x27;)&#xA;        c = 0&#xA;        queue_of_queues = []&#xA;        while c &lt; len(only_names_and_time_queue):&#xA;            queue_of_queues.append(only_names_and_time_queue[c:c &#x2B; 10])&#xA;            c &#x2B;= 10&#xA;&#xA;        embed = nextcord.Embed(title=f&#x27;ОЧЕРЕДЬ [LOOP: {loop_flag}]&#x27;,&#xA;                               description=&#x27;&#x27;.join(queue_of_queues[0]),&#xA;                               colour=nextcord.Colour.red())&#xA;        await ctx.send(embed=embed)&#xA;&#xA;        for i in range(1, len(queue_of_queues)):&#xA;            embed = nextcord.Embed(description=&#x27;&#x27;.join(queue_of_queues[i]),&#xA;                                   colour=nextcord.Colour.red())&#xA;            await ctx.send(embed=embed)&#xA;    else:&#xA;        await ctx.send(&#x27;Очередь пуста&#x27;)&#xA;

    &#xA;

    There is the part of my music bot in Discord, I don't really know why it doesn't work. Actually, I tried to use someone's old code, so it needs to be fixed. I have cut out the most important parts of the code, which most likely had an error.&#xA;I found other questions, but there was another errors.&#xA;After trying to start the video, I get the following errors :&#xA;[out#0/s16le @ 000002452f906a00] Output file does not contain any stream&#xA;Error opening output file pipe:1.&#xA;Error opening output files : Invalid argument

    &#xA;