Recherche avancée

Médias (1)

Mot : - Tags -/framasoft

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

Sur d’autres sites (9851)

  • FFMPEG - Audio conversion from MP3 to M3u8 works for some songs, not for others. Look's like it's detecting video ?

    20 avril 2024, par Kyle Orius

    Problem : I need to convert MP3s (of unknown Origin) into M3u8 files so that I can HLS stream them.

    


    This command here works for a song called 'jesussaves.mp3'

    


    ffmpeg -i ../jesussaves.mp3 -c:a aac -b:a 192k -ac 2 -f hls -hls_time 10 -preset ultrafast -flags -global_header master.m3u8

    


    When I change it to use the song 'In my Darkest Hour' - (I've renamed the file to inmydh.mp3) - I only get one TS file output instead of multiple. The log is here : https://ibb.co/5nG0j01

    


    Thank you

    


  • How to trim the mp3 song using ff mpeg in PHP

    18 septembre 2015, par kannan

    I need to trim the mp3 song using ff mpeg in PHP .

       I tried some code :-
           $fpath = 'D:\xampp-portable\htdocs\songs\ffmpeg\bin\ffmpeg.exe';
           $song_path = 'D:/xampp-portable/htdocs/songs/uploads/mp3/test10.mp3';
           $sample_song_path = 'D:/xampp-portable/htdocs/songs/uploads/mp3/sample/test10.mp3';
           exec("$fpath -ss 10 -i '".$song_path."' -t 6 '".$sample_song_path."' 2>&1",$out_put);
           var_dump($out_put);

    Here I got the error message like below

    I got output as :-

    Array
    (
       [0] => FFmpeg version git-N-28582-g2a0d4d4, Copyright (c) 2000-2011 the FFmpeg developers
       [1] =>   built on Mar 23 2011 14:50:54 with gcc 4.5.2
       [2] =>   configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-memalign-hack --arch=i686 --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --extra-libs='-lrtmp -lssl -lcrypto -lws2_32 -lgdi32 -lwinmm -lz -lx264 -lpthreadGC2' --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib --extra-cflags=-I/home/kyle/software/ffmpeg/external-libs/32-bit/include --extra-ldflags=-L/home/kyle/software/ffmpeg/external-libs/32-bit/lib --pkg-config=pkg-config
       [3] =>   libavutil    50. 40. 0 / 50. 40. 0
       [4] =>   libavcodec   52.114. 0 / 52.114. 0
       [5] =>   libavformat  52.103. 0 / 52.103. 0
       [6] =>   libavdevice  52.  3. 0 / 52.  3. 0
       [7] =>   libavfilter   1. 76. 0 /  1. 76. 0
       [8] =>   libswscale    0. 12. 0 /  0. 12. 0
       [9] => 'D:/xampp-portable/htdocs/melodic_svn/uploads/mp3/test10.mp3': Invalid data found when processing input
    )

    How can I fix this . Please help me .

  • youtube_dl, ffmpeg, discord.py is not playing songs even w/o streaming

    27 août 2021, par BlueFire02

    I have tried many times to make a basic queue system, I tested the play command to see if it worked back then and it did, unfortunately during this construction I have been having a lot of problems just playing the song. I did try to implement a queueing system but all that comes out is this specific error :

    


    [tls @ 0x7f8244705240] IO Error: -9806 [https @ 0x7f824480b000] Will reconnect at 835584 in 0 second(s), error=Input/output error.


    


    Additional Info : I also installed ffmpeg onto my mac, I only put the 1 file called ffmpeg in my path if that helps but I am pretty sure it has to do something with youtube_dl.

    


    Code : (Make sure to put your guild_id in the guild_id spot, another thing is when you invite the bot make sure in the 2auth section click 'bot' and 'application.commands')

    


    import discord
from discord.ext import commands
import youtube_dl
from discord_slash import cog_ext, SlashContext
from youtube_search import YoutubeSearch
import asyncio
import os


guild_ids = [GUILD ID GOES HERE]
queue = []
global is_playing
is_playing = False
time_video = 0 

class music(commands.Cog):
  def __init__(self, client):
    self.client = client
  
  @cog_ext.cog_slash(name="ping", guild_ids=guild_ids)
  async def ping(self, ctx):
    await ctx.send(content="Pong!")
  
  @cog_ext.cog_slash(name="join", guild_ids=guild_ids)
  async def join(self, ctx):
    if ctx.author.voice is None:
      return await ctx.send ("You are not in a voice channel!")
    voice_channel = ctx.author.voice.channel
    await voice_channel.connect()
    await ctx.guild.change_voice_state(channel=ctx.author.voice.channel, self_mute=True, self_deaf=True)
    await ctx.send("I joined the party :tada:")
  
  @cog_ext.cog_slash(name="disconnect", guild_ids=guild_ids)
  async def disconnect(self, ctx):
    await ctx.voice_client.disconnect()
  
  @cog_ext.cog_slash(name="play", guild_ids=guild_ids)
  async def play(self, ctx, input):
    if 'https://www.youtube.com/watch?' in input or 'https://youtu.be/' in input:
      YTDL_OPTIONS = {'format':"bestaudio"}
      with youtube_dl.YoutubeDL(YTDL_OPTIONS) as ydl:
        info_dict = ydl.extract_info(input, download=False)
        video_title = info_dict.get('title', None)

        results = YoutubeSearch(video_title, max_results=1).to_json()
        print(results)
        url_suffix_int = results.find('url_suffix') + 14


        results2 = "".join(['https://www.youtube.com', str(results[url_suffix_int:-3])])

        title_int = results.find('title') + 9
        title_int2 = results.find('long_desc') - 4
        title_string = str(results[title_int:title_int2])

        thumbnail_int = results.find('thumbnail') + 15
        title_split = results.find('title') - 5
        splitboth = str(results[thumbnail_int:title_split])
        final_result = splitboth.split('", "', 1)[0]

        channel_int = results.find('channel') + 11
        channel_int2 = results.find('duration') - 4
        channel_string = str(results[channel_int:channel_int2])

        duration_int = results.find('duration') + 12
        duration_int2 = results.find('views') - 4
        duration_string = str(results[duration_int:duration_int2])

        views_int = results.find('views') + 9
        views_int2 = results.find('publish_time') - 4
        views_string = str(results[views_int:views_int2])

        embed = discord.Embed(title=title_string, colour=discord.Colour(0x1), url=results2)

        embed.set_thumbnail(url=final_result)
        embed.set_author(name="Added to queue", icon_url=self.client.user.avatar_url)

        embed.add_field(name="Channel", value=channel_string, inline=True)
        embed.add_field(name="Song Duration", value=duration_string, inline=True)
        embed.add_field(name="Views", value=views_string, inline=True)

        await ctx.send(embed=embed)

        queue.append(input)
        await start_queue(self, ctx)

    else:
      results = YoutubeSearch(input, max_results=1).to_json()
      print(results)
      url_suffix_int = results.find('url_suffix') + 14


      results2 = "".join(['https://www.youtube.com', str(results[url_suffix_int:-3])])

      title_int = results.find('title') + 9
      title_int2 = results.find('long_desc') - 4
      title_string = str(results[title_int:title_int2])

      thumbnail_int = results.find('thumbnail') + 15
      title_split = results.find('title') - 5
      splitboth = str(results[thumbnail_int:title_split])
      final_result = splitboth.split('", "', 1)[0]

      channel_int = results.find('channel') + 11
      channel_int2 = results.find('duration') - 4
      channel_string = str(results[channel_int:channel_int2])

      duration_int = results.find('duration') + 12
      duration_int2 = results.find('views') - 4
      duration_string = str(results[duration_int:duration_int2])

      views_int = results.find('views') + 9
      views_int2 = results.find('publish_time') - 4
      views_string = str(results[views_int:views_int2])

      embed = discord.Embed(title=title_string, colour=discord.Colour(0x1), url=results2)

      embed.set_thumbnail(url=final_result)
      embed.set_author(name="Added to queue", icon_url=self.client.user.avatar_url)

      embed.add_field(name="Channel", value=channel_string, inline=True)
      embed.add_field(name="Song Duration", value=duration_string, inline=True)
      embed.add_field(name="Views", value=views_string, inline=True)

      await ctx.send(embed=embed)

      queue.append(results2)
      await start_queue(self, ctx)
    

  @cog_ext.cog_slash(name="pause", guild_ids=guild_ids)
  async def pause(self, ctx):
    ctx.voice_client.pause()
  
  
  @cog_ext.cog_slash(name="resume", guild_ids=guild_ids)
  async def resume(self, ctx):
    ctx.voice_client.resume()

  
def setup(client):
  client.add_cog(music(client))

async def start_queue(self, ctx):
    print(is_playing)
    if len(queue) <= 0:
      await ctx.voice_client.disconnect()
    while(len(queue) > 0):
      if(is_playing == False):
        await start(self, ctx, queue[0])

    

async def start(self, ctx, link_yt):
      global is_playing
      is_playing = True
      FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
      YTDL_OPTIONS = {'format':"bestaudio"}
      vc = ctx.voice_client
      with youtube_dl.YoutubeDL(YTDL_OPTIONS) as ydl:
        info = ydl.extract_info(link_yt, download=False)
        url2 = info['formats'][0]['url']
        source = await discord.FFmpegOpusAudio.from_probe(url2, **FFMPEG_OPTIONS)
        vc.play(source)
        await asyncio.sleep(info['duration'] + 1)
        print("Done")
        del queue[0]
        is_playing = False


    


    Final Note : I did try to download and play the song but in the end it gave me the following error :

    


    Options reconnect not found.