Recherche avancée

Médias (91)

Autres articles (103)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (10188)

  • FFmpeg youtube livestreaming [closed]

    23 janvier 2024, par T1WT

    I'm developing a project for streaming on YouTube. I use Python + ffpeg in the code. I haven’t been able to fix the problem for a month now - after a while (from 6 to 20 hours) buffering begins. In the command I use -c copy. But after this time, I came to the conclusion that most likely the buffering (namely, the stream gradually drops from speed x1 to speed x0.9 and below) is due to the disk. My server has SATA. Moreover, the problem is that the disk reaches 100% active time. And around this time the flow speed begins to drop. Moreover, the total read/write speed is only 20MB/sec. How to fix it ? Thanks for your help, I really can't stand it anymore.

    


    I’ll say right away that the potential of the project is great, now there are only 50 streams on YouTube, but then there may be more than 10,000.

    


    I tried a lot but settled on the SATA drive and

    


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

    



    import asyncio
import youtube_dl


async def networking_stuff():
    download = True
    while True:
        if download:
            print("Received a request for download")
            await youtube_to_mp3("https://www.youtube.com/watch?v=u9WgtlgGAgs")
            download = False
        print("Working..")
        await asyncio.sleep(2)


async def youtube_to_mp3(url):
    ydl_opts = {
        'format': 'bestaudio/best',
        'postprocessors': [{
            'key': 'FFmpegExtractAudio',
            'preferredcodec': 'mp3',
            'preferredquality': '192',
        }]
    }

    with youtube_dl.YoutubeDL(ydl_opts) as ydl:
        ydl.download([url])


loop = asyncio.get_event_loop()
loop.create_task(networking_stuff())
loop.run_forever()


    



    which gives the following output :

    



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


    



    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 ?

    


  • How to stream to YouTube from an X server using DISPLAY with ffmpeg ? [closed]

    21 avril, par Ahmed Seddik Bouchiba

    I'm trying to stream my desktop (from an X11 session) to YouTube Live using ffmpeg. I'm running this on a Linux machine with an active X server, and I set the DISPLAY variable accordingly (:0 in most cases).

    


    Here's the ffmpeg command I've tried :

    


    ffmpeg -loglevel info \
    -probesize ${PROBESIZE} -analyzeduration ${ANALYZE_DURATION} \
    -f x11grab -video_size ${VIDEO_SIZE} -r ${FRAME_RATE} -draw_mouse 0 -i ${DISPLAY} \
    -f alsa -i default \
    -deinterlace -vcodec libx264 -pix_fmt yuv420p -preset fast \
    -r 30 -g 60 -b:v 2000k -bufsize 4000k \
    -acodec libmp3lame -ar 44100 -b:a 128k \
    -map 0:v:0 -map 1:a:0 -vsync 0 \
    -f flv "${RTMP_URL}" &


    


    Environment variables are set correctly (DISPLAY, VIDEO_SIZE, FRAME_RATE, etc.), and I replaced $RTMP_URL with the correct YouTube RTMP endpoint (e.g., rtmp ://a.rtmp.youtube.com/live2/). But nothing seems to work — the stream never starts or appears on YouTube, and sometimes I get timeout or "connection refused" errors.

    


    I've checked :

    


    That I'm logged into an active X session

    


    That I have access to the display (even tried xhost +)

    


    That ffmpeg has access to ALSA (sound seems okay)

    


    Questions :

    


    Am I missing something in my command ?

    


    Is there a better way to stream both screen and audio from an X server to YouTube Live ?

    


    Could this be a codec or YouTube-specific format issue ?

    


    Any help or working examples would be really appreciated. Thanks !