Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (88)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, 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 (...)

  • La gestion des forums

    3 novembre 2011, par

    Si les forums sont activés sur le site, les administrateurs ont la possibilité de les gérer depuis l’interface d’administration ou depuis l’article même dans le bloc de modification de l’article qui se trouve dans la navigation de la page.
    Accès à l’interface de modération des messages
    Lorsqu’il est identifié sur le site, l’administrateur peut procéder de deux manières pour gérer les forums.
    S’il souhaite modifier (modérer, déclarer comme SPAM un message) les forums d’un article particulier, il a à sa (...)

Sur d’autres sites (11140)

  • FFMPEG : tee pseudo-muxer to RTMP endpoint with authorization

    20 janvier 2019, par stevendesu

    I have an RTMP server which requires authorization to stream to. In FFMPEG, I can stream to it like so :

    ffmpeg \
       -i <input /> \
       -c:v libx264 \
       -c:a speex \
       -f flv \
       "rtmp://server/instance live=true pubUser=user pubPasswd=pass playpath=stream_id"

    Now I wish to split this stream out to two such endpoints without re-encoding

    I can get it working with re-encoding like so :

    ffmpeg \
       -i <input /> \
       -c:v libx264 \
       -c:a speex \
       -f flv \
       "rtmp://server1/instance live=true pubUser=user pubPasswd=pass playpath=stream_id"
       -c:v libx264 \
       -c:a speex \
       -f flv \
       "rtmp://server2/instance live=true pubUser=user pubPasswd=pass playpath=stream_id"

    However I tried taking a look at FFMPEG’s guide on this subject and it led to nothing but errors :

    Attempt 1

    Direct usage of -f tee

    ffmpeg \
       -i <input /> \
       -c:v libx264 \
       -c:a speex \
       -f tee \
       -map 0:v \
       -map 0:a \
       "[f=flv]rtmp://server1/instance live=true pubUser=user pubPasswd=pass playpath=stream_id| \
        [f=flv]rtmp://server2/instance live=true pubUser=user pubPasswd=pass playpath=stream_id"

    Yields :

    [rtmp @ 0x3fe7f40] No credentials set
    [rtmp @ 0x3fe7f40] Server error: [ AccessManager.Reject ] : [ code=403 need auth ] :

    Attempt 2

    Using quotes around URL and parameters

    ffmpeg \
       -i <input /> \
       -c:v libx264 \
       -c:a speex \
       -f tee \
       -map 0:v \
       -map 0:a \
       "[f=flv]\"rtmp://server1/instance live=true pubUser=user pubPasswd=pass playpath=stream_id\"| \
        [f=flv]\"rtmp://server2/instance live=true pubUser=user pubPasswd=pass playpath=stream_id\""

    Yields :

    [tee @ 0x39837e0] Slave '[f=flv]"rtmp://server1/instance live=true pubUser=user pubPasswd=pass playpath=stream_id"': error opening: No such file or directory

    Attempt 3

    Quotes around everything

    ffmpeg \
       -i <input /> \
       -c:v libx264 \
       -c:a speex \
       -f tee \
       -map 0:v \
       -map 0:a \
       "\"[f=flv]rtmp://server1/instance live=true pubUser=user pubPasswd=pass playpath=stream_id\"| \
        \"[f=flv]rtmp://server2/instance live=true pubUser=user pubPasswd=pass playpath=stream_id\""

    Yields :

    [NULL @ 0x393a820] Unable to find a suitable output format for '"[f=flv]rtmp://server1/instance live=true pubUser=user pubPasswd=pass playpath=stream_id"'

    Attempt 4

    Alternate URL schema to avoid spaces

    ffmpeg \
       -i <input /> \
       -c:v libx264 \
       -c:a speex \
       -f tee \
       -map 0:v \
       -map 0:a \
       "[f=flv]rtmp://user:pass@server1/instance/stream_id| \
        [f=flv]rtmp://user:pass@server2/instance/stream_id"

    This seemed to work, but FFMPEG started outputting this :

    frame=   89 fps= 13 q=0.0 Lsize=N/A time=00:00:03.27 bitrate=N/A dup=18 drop=0 speed=0.469x

    Notice the bitrate=N/A and the speed=0.469x ? Both concerns. Then I go to the player to watch my stream and it’s solid black. No data is actually coming through.

    What am I doing wrong, and how do I get this stream working ?

  • Is there a way to use youtube-dl in async

    8 octobre 2024, par Stam Kaly

    I have an application where I use zmq with asyncio to communicate with the clients who have the ability to download a video with youtube-dl to the server. I tried adding await to youtube_dl's download function but it gave me an error since it was not a coroutine. My code right now is simply looking like this :

    &#xA;&#xA;

    import asyncio&#xA;import youtube_dl&#xA;&#xA;&#xA;async def networking_stuff():&#xA;    download = True&#xA;    while True:&#xA;        if download:&#xA;            print("Received a request for download")&#xA;            await youtube_to_mp3("https://www.youtube.com/watch?v=u9WgtlgGAgs")&#xA;            download = False&#xA;        print("Working..")&#xA;        await asyncio.sleep(2)&#xA;&#xA;&#xA;async def youtube_to_mp3(url):&#xA;    ydl_opts = {&#xA;        &#x27;format&#x27;: &#x27;bestaudio/best&#x27;,&#xA;        &#x27;postprocessors&#x27;: [{&#xA;            &#x27;key&#x27;: &#x27;FFmpegExtractAudio&#x27;,&#xA;            &#x27;preferredcodec&#x27;: &#x27;mp3&#x27;,&#xA;            &#x27;preferredquality&#x27;: &#x27;192&#x27;,&#xA;        }]&#xA;    }&#xA;&#xA;    with youtube_dl.YoutubeDL(ydl_opts) as ydl:&#xA;        ydl.download([url])&#xA;&#xA;&#xA;loop = asyncio.get_event_loop()&#xA;loop.create_task(networking_stuff())&#xA;loop.run_forever()&#xA;

    &#xA;&#xA;

    which gives the following output :

    &#xA;&#xA;

    Received a request for download&#xA;[youtube] u9WgtlgGAgs: Downloading webpage&#xA;[youtube] u9WgtlgGAgs: Downloading video info webpage&#xA;[youtube] u9WgtlgGAgs: Extracting video information&#xA;[youtube] u9WgtlgGAgs: Downloading MPD manifest&#xA;[download] Destination: The Cardigans - My Favourite Game “Stone Version”-u9WgtlgGAgs.webm&#xA;[download] 100% of 4.20MiB in 00:03&#xA;[ffmpeg] Destination: The Cardigans - My Favourite Game “Stone Version”-u9WgtlgGAgs.mp3&#xA;Deleting original file The Cardigans - My Favourite Game “Stone Version”-u9WgtlgGAgs.webm (pass -k to keep)&#xA;Working..&#xA;Working..&#xA;....&#xA;Working..&#xA;Working..&#xA;

    &#xA;&#xA;

    whereas I would expect the Working.. message to be printed in between youtube-dl's messages as well. Am I missing something here or is this impossible with async/await ? Is ffmpeg blocking ? If so, can I run the download in async without converting to mp3 or is using threads the only way ?

    &#xA;

  • Unknown issue with Discord.js and ytdl, completely skips playing audio

    21 novembre 2017, par Gman0064

    One of the commands I have for my Discord bot is to play a predefined music clip in the current user’s voice channel. The bot can connect, but rather than playing the song, it instantaneously leaves. I’ve tried using both connection.playStream as well as connection.playFile, and both seem to return the same (lack of) output. Am I missing some sort of dependency or is my code just written incorrectly ? Any help would be greatly appreciated !

    const Discord = require('discord.js');
    const ytdl = require('ytdl-core');
    const client = new Discord.Client();
    const streamOptions = { seek: 0, volume: 1};

    client.on('ready', () => {
     console.log('Login Success');
    });

    client.on('message', message => {
     if (message.content === '$vaporwave') {
       if (!message.guild) return;
       if(message.member.voiceChannel) {
         message.member.voiceChannel.join().then(connection => {
           console.log("joined channel");
           //const stream = ytdl('https://www.youtube.com/watch?v=cU8HrO7XuiE', { filter : 'audioonly' });
           const dispatcher = connection.playFile('./mcp420.mp3');
           //const dispatcher = connection.playStream(stream, streamOptions);
           dispatcher.on("end", end => {
             console.log("left channel");
             message.member.voiceChannel.leave();
           });
         }).catch(err => console.log(err));
       }
     }
    });
    • NPM v4.6.1
    • Node.js v8.9.1
    • FFMPEG v3.2.8-1