Recherche avancée

Médias (2)

Mot : - Tags -/map

Autres articles (107)

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

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (13938)

  • Python ThreadedTCPServer : "Name or service not known"

    11 avril 2014, par Hal

    I was developing a ThreadedTCPServer to communicate with a PHP application also residing in this same machine. This is suppose to receive requests from this PHP app and to convert some videos locally using ffmpeg.

    Here's the code :

    # -*- coding: utf-8 -*-
    import os
    import socket
    import threading
    import logging.config
    import SocketServer, time
    from queuev2 import QueueServer

    logging.basicConfig(format='[%(asctime)s.%(msecs).03d] %(message)s', datefmt='%Y-%m-%d %H:%M:%S', filename=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'converter.log'), level=logging.INFO)

    class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):

       def handle(self):
           data = self.request.recv(1024)
           cur_thread = threading.current_thread()
           response = "{}: {}".format(cur_thread.name, data)
           videoPool.add(data)
           print "Output! %s" % data
           self.request.sendall(response)

    class ThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
       pass

    if __name__ == "__main__":

       logging.info("Initializing...")
       videoPool = QueueServer()
       HOST, PORT = "localhost", 6666

       server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler)
       ip, port = server.server_address

       # Start a thread with the server -- that thread will then start one
       # more thread for each request
       server_thread = threading.Thread(target=server.serve_forever)

       # Exit the server thread when the main thread terminates
       server_thread.daemon = True
       server_thread.start()

       print("Server loop running in thread: %s" % server_thread.name)

       # "Groundhog day" time
       while True:
           time.sleep(999)
           pass

       #server.shutdown()

    This works well in my development laptop, but on the server i'm getting the following error :

    Traceback (most recent call last):
     File "server.py", line 31, in <module>
       server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler)
     File "/usr/lib/python2.7/SocketServer.py", line 408, in __init__
       self.server_bind()
     File "/usr/lib/python2.7/SocketServer.py", line 419, in server_bind
       self.socket.bind(self.server_address)
     File "/usr/lib/python2.7/socket.py", line 224, in meth
       return getattr(self._sock,name)(*args)
    socket.gaierror: [Errno -2] Name or service not known
    </module>

    I'm guessing it has to do with the port I'm using (6666), but I've tried others and it hasn't been working. Would Unix Domain Sockets be of use here ? Can you give me an example ?

  • How do install ffmpeg in android for youtube-dl

    21 novembre 2019, par Wasp Nesser

    I have got a python code for downloading a video (from youtube) and converting to mp3. I used youtube-dl for these. Python code works in computer. But that error occurred in my android :

    youtube_dl.utils.DownloadError: ERROR: ffprobe/avprobe and ffmpeg/avconv not found. Please install one. [Program finished]

    I couldn’t find how to install these requirments in android . I use application called pydroid3 for executing python codes , installing python libraries and terminal staff. I tried to install ffmpeg and ffprob libraries with pip .But it didn’t helped me. After I tried to execute

    adb shell pm install ffmpeg

    And It didn’t helped me to.

    This is my code :

    import youtube_dl
    import os
    outtmpl = "%(playlist_title)s-%(playlist_uploader)s /%(playlist_index)s %(title)s-%(uploader)s.%(ext)s"
    ydl_opts = {
       'format': 'bestaudio/best',
       'postprocessors': [{
           'key': 'FFmpegExtractAudio',
           'preferredcodec': 'mp3',
           'preferredquality': '192',
       },
           {'key': 'FFmpegMetadata'},
       ],
       'outtmpl' : outtmpl,
    }

    url = input("Enter url : ")

    with youtube_dl.YoutubeDL(ydl_opts) as ydl:

       ydl.download([url])
  • download part youtube video with ffmpeg ?

    1er août 2020, par testoflow

    I can't get this right
    &#xA;ffmpeg works well so can you help me ?

    &#xA;

    #I can't get this right

    &#xA;

    #!/bin/bash&#xA;var=$(xclip -o)&#xA;&#xA;if [ -z $var ]; then  &#xA;    echo &#x27;copia url a descargar al portapapeles&#x27;  &#xA;fi  &#xA;&#xA;printf "(1) download part of video without audio\n"&#xA;printf "(2) download part of audio\n"&#xA;echo&#xA;echo -n &#x27;opcion: &#x27;&#xA;read opcion&#xA;case $opcion in&#xA;    "1") c=$(youtube-dl -g $var | awk &#x27;{ if(NR==1) print $0 }&#x27; | sed &#x27;s/^/"/;s/$/"/&#x27;)  &amp;&amp; echo -n &#x27;start time: &#x27; &amp;&amp; read segundos &amp;&amp; echo -n &#x27;duration: &#x27; &amp;&amp; read duration &amp;&amp;  ffmpeg -i $c -ss $segundos -t $duration probe.mp4;;  &#xA;    "2") b=$(youtube-dl -g $var | awk &#x27;{ if(NR==2) print $0 }&#x27; | sed &#x27;s/^/"/;s/$/"/&#x27;)  &amp;&amp; echo $b &amp;&amp; ffmpeg -ss 0 -i $b  -t 10 probe.mp3;;  &#xA;esac  &#xA;

    &#xA;