Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (67)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

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

Sur d’autres sites (8251)

  • Python vlc stream from outside NAT

    7 octobre 2020, par xKedar

    I'm trying to stream, using FFmpeg, my webcam and audio from PC1 to PC2 in another LAN.

    &#xA;

    PC1 : Public IP address with port forwarding so I can reach it

    &#xA;

    PC2 : In a different NAT from PC1

    &#xA;

    I basically run a server on PC1 in order to acquire IP and port from PC2 and reply on the same address

    &#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 the same port number both for the server(localPort) and the 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(PC2) 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;

    Where I basically try to reach the server both to send my IP:Port and to punch a hole in the NAT in order to be able to get the packages sent from PC1 despite being behind a NAT.

    &#xA;

    I think it is not working because I can not reach PC2 but I really can not figure out how to fix that because I was expecting that the first part, where I reach PC1 from PC2 was enough in order to establish a connection

    &#xA;

  • Trying to merge these two FFMPEG commands... failing

    6 juin 2019, par WebDev

    i have two commands which are part of a larger set of commands. basically i need to merge these two into one command to speed things up. can anyone help me please ?

    ffmpeg -y -f concat -safe 0 -protocol_whitelist "file,http,https,tcp,tls" -i "photos.txt" -i "mainscreen.png" -i "audio.mp3" -filter_complex "scale=3840x2160,zoompan=z='if(lte(zoom,1.0),1.2,max(1.001,zoom-0.0015))':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':s=1280x720:fps=15:d=120, overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2, drawtext=fontfile=font.otf:text='%%~ni':fontcolor=black:fontsize=32:x=90:y=582" -preset veryfast -tune stillimage -shortest -pix_fmt yuv420p "slideshow.mp4"

    ffmpeg -y -i "slideshow.mp4" -filter_complex "[0:a]showwaves=mode=cline:s=110x36:r=15:scale=sqrt:colors=0x222222,colorkey=0x000000:0.01:0.1,format=yuva420p[v];[0:v][v]overlay=77:444,scale=1280:720[outv]" -map "[outv]" -map 0:a -preset veryfast "done.mp4"

    thank you in advance

  • Generating thumbnails from multiple videos on Desktop, using ffmpeg, or something similar

    6 février 2013, par Birk

    Hi guys this is a long shot but here goes...

    I basically have what I mentioned in the title running on my server. When I upload a video ffmpeg decomplies it and gives me screenshots, then I pick a screenshot that I want to use for that video. Currently, my server can process 3 videos at a time. The down side is that this uses up A LOT of the server processing power. :(

    Is there a way, or a program, that can process several video at a time and generate me screenshots on my Desktop ? If this is possible then I can just use my spare computer here to process everything then upload the screenshots/video to my server.

    This is what I basically have running now on the server. kayweb.com.au/blogs/Web-Development/Generating-screenshots-using-FFmpeg

    Something like this, But this thumbnail generator puts everything into one image. I need to be able to choose with thumbnail I want to use.
    http://www.tothepc.com/archives/make-movie-caps-screenshots-with-free-video-thumbnails-maker/

    Anyone have any suggestions ?