Recherche avancée

Médias (91)

Autres articles (62)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 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 (...)

Sur d’autres sites (12347)

  • Podcast Producer 2 REST api

    11 septembre 2009

    I’ve been working on documenting the REST api that PCP2 uses for client server communication as part of a new project. I thought it might be useful to other folks. Consider this a work in progress - I’ve only documented the workflow for doing a multisource recording so far. Follow the job for the info.

    Each section gives a sample command and a sample response.

    All pages are behind basic HTTP auth.

    General sequence of events

    * get workflow list
    * get cameras
    * request status for camera (including thumbnail)
    * start cameras
    * create recording enclosure
    * stop cameras, provide submission_UUID returned by above step, include title


    *URL : https://pcpserver:8170/podcastproducer/info

    *Type : GET

    *Content : version=2

    *Response :
    <pre>
    <podcast_producer_result>
    <action>index</action>
    <status>success</status>
    <plist version="1.0">
    <dict>
    <key>server_version</key>
    <string>2.0</string>
    <key>http_auth_type</key>
    <array>
    <string>basic</string>
    <string>digest</string>
    <string>kerberos</string>
    </array>
    <key>krb_service_principals</key>
    <array>
    <string>pcast/x101-186-103-dhcp.cla.umn.edu@X101-186-103-DHCP.CLA.UMN.EDU</string>
    </array>
    <key>server_uuid</key>
    <string>DB31DA49-10AE-472C-B3B9-86A8F8112399</string>
    <key>cluster_members</key>
    <dict>
    <key>F1021B98-7E7E-44FB-8EB1-E0DA1885D5BA</key>
    <dict>
    <key>date_added</key>
    <string>Tue Sep 01 10:23:49 -0500 2009</string>
    <key>last_update</key>
    <string>Tue Sep 08 10:35:17 -0500 2009</string>
    <key>server_host</key>
    <string>x101-186-103-dhcp.cla.umn.edu</string>
    <key>server_port</key>
    <string>8170</string>
    <key>tunnel_agent_host</key>
    <string>x101-186-103-dhcp.cla.umn.edu</string>
    <key>tunnel_agent_port</key>
    <string>8175</string>
    <key>network_addrs</key>
    <array>
    <string>128.101.186.103</string>
    </array>
    </dict>
    </dict>
    </dict>
    </plist>
    </podcast_producer_result>
    </pre>


    * URL : https://pcpserver:8170/podcastproducer/workflows
    * Type : GET
    * Content : version=2&language=en
    * Response :
    <pre>
    <podcast_producer_result>
    <action>index</action>
    <status>success</status>
    <results>OK</results>
    <plist version="1.0">
    <dict>
    <key>user_fullname</key>
    <string>podcast</string>
    <key>user_shortname</key>
    <string>podcast</string>
    <key>workflows</key>
    <array>
    <dict>
    <key>name</key>
    <string>Montage</string>
    <key>title</key>
    <string>Montage</string>
    <key>description</key>
    <string>Montage workflow</string>
    <key>uuid</key>
    <string>F797D54D-1539-42AA-B6AC-3CB3A4C15EF5</string>
    <key>version</key>
    <string>2.0</string>
    <key>editor</key>
    <string>Podcast Composer</string>
    <key>sources</key>
    <array>
    <dict>
    <key>contentTypes</key>
    <array>
    <string>com.apple.quicktime-movie</string>
    <string>com.adobe.pdf</string>
    <string>com.apple.iwork.keynote.key</string>
    <string>com.apple.iwork.pages.pages</string>
    <string>org.openxmlformats.wordprocessingml.document</string>
    <string>com.microsoft.word.doc</string>
    <string>org.openxmlformats.presentationml.presentation</string>
    <string>com.microsoft.powerpoint.ppt</string>
    <string>com.microsoft.bmp</string>
    <string>com.compuserve.gif</string>
    <string>public.jpeg-2000</string>
    <string>public.jpeg</string>
    <string>com.adobe.pdf</string>
    <string>com.apple.pict</string>
    <string>public.png</string>
    <string>com.adobe.photoshop-image</string>
    <string>com.sgi.sgi-image</string>
    <string>com.truevision.tga-image</string>
    <string>public.tiff</string>
    </array>
    <key>description</key>
    <string>Any Document</string>
    <key>isFolder</key>
    <true/>
    <key>isOptional</key>
    <false/>
    <key>sourceTypes</key>
    <array>
    <string>File</string>
    </array>
    </dict>
    </array>
    <key>user_requirements</key>
    <array>
    <string>Title</string>
    <string>Description</string>
    </array>
    <key>access_control_entries</key>
    <array>
    </array>
    </dict>
    <dict>
    <key>name</key>
    <string>Single Source</string>
    <key>title</key>
    <string>Single Source</string>
    <key>description</key>
    <string>Single Source workflow</string>
    <key>uuid</key>
    <string>DEFA1587-A650-426E-92DA-01C5EB811705</string>
    <key>version</key>
    <string>2.0</string>
    <key>editor</key>
    <string>Podcast Composer</string>
    <key>sources</key>
    <array>
    <dict>
    <key>contentTypes</key>
    <array>
    <string>com.apple.quicktime-movie</string>
    </array>
    <key>description</key>
    <string>Any Video</string>
    <key>isFolder</key>
    <false/>
    <key>isOptional</key>
    <false/>
    <key>sourceTypes</key>
    <array>
    <string>Video</string>
    <string>Screen</string>
    <string>Audio</string>
    <string>File</string>
    </array>
    </dict>
    </array>
    <key>user_requirements</key>
    <array>
    <string>Title</string>
    <string>Description</string>
    </array>
    <key>access_control_entries</key>
    <array>
    </array>
    </dict>
    </array>
    </dict>
    </plist>
    </podcast_producer_result>
    </pre>
    ----

    * URL : https://pcpserver:8170/podcastproducer/cameras
    * Type : GET
    * Content : version=2
    * Response :
    <pre>
    <podcast_producer_result>
    <action>index</action>
    <status>success</status>
    <plist version="1.0">
    <dict>
    <key>cameras</key>
    <array>
    <dict>
    <key>name</key>
    <string>150-A Camera</string>
    <key>uuid</key>
    <string>307682A5-B552-4AFA-B7E2-3811D772C9A1</string>
    <key>connected_to_member_uuid</key>
    <string>F1021B98-7E7E-44FB-8EB1-E0DA1885D5BA</string>
    <key>in_use</key>
    <string>false</string>
    <key>recording_status</key>
    <string>online</string>
    <key>preview_url</key>
    <string>https://x101-186-103-dhcp.cla.umn.edu:8170/podcastproducer/previews/307682A5-B552-4AFA-B7E2-3811D772C9A1.jpg</string> ;
    <key>access_control_entries</key>
    <array>
    </array>
    </dict>
    <dict>
    <key>name</key>
    <string>150-A Epiphan</string>
    <key>uuid</key>
    <string>CE610AB0-CA50-49EB-8FFE-78E57CDCA550</string>
    <key>connected_to_member_uuid</key>
    <string>F1021B98-7E7E-44FB-8EB1-E0DA1885D5BA</string>
    <key>in_use</key>
    <string>false</string>
    <key>recording_status</key>
    <string>online</string>
    <key>preview_url</key>
    <string>https://x101-186-103-dhcp.cla.umn.edu:8170/podcastproducer/previews/CE610AB0-CA50-49EB-8FFE-78E57CDCA550.jpg</string> ;
    <key>access_control_entries</key>
    <array>
    </array>
    </dict>
    </array>
    </dict>
    </plist>
    </podcast_producer_result>
    </pre>


    * URL : https://pcpserver:8170/podcastproducer/cameras/start
    * Type : POST
    * Content : action=pause&version=2&camera_name=150-A%20Camera&controller=cameras
    * Response :
    <pre>
    <podcast_producer_result>
    <action>start</action>
    <status>success</status>
    <results>OK</results>
    </podcast_producer_result>
    </pre>


    * URL : https://pcpserver:8170/podcastproducer/cameras/status
    * Type : POST
    * Content : delay=0&action=start&version=2&camera_name=150-A%20Epiphan&controller=cameras
    * Response :
    <pre><podcast_producer_result>
    <action>status</action>
    <status>success</status>
    <results>OK</results>
    <plist version="1.0">
    <dict>
    <key>preview</key>
    <string>https://x101-186-103-dhcp.cla.umn.edu:8170/podcastproducer/previews/307682A5-B552-4AFA-B7E2-3811D772C9A1.jpg</string> ;
    <key>preview_image_data</key>
    <string>RAW JPEG DATA RAW JPEG DATA RAW JPEG DATA RAW JPEG DATA RAW JPEG DATA</string>
    <key>recording_status</key>
    <string>online</string>
    <key>started_at</key>
    <string>Tue Sep 08 09:31:40 -0500 2009</string>
    <key>stopped_at</key>
    <string>Tue Sep 08 09:32:10 -0500 2009</string>
    <key>elapsed</key>
    <string>41</string>
    <key>last_error</key>
    <string>805306368</string>
    </dict>
    </plist>
    </podcast_producer_result>
    </pre>


    * URL : https://pcpserver:8170/podcastproducer/cameras/pause
    * Type : POST
    * Content : action=pause&version=2&camera_name=150-A%20Camera&controller=cameras
    * Response :
    <pre><podcast_producer_result>
    <action>status</action>
    <status>success</status>
    <results>OK</results>
    <plist version="1.0">
    <dict>
    <key>preview</key>
    <string>https://x101-186-103-dhcp.cla.umn.edu:8170/podcastproducer/previews/307682A5-B552-4AFA-B7E2-3811D772C9A1.jpg</string> ;
    <key>recording_status</key>
    <string>online</string>
    <key>started_at</key>
    <string>Tue Sep 08 09:31:40 -0500 2009</string>
    <key>stopped_at</key>
    <string>Tue Sep 08 09:32:10 -0500 2009</string>
    <key>elapsed</key>
    <string>41</string>
    <key>last_error</key>
    <string>805306368</string>
    </dict>
    </plist>
    </podcast_producer_result></pre>


    * URL : https://pcpserver:8170/podcastproducer/cameras/stop
    * Type : POST
    * Content : workflow_name=&UserMetadata_Description=&submission_uuid=7497E3AC-0A75-4C7C-8C66-26294C9274FE&action=stop&version=2&camera_name=150-A%20Epiphan&controller=cameras&UserMetadata_Title=Test123
    * Response :
    <pre><podcast_producer_result>
    <action>stop</action>
    <status>success</status>
    <results>OK</results>
    </podcast_producer_result>
    </pre>


    * URL : https://pcpserver:8170/podcastproducer/recordings/create
    * Type : POST
    * Content : version=2&workflow_uuid=C6EF52A7-04E3-477D-9F38-6B61F108D7B9
    * Response :
    <pre>
    <podcast_producer_result>
    <action>create</action>
    <status>success</status>
    <results>OK</results>
    <plist version="1.0">
    <dict>
    <key>workflow_uuid</key>
    <string>C6EF52A7-04E3-477D-9F38-6B61F108D7B9</string>
    <key>recording_uuid</key>
    <string>FD5A1459-F7CE-41FA-8155-049DF774298B</string>
    <key>submission_uuids</key>
    <array>
    <string>A626D8E4-E439-4E57-9982-DB4BD035CB41</string>
    <string>CFBCCB74-A41F-42D3-BEAA-58165B1116C6</string>
    </array>
    </dict>
    </plist>
    </podcast_producer_result>
    </pre>

  • Joining realtime raw PCM streams with ffmpeg and streaming them back out

    15 avril 2024, par Nathan Ladwig

    I am trying to use ffmpeg to join two PCM streams. I have it sorta kinda working but it's not working great.

    &#xA;

    I am using Python to receive two streams from two computers running Scream Audio Driver ( ttps ://github.com/duncanthrax/scream )

    &#xA;

    I am taking them in over UDP and writing them to pipes. The pipes are being received by ffmpeg and mixed, it's writing the mixed stream to another pipe. I'm reading that back in Python and sending it to the target receiver.

    &#xA;

    My ffmpeg command is

    &#xA;

    [&#x27;ffmpeg&#x27;, &#xA;&#x27;-use_wallclock_as_timestamps&#x27;, &#x27;true&#x27;, &#x27;-f&#x27;, &#x27;s24le&#x27;, &#x27;-ac&#x27;, &#x27;2&#x27;, &#x27;-ar&#x27;, &#x27;48000&#x27;, &#x27;-i&#x27;, &#x27;/tmp/ffmpeg-fifo-1&#x27;,&#xA;&#x27;-use_wallclock_as_timestamps&#x27;, &#x27;true&#x27;, &#x27;-f&#x27;, &#x27;s24le&#x27;, &#x27;-ac&#x27;, &#x27;2&#x27;, &#x27;-ar&#x27;, &#x27;48000&#x27;, &#x27;-i&#x27;, &#x27;/tmp/ffmpeg-fifo-2&#x27;,&#xA;&#x27;-filter_complex&#x27;, &#x27;[0]aresample=async=1[a0],[1]aresample=async=1[a1],[a0][a1]amix&#x27;, &#x27;-y&#x27;,&#xA;&#x27;-f&#x27;, &#x27;s24le&#x27;, &#x27;-ac&#x27;, &#x27;2&#x27;, &#x27;-ar&#x27;, &#x27;48000&#x27;, &#x27;/tmp/ffmpeg-fifo-in&#x27;]&#xA;

    &#xA;

    My main issue is that it should be reading ffmpeg-fifo-1 and ffmpeg-fifo-2 asynchronously, but it appears to be not. When the buffers get more than 50 frames out of sync with each other ffmpeg hangs and doesn't recover. I would like to fix this.

    &#xA;

    In this hacky test code the number of frames sent over each stream are counted and empty frames are sent if the count hits 12. This keeps ffmpeg happy.

    &#xA;

    The code below takes in two 48KHz 24-bit stereo PCM streams with Scream's header, mixes them, applies the same header, and sends them back out.

    &#xA;

    It works most of the time. Sometimes I'm getting blasted with static, I think this is when only one or two bytes of a frame are making it to ffmpeg, and it loses track.

    &#xA;

    The header is always 1152 bytes of pcm data with a 5 byte header. It's described in the Scream repo readme

    &#xA;

    This is my header :

    &#xA;

    01 18 02 03 00

    &#xA;

    01 - 48KHz&#xA;18 - Sampling Rate (18h=24d, 24bit)&#xA;02 - 2 channels&#xA;03 00 - WAVEFORMATEXTENSIBLE

    &#xA;

    import socket&#xA;import struct&#xA;import threading&#xA;import os&#xA;import sys&#xA;import time&#xA;import subprocess&#xA;import tempfile&#xA;import select&#xA;&#xA;class Sender(threading.Thread):&#xA;    def __init__(self):&#xA;        super().__init__()&#xA;        TEMPDIR = tempfile.gettempdir() &#x2B; "/"&#xA;        self.fifoin = TEMPDIR &#x2B; "ffmpeg-fifo-in"&#xA;        self.start()&#xA;&#xA;    def run(self):&#xA;        self.fd = open(self.fifoin, "rb")&#xA;        self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)&#xA;        while True:&#xA;            try:&#xA;                header = bytes([0x01, 0x18, 0x02, 0x03, 0x00])  # 48khz, 24-bit, stereo&#xA;                data = self.fd.read(1152)&#xA;                sendbuf = header &#x2B; data&#xA;                self.sock.sendto(sendbuf, ("192.168.3.199", 4010))  # Audio sink&#xA;            except Exception as e:&#xA;                print("Except")&#xA;                print(e)&#xA;&#xA;class Receiver(threading.Thread):&#xA;    def __init__(self):&#xA;        super().__init__()&#xA;        TEMPDIR = tempfile.gettempdir() &#x2B; "/"&#xA;        self.fifo1 = TEMPDIR &#x2B; "ffmpeg-fifo-1"&#xA;        self.fifo2 = TEMPDIR &#x2B; "ffmpeg-fifo-2"&#xA;        self.fifoin = TEMPDIR &#x2B; "ffmpeg-fifo-in"&#xA;        self.fifos = [self.fifo1, self.fifo2]&#xA;        try:&#xA;            try:&#xA;                os.remove(self.fifoin)&#xA;            except:&#xA;                pass&#xA;            os.mkfifo(self.fifoin)&#xA;        except:&#xA;            pass&#xA;        self.start()&#xA;        sender=Sender()&#xA;&#xA;    def run(self):&#xA;        ffmpeg_command=[&#x27;ffmpeg&#x27;, &#x27;-use_wallclock_as_timestamps&#x27;, &#x27;true&#x27;, &#x27;-f&#x27;, &#x27;s24le&#x27;, &#x27;-ac&#x27;, &#x27;2&#x27;, &#x27;-ar&#x27;, &#x27;48000&#x27;, &#x27;-i&#x27;, self.fifo1,&#xA;                                  &#x27;-use_wallclock_as_timestamps&#x27;, &#x27;true&#x27;, &#x27;-f&#x27;, &#x27;s24le&#x27;, &#x27;-ac&#x27;, &#x27;2&#x27;, &#x27;-ar&#x27;, &#x27;48000&#x27;, &#x27;-i&#x27;, self.fifo2,&#xA;                                  &#x27;-filter_complex&#x27;, &#x27;[0]aresample=async=1[a0],[1]aresample=async=1[a1],[a0][a1]amix&#x27;, "-y", &#x27;-f&#x27;, &#x27;s24le&#x27;, &#x27;-ac&#x27;, &#x27;2&#x27;, &#x27;-ar&#x27;, &#x27;48000&#x27;, self.fifoin]&#xA;        print(ffmpeg_command)&#xA;&#xA;        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)&#xA;        sock.setsockopt(socket.SOL_SOCKET,socket.SO_RCVBUF,4096)&#xA;        sock.bind(("", 16401))&#xA;&#xA;        recvbuf = bytearray(1157)&#xA;        framecount = [0,0]&#xA;        closed = 1&#xA;        while True:&#xA;            ready = select.select([sock], [], [], .2)&#xA;            if ready[0]:&#xA;                recvbuf, addr = sock.recvfrom(1157)&#xA;                if closed == 1:&#xA;                    for fifo in self.fifos:&#xA;                        try:&#xA;                            try:&#xA;                                os.remove(fifo)&#xA;                            except:&#xA;                                pass&#xA;                            os.mkfifo(fifo)&#xA;                        except:&#xA;                            pass&#xA;                    framecount = [0,0]&#xA;                    print("data, starting ffmpeg")&#xA;                    ffmpeg = subprocess.Popen (ffmpeg_command, shell=False, stdout=subprocess.PIPE, stdin=subprocess.PIPE)&#xA;                    fifo1_fd = os.open(self.fifo1, os.O_RDWR)&#xA;                    fifo1_file = os.fdopen(fifo1_fd, &#x27;wb&#x27;, 0)&#xA;                    fifo2_fd = os.open(self.fifo2, os.O_RDWR)&#xA;                    fifo2_file = os.fdopen(fifo2_fd, &#x27;wb&#x27;, 0)&#xA;                    closed = 0&#xA;                    for i in range(0,6):&#xA;                        fifo1_file.write(bytes([0]*1157))&#xA;                        fifo2_file.write(bytes([0]*1157))&#xA;&#xA;                if addr[0] == "192.168.3.199":&#xA;                    fifo1_file.write(recvbuf[5:])&#xA;                    framecount[0] = framecount[0] &#x2B; 1&#xA;&#xA;                if addr[0] == "192.168.3.119":&#xA;                    fifo2_file.write(recvbuf[5:])&#xA;                    framecount[1] = framecount[1] &#x2B; 1&#xA;&#xA;                # Keep buffers roughly in sync while playing&#xA;                targetframes=max(framecount)&#xA;                if targetframes - framecount[0] > 11:&#xA;                    while (targetframes - framecount[0]) > 0:&#xA;                        fifo1_file.write(bytes([0]*1157))&#xA;                        framecount[0] = framecount[0] &#x2B; 1&#xA;&#xA;                if targetframes - framecount[1] > 11:&#xA;                    while (targetframes - framecount[1]) > 0:&#xA;                        fifo2_file.write(bytes([0]*1157))&#xA;                        framecount[1] = framecount[1] &#x2B; 1&#xA;            else:&#xA;                if closed == 0:&#xA;                    ffmpeg.kill()&#xA;                    print("No data, killing ffmpeg")&#xA;                    fifo1_file.close()&#xA;                    fifo2_file.close()&#xA;                    closed = 1&#xA;receiver=Receiver()&#xA;&#xA;while True:&#xA;    time.sleep(50000)&#xA;

    &#xA;

    Does anybody have any pointers on how I can make this better ?

    &#xA;

  • Revision 30246 : Corrections de grosses boulettes sql Correction d’une boulette dans la ...

    27 juillet 2009, par kent1@… — Log

    Corrections de grosses boulettes sql
    Correction d’une boulette dans la déclaration des champs
    On ne permet la demande de réencodage que depuis le document original sinon vive ma perte de qualité
    On affiche un message indiquant que c’est une version encodée issue d’un autre document s’il y a lieu de le faire
    On encode les sons dorénavant