Recherche avancée

Médias (91)

Autres articles (50)

  • 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 (...)

  • 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 (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (5691)

  • Switching YouTube Live Stream Source FFMPEG

    26 juillet 2023, par AsadSMalik

    I'm experimenting with a live stream on YouTube where I can switch the source of it based on some external inputs. So for example, I have two webcams and by default the live stream shows the stream from webcam 1. Then based on some input, it needs to switch to broadcasting the stream from webcam 2. This is what I have so far but it disrupts the stream with the buffering loading circle before it switches to the second one instead of being like an instant switch.

    


    This is the code I'm using to create the ffmpeg command which runs to stream to YouTube.

    


    def create_ffmpeg_cmd(cam_uri):
    return ['ffmpeg',
            '-i', cam_uri,
            '-c:v', 'libx264',
            '-f', 'flv',
            f"{YOUTUBE_STREAM_URI}/{YOUTUBE_STREAM_KEY}"
            ]


    


    This is the code block which runs to switch streams when next_stream_uri is updated.

    


        def run(self, *args, **kwargs):
        command = create_ffmpeg_cmd(DEFAULT_CAM_URI)
        p = sp.Popen(command, stdin=sp.PIPE)
        stream_uri = self.next_stream_uri
        while True:
            if self.next_stream_uri != stream_uri:
                print(f"Changing stream from {stream_uri} to {self.next_stream_uri} ...")
                stream_uri = self.next_stream_uri
                cmd = create_ffmpeg_cmd(stream_uri)
                new_p = sp.Popen(cmd, stdin=sp.PIPE)
                time.sleep(1)
                p.terminate()
                p = new_p


    


    I put in the time.sleep(1) before terminating the first one to see if that works but I still see some buffering happening. Not sure if it's even possible to achieve a seamless switch but wanted to see if there are some better ways of doing it.

    


  • FFmpeg YouTube live streaming automatically stopped after some time (6- 9 min) RTMP node js

    30 juin 2020, par Avneesh Singh

    I am developing a feature where I am capturing the desktop screen and live streaming on YouTube by using the FFmpeg module. The streaming is working fine but the problem is it stopped automatically after some time like 6-9 min and YouTube is showing "no data" receiving.
Below I attached the code.
const process = spawn(pathToFfmpeg,["-probesize", "10M", "-f", "gdigrab", "-i", "desktop", "-framerate", "30", "-f", "dshow", "-i", "audio= Microphone (2 - USB audio device)", "-filter_complex", "amix=inputs=1", "-preset", "fast", "-g", "60", "-tune", "zerolatency", "-c:v", "libx264", "-crf", "10", "-pix_fmt", "yuv420p", "-map", "0", "-maxrate", "1M", "-bufsize", "2M", "-vsync", "vfr", "-acodec", "pcm_s16le", "-b:v", "4500k", "-b:a", "128k", "-f", "flv", "-", ], 
stdio : "pipe"

) ;

    


    after that, I am encoding it by using FFmpeg path.
let proc = ffmpeg(stream).size('1920x1080').videoBitrate('4500k').videoCodec('libx264').fps(30).audioBitrate('128k').audioCodec('aac').audioFrequency(22050).audioChannels(2).toFormat('flv').on('end', () => console.log('file has been converted succesfully') ;).on('error', (err) => console.log('an error happened : ' + err) ;).save(publish) ;

    


  • Piping output of youtube-dl to a script using ffmpeg looks ok using echo but returns an error when executing

    22 février 2016, par user556068

    I am trying to use youtube-dl to get the urls of some videos and then pipe the resulting urls into the input of my script. So in my terminal I do

    youtube-dl --ignore-config -iga ~/Desktop/youtube/videolist.txt | myscript.sh

    In my script I define things as

    command='ffmpeg'        
    inputArgs='-i'              
    outputArgs='-c:v libx264 -preset ultrafast -qp 0'      
    directory="${HOME}/Desktop/Videos/"
    output="video${count}"      
    extension='mp4'        

    I test it with echo to make sure everything appears in the correct order.

    echo "${command}" "${inputArgs}" "${input}" "${outputArgs}" \
    "${directory}""${output}${count}"."${extension}"

    And the output from that looks correct. But when I try to run the same thing without the preceding echo command, i.e.,

    "${command}" "${inputArgs}" "${input}" "${outputArgs}" \
    "${directory}""${output}${count}"."${extension}"

    I get an error message that says

    At least one output file must be specified.

    So it seems pretty obvious to me that I’m doing something wrong when attempting to execute it.

    I have tried :

    • quoting the entire line as a whole
    • quoting different sections together
    • using the exec command in front of everything

    No matter what I do, an error occurs at some point in the process. I know it’s something simple I’m doing wrong. Would someone please enlighten me as to what that might be ?

    I feel very strongly that the . shouldn’t just be in the middle of everything like that, but I really don’t know.

    Again, everything looks as it should when I run echo before the string of shell parameters.

    If more of the script I’m using is needed to understand what I’m talking about, that is not a problem.