Recherche avancée

Médias (1)

Mot : - Tags -/3GS

Autres articles (100)

  • MediaSPIP en mode privé (Intranet)

    17 septembre 2013, par

    À partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
    Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
    Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

Sur d’autres sites (12228)

  • Installing a PHP Extension in WAMP - Idiot's Walkthrough ?

    16 mars 2015, par PeregrineStudios

    I’ve been coding with PHP for a while now, but haven’t needed to look at extensions - until now. These are brand-spanking new to me and while I’ve looked for, and found, other tutorials, many of them are using language that I don’t understand, or telling me to do things I don’t know how - I guess they assume most readers are a little more intelligent than I am !

    So : I need to install the extension FFmpeg (here : http://ffmpeg-php.sourceforge.net/). I’m currently developing on a local wamp server. PHP version 5.5.12, Apache version 2.4.9. At some point I’d like to put whatever I’ve done up on a live server, but that can wait.

    I have exactly, precisely, zero understanding of how to do this. I don’t even know what exactly I’d need to download, or where to put it.

    Is there anyone willing to take the time to tell me how to do this ? A real ’idiot’s guide’, breaking down each and every step for someone who’s never done this or really even anything similar before now.

    Thanks so much in advance for any assistance anyone can offer !

    EDIT : Firstly, thanks for down-voting someone for trying to learn. Appreciate it. Secondly, there was an answer here before, and now it’s gone. What gives ? Was it deleted ? Why ?

    EDIT AGAIN : I managed to find a cached version of the page with the answers still on it. For anyone else who wants the YouTube video one of the comments directed me to, here it is : https://www.youtube.com/watch?v=KIq85Eq28PM - still not sure why it was outright removed without anything else being answered in its place.

  • Watching a livestream that is being ripped by ffmpeg to disk - file updating problem

    22 mai 2021, par merlin

    I am automatically recording daily tv news with ffmpeg, so I can watch them later.

    


    ffmpeg -i https://mcdn.daserste.de/daserste/de/master.m3u8 -c copy Tagesschau.mkv


    


    This works. But let's say ffmpeg recorded for 2 minutes and I open the currently saved file and begin to watch the video stops after some time.
It doesn't continue playing (but ffmpeg is still recording so there must be more video).

    


    Strange thing is even by closing and reopening the file I don't see the new content. Sometimes I have to wait 1-2 minutes till the new content shows up. But in the file manager I see the file is growing in size continuous.

    


    But when I copy/paste the file e.g. in the same directory and reopen the file I can immediately see the complete video content up to date recorded.

    


    Maybe it has to do with file system write buffer ? I tried on ZFS and ext4 (mounted on a samba share). By copy/paste I "trigger" the file system to update the file content ?

    


    Is there a workaround so when I start watching it will play without stopping ?

    


  • Python buffered IO ending early streaming with multiple pipes

    5 octobre 2022, par Malibu

    I'm trying to make a continuous livestream of videos downloaded via yt-dlp. I need to port this (working) bash command into Python.

    


    (
    youtube-dl -v --buffer-size 16k https://youtube.com/watch?v=QiInzFHIDp4 -o - | ffmpeg -i - -f mpegts -c copy - ;
    youtube-dl -v --buffer-size 16k https://youtube.com/watch?v=QiInzFHIDp4 -o - | ffmpeg -i - -f mpegts -c copy - ;
) | ffmpeg -re -i - -c:v libx264 -f flv rtmp://127.0.0.1/live/H1P_x5WPF


    


    My Python attempt is cutting off the last 2 seconds of each video. My suspicion is that although the first pipe, yt-dlp, has an empty stdout, there is still data travelling between the second and third pipe. I haven't been able to figure out a way to properly handle the data between those two pipes at the end of the video.

    


    from subprocess import Popen, PIPE, DEVNULL

COPY_BUFSIZE = 65424

playlist = [
    {
        # 15 second video
        "url": "https://youtube.com/watch?v=QiInzFHIDp4"
    },
    {
        # 15 second video
        "url": "https://youtube.com/watch?v=QiInzFHIDp4"
    },
    {
        # 15 second video
        "url": "https://youtube.com/watch?v=QiInzFHIDp4"
    },
]

if __name__ == "__main__":
    stream_cmd = [
        "ffmpeg", "-loglevel", "error",
        "-hide_banner", "-re", "-i", "-",
        "-c:v", "libx264",
        "-f", "flv",
        "-b:v", "3000k", "-minrate", "3000k",
        "-maxrate", "3000k", "-bufsize", "3000k",
        "-r", "25", "-pix_fmt", "yuv420p",
        "rtmp://127.0.0.1/live/H1P_x5WPF"
    ]
    print(f'Stream command:\n"{" ".join(stream_cmd)}"')

    encoder_cmd = [
        "ffmpeg", "-re", "-i", "-", "-f", "mpegts",
        "-c", "copy", "-"
    ]
    print(f'Encoder command:\n"{" ".join(encoder_cmd)}"')

    stream_p = Popen(stream_cmd, stdin=PIPE, stderr=DEVNULL)

    for video in playlist:
        yt_dlp_cmd = [
            "yt-dlp", "-q",
            video["url"],
            "-o", "-"
        ]

        print("Now playing: " + video["url"])

        with Popen(yt_dlp_cmd, stdout=PIPE) as yt_dlp_p:
            with Popen(encoder_cmd, stdin=PIPE, stdout=PIPE, stderr=DEVNULL) as encoder_p:
                while True:
                    yt_dlp_buf = yt_dlp_p.stdout.read(COPY_BUFSIZE)
                    print("READ: yt_dlp")
                    if not yt_dlp_buf:
                        print("yt-dlp buffer empty")
                        # Handle any data in 2nd/3rd pipes before breaking?
                        break

                    written = encoder_p.stdin.write(yt_dlp_buf)
                    print("WRITE: encoder. Bytes: " + str(written))

                    encoder_buf = encoder_p.stdout.read(COPY_BUFSIZE)
                    # if not encoder_buf:
                    #     print("encoder_buf empty")
                    #     break
                    print("READ: encoder")

                    stream_bytes_written = stream_p.stdin.write(encoder_buf)
                    print("WRITE: stream, Bytes: " + str(stream_bytes_written))


    


    Running Python 3.6.9 on MacOS.