Recherche avancée

Médias (1)

Mot : - Tags -/ipad

Autres articles (112)

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

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (7149)

  • Faster Real Time A.R Drone Video Streaming

    5 septembre 2017, par mike

    I’ve attempted ffplay tcp://192.168.1.1:5555 to video stream from the AR Drone 2.0 ; however, the delay is way too high.

    My second attempt was with the following :

    var arDrone = require('ar-drone');
    var http    = require('http');

    console.log('Connecting png stream ...');

    var pngStream = arDrone.createClient().getPngStream();

    var lastPng;
    pngStream
     .on('error', console.log)
     .on('data', function(pngBuffer) {
       lastPng = pngBuffer;
     });

    var server = http.createServer(function(req, res) {
     if (!lastPng) {
       res.writeHead(503);
       res.end('Did not receive any png data yet.');
       return;
     }

     res.writeHead(200, {'Content-Type': 'image/png'});
     res.end(lastPng);
    });

    server.listen(8080, function() {
     console.log('Serving latest png on port 8080 ...');
    });

    This only streamed images. I had to refresh browser every second.

    My third option was using this option :

    var arDrone=require('ar-drone')
    var client= arDrone.createclient();
    require('ar-drone-png-stream')(client,{port:8000})

    It streamed a lot of images in a short amount of time. The delay is still significant and I’m looking for a video.

    Are there other approaches that will significantly lower the delay of the video stream ?

  • AudioContext HTML5 Player

    15 février 2015, par Plyto

    So I’ve been playing with the Web Audio API and have the following issue.

    I am making a project in which I call an external library’s API with Ajax and get audio back (arraybuffer).

    • I send them the text and get audio back.
    • This is not necessarily a GET request (can be POST, etc.)
    • If text is too large, I split it into smaller chunks and send multiple requests

    So far so good, now comes the issue of how to play the multiple audios that I got back.

    Since users do not care that I have split the text and actually have multiple audio tracks, I need somehow to make it look like a single track or as a playlist.

    So I have tried to :

    • merge arraybuffer (apparently it does not work like that and most likely I need ffmpeg or simiar tools to do the merging, which is hard to do on client-side ? (like there is ffmpeg for browsers, but I don’t know how good is it to burden a client with it). If it’s not so, maybe you can suggest something here)
    • load it as a playlist, but so far cannot find a library that accepts multiple audiobuffers/audiocontexts and/or gives a playlist with it back.

    The easiest solution that I see so far is to create my own small library that accepts AudioBuffers/arraybuffers and go either with the playlist approach or play the ’chunked’ audios one by one and make scrubber that jumps between audio contexts.

    Is there a library/easier approach ?

    Will be thankful for any suggestions :]

  • Youtube-dl and Ffmpeg

    25 juin 2022, par Joksy

    i have made a music bot with discord.py, but i get this info thing and it doesnt work anymore error [youtube] QxYdBvB8sOY: Downloading webpage 985104597242773505 [2022-06-25 07:45:51] [INFO    ] discord.player: Preparing to terminate ffmpeg process 37580. [2022-06-25 07:45:51] [INFO    ] discord.player: ffmpeg process 37580 has not terminated. Waiting to terminate... [2022-06-25 07:45:51] [INFO    ] discord.player: ffmpeg process 37580 should have terminated with a return code of 1. this is my code

    


    import discord
import os
import asyncio
import youtube_dl
from discord import *

token = "token is here"
prefix = "j!"
blocked_words = ["blocked words are here"]

voice_clients = {}

yt_dl_opts = {'format': 'bestaudio/best'}
ytdl = youtube_dl.YoutubeDL(yt_dl_opts)

ffmpeg_options = {'options': "-vn"}

intents = discord.Intents.default()
intents.message_content = True

client = discord.Client(intents=intents)


programmer_role = "987018590152699964"
            


@client.event
async def on_ready():
    print(f"Bot logged in as {client.user}")

@client.event
async def on_message(msg):
    if msg.author != client.user:
        if msg.content.lower().startswith(f"{prefix}info"):
            await msg.channel.send(f"Hi, Im JoksysBot Made By Joksy!")

        for text in blocked_words:
            if text in str(msg.content.lower()):
                await msg.delete()
                await msg.channel.send("Hey, Dont Say That!")
                return
        if msg.content.startswith(f"{prefix}play"):

            try:
                voice_client = await msg.author.voice.channel.connect()
                voice_clients[voice_client.guild.id] = voice_client
            except:
                print("error")

            try:
                url = msg.content.split()[1]

                loop = asyncio.get_event_loop()
                data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=False))

                song = data['url']
                player = discord.FFmpegPCMAudio(song, **ffmpeg_options, executable="C:\\Users\\jonas\\Documents\\ffmpeg-2022-06-16-git-5242ede48d-full_build\\ffmpeg-2022-06-16-git-5242ede48d-full_build\\bin\\ffmpeg.exe")

                voice_clients[msg.guild.id].play(player)

            except Exception as err:
                print(err)

        if msg.content.startswith(f"{prefix}pause"):
            try:
                voice_clients[msg.guild.id].pause()
            except Exception as err:
                print(err)

        if msg.content.startswith(f"{prefix}resume"):
            try:
                voice_clients[msg.guild.id].resume()
            except Exception as err:
                print(err)

        if msg.content.startswith(f"{prefix}stop"):
            try:
                voice_clients[msg.guild.id].stop()
                await voice_clients[msg.guild.id].disconnect()
            except Exception as err:
                print(err)

client.run(token)



    


    its weird since all the other code in my bot works fine like the !info command, so it must be an error with either youtube-dl or ffmpeg. But then again it doesnt join the voice call in the first place so that might be the error. i added ffmpeg to path but i still wrote the path to it here player = discord.FFmpegPCMAudio(song, **ffmpeg_options, executable="C:\\Users\\jonas\\Documents\\ffmpeg-2022-06-16-git-5242ede48d-full_build\\ffmpeg-2022-06-16-git-5242ede48d-full_build\\bin\\ffmpeg.exe"). i followed this tutorial for the bot https://www.youtube.com/watch?v=Q8wxin72h50&t=1040s i did everything he did but it didnt work. My discord.py version is 2.0.0 my Python version is 3.10.5 and my youtube_dl version is 2021.12.17 my ffmpeg download is ffmpeg-2022-06-16-git-5242ede48d-full_build. I tested it on discord.py 1.73 and it worked fine. This was in intellij though whilst my main program is in Visual Studio Code but i couldnt see it making any big difference so it could be the intents that makes the program not work.I couldnt see any mistakes in the code but im new to discord.py, youtube_dl and ffmpeg stuff so unless visual studio code showed me what i did wrong, i wouldnt notice. But what did i do wrong and how can i fix it ?