Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (53)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (9219)

  • build : Let all MJPEG-related decoders depend on the MJPEG decoder

    28 février 2014, par Diego Biurrun
    build : Let all MJPEG-related decoders depend on the MJPEG decoder
    

    These codecs compile all of the MJPEG code anyway, so there is little
    point in not enabling the MJPEG decoder directly. This also simplifies
    the dependency declarations for the MJPEG codec family.

    • [DBH] configure
    • [DBH] libavcodec/Makefile
  • fftools/ffmpeg_filter : simplify choose_pix_fmts

    25 octobre 2023, par Niklas Haas
    fftools/ffmpeg_filter : simplify choose_pix_fmts
    

    The only meaningful difference between choose_pix_fmts and the default
    code was the inclusion of an extra branch for `keep_pix_fmt` being true.

    However, in this case, we either :
    1. Force the specific `ofp->format` that we inherited from
    ofilter_bind_ost, or if no format was set :
    2. Print an empty format list

    Both of these goals can be accomplished by simply moving the decision
    logic to ofilter_bind_ost, to avoid setting any format list when
    keep_pix_fmt is enabled. This is arguably cleaner as it moves format
    selection logic to a single function. In the case of branch 1, nothing
    else needs to be done as we already force the format provided in
    ofp->format, if any is set. Add an assertion to verify this assumption
    just in case.

    (Side note : The "choose_*" family of functions are arguably misnomers,
    as they should really be called "print_*" - their current behavior is to
    print the relevant format lists to the `vf/af_format` filter arguments)

    Signed-off-by : Anton Khirnov <anton@khirnov.net>
    Signed-off-by : Niklas Haas <git@haasn.dev>

    • [DH] fftools/ffmpeg_filter.c
  • FFmpeg streaming UDP

    2 octobre 2020, par xKedar

    I'm trying to stream, using FFmpeg, my webcam and audio to a PC in another LAN that connects to mine.

    &#xA;

    I basically wait for incoming connection in order to acquire IP and port of the other side

    &#xA;

        import socket&#xA;&#xA;    localPort   = 1234&#xA;    bufferSize  = 1024&#xA;&#xA;    UDPServerSocket = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM)&#xA;    UDPServerSocket.bind(("", localPort)) # Bind to address and port&#xA;&#xA;    while(True):&#xA;        bytesAddressPair = UDPServerSocket.recvfrom(bufferSize)&#xA;        message = bytesAddressPair[0].decode("utf-8")&#xA;        address = bytesAddressPair[1]&#xA;        # Sending a reply to client&#xA;        UDPServerSocket.sendto(str.encode("Hello"), address)&#xA;        break&#xA;&#xA;    UDPServerSocket.close()&#xA;

    &#xA;

    Then I try to send the stream with FFmpeg using the same port number both for server(localPort) and client(the one I acquired from address)

    &#xA;

        import re&#xA;    from threading import Thread&#xA;    from subprocess import Popen, PIPE&#xA;&#xA;    def detect_devices():&#xA;            list_cmd = &#x27;ffmpeg -list_devices true -f dshow -i dummy&#x27;.split()&#xA;            p = Popen(list_cmd, stderr=PIPE)&#xA;            flagcam = flagmic = False&#xA;            for line in iter(p.stderr.readline,&#x27;&#x27;):&#xA;                if flagcam:&#xA;                    cam = re.search(&#x27;".*"&#x27;,line.decode(encoding=&#x27;UTF-8&#x27;)).group(0)&#xA;                    cam = cam if cam else &#x27;&#x27;&#xA;                    flagcam = False&#xA;                if flagmic:&#xA;                    mic = re.search(&#x27;".*"&#x27;,line.decode(encoding=&#x27;UTF-8&#x27;)).group(0)&#xA;                    mic = mic if mic else &#x27;&#x27;&#xA;                    flagmic = False&#xA;                elif &#x27;DirectShow video devices&#x27;.encode(encoding=&#x27;UTF-8&#x27;) in line:&#xA;                    flagcam = True&#xA;                elif &#x27;DirectShow audio devices&#x27;.encode(encoding=&#x27;UTF-8&#x27;) in line:&#xA;                    flagmic = True&#xA;                elif &#x27;Immediate exit requested&#x27;.encode(encoding=&#x27;UTF-8&#x27;) in line:&#xA;                    break&#xA;            return cam, mic   &#xA;&#xA;&#xA;    class ffmpegThread (Thread):&#xA;        def __init__(self, address):&#xA;            Thread.__init__(self)&#xA;            self.address = address&#xA;&#xA;        def run(self):&#xA;            cam, mic = detect_devices()&#xA;            command = &#x27;ffmpeg -f dshow -i video=&#x27;&#x2B;cam&#x2B;&#x27;:audio=&#x27;&#x2B;mic&#x2B;&#x27; -profile:v high -pix_fmt yuvj420p -level:v 4.1 -preset ultrafast -tune zerolatency -vcodec libx264 -r 10 -b:v 512k -s 240x160 -acodec aac -ac 2 -ab 32k -ar 44100 -f mpegts -flush_packets 0 -t 40 udp://&#x27;&#x2B;self.address&#x2B;&#x27;?pkt_size=1316?localport=&#x27;&#x2B;str(localPort)&#xA;            p = Popen(command , stderr=PIPE)&#xA;            for line in iter(p.stderr.readline,&#x27;&#x27;):&#xA;                if len(line) &lt;5: break&#xA;            p.terminate()&#xA;&#xA;    thread1 = ffmpegThread(address[0]&#x2B;":"&#x2B;str(address[1]))&#xA;    thread1.start()&#xA;

    &#xA;

    While on the other side I have :

    &#xA;

        from threading import Thread&#xA;    import tkinter as tk&#xA;    import vlc&#xA;&#xA;    class myframe(tk.Frame):&#xA;        def __init__(self, width=240, height=160):&#xA;            self.root = tk.Tk()&#xA;            super(myframe, self).__init__(self.root)&#xA;            self.root.geometry("%dx%d" % (width, height))&#xA;            self.root.wm_attributes("-topmost", 1)&#xA;            self.grid()&#xA;            self.frame = tk.Frame(self, width=240, height=160)&#xA;            self.frame.configure(bg="black")&#xA;            self.frame.grid(row=0, column=0, columnspan=2)&#xA;            self.play()&#xA;            self.root.mainloop()&#xA;&#xA;        def play(self):&#xA;            self.player = vlc.Instance().media_player_new()&#xA;            self.player.set_mrl(&#x27;udp://@0.0.0.0:5000&#x27;)&#xA;            self.player.set_hwnd(self.frame.winfo_id())&#xA;            self.player.play()&#xA;&#xA;    class guiThread (Thread):&#xA;        def __init__(self, nome):&#xA;            Thread.__init__(self)&#xA;            self.nome = nome&#xA;&#xA;        def run(self):&#xA;            app = myframe()&#xA;

    &#xA;

    and :

    &#xA;

        import socket&#xA;&#xA;    msgFromClient       = "Hello UDP Server"&#xA;    bytesToSend         = str.encode(msgFromClient)&#xA;    serverAddressPort   = ("MYglobal_IPaddress", 1234)&#xA;    bufferSize          = 1024&#xA;    localPort   = 5000&#xA;&#xA;    # Create a UDP socket at client side&#xA;    UDPClientSocket = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM) &#xA;    UDPClientSocket.bind(("", localPort))&#xA;&#xA;    UDPClientSocket.sendto(bytesToSend, serverAddressPort)&#xA;&#xA;    msgFromServer = UDPClientSocket.recvfrom(bufferSize)&#xA;    msg = msgFromServer[0].decode("utf-8")&#xA;    print(msg)&#xA;    UDPClientSocket.close()&#xA;    gui = guiThread("ThreadGUI")&#xA;    gui.start()&#xA;

    &#xA;

    I'm not able to reach the client with the stream. I tested everything else so the problem should be in the way I try to reach the client

    &#xA;