Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (79)

  • Diogene : création de masques spécifiques de formulaires d’édition de contenus

    26 octobre 2010, par

    Diogene est un des plugins ? SPIP activé par défaut (extension) lors de l’initialisation de MediaSPIP.
    A quoi sert ce plugin
    Création de masques de formulaires
    Le plugin Diogène permet de créer des masques de formulaires spécifiques par secteur sur les trois objets spécifiques SPIP que sont : les articles ; les rubriques ; les sites
    Il permet ainsi de définir en fonction d’un secteur particulier, un masque de formulaire par objet, ajoutant ou enlevant ainsi des champs afin de rendre le formulaire (...)

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

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

Sur d’autres sites (8166)

  • Updating ffmpeg breaks opencv library

    7 octobre 2019, par Amit

    I had manually compiled opencv ver3.2 library on mac system, which had been working fine till now. Recently it seems that i had updated the version for ffmpeg, which is managed by brew package manager, leading to breakage of opencv library looking for libavcodec.57.dylib.

    Upon looking into library path, i found that libavcodec.dylib is symlinked to libavcodec.58.dylib, which is the most probable cause to above problem.

    Now i have two options,

    - Recompile opencv to link against the latest version of libavcodec

    - Revert the version of libavcodec to 57

    I am looking for a solution in which opencv works independently of the version of libavcodec and should dynamically link with current installed version of library. I should only be recompiling opencv when it is essentially required, like change in API of libavcodec.

  • Video Ending prematurely with websocket and ffmpeg

    4 septembre 2024, par Zaid

    I am working on a screen recording application and it allows users to record their screen and I use websocket to send byte data in real time to my fastapi python server. The bytes are send every 2 second and I use ffmpeg to keep saving the bytes in the output mp4 video file. Everything was working fine when I had the server running on my local machine, however, I just deployed the server to EC2 instance us-ease-1 and when I try to record the videos, the videos are really short, IE, if I record a 30 second video, it only has the video for 3 second. Sometimes it saves 90% of the video and sometimes less. I am not sure what is the problem here.
I have been trying to debug the code for the past few days, but no success

    


    Here is my code :-

    


    FRONTEND

    


    const recorder = new MediaRecorder(stream, {
            mimeType: 'video/webm;codecs=H264',
            videoBitsPerSecond: 8000000
        });

recorder.ondataavailable = (e: BlobEvent) => {
    socketRef.socket.send(e.data)
}


    


    And here is my python code :-

    


    @router.websocket("/stream")
async def websocket_endpoint(websocket: WebSocket, token: str = Query(...), videoId: str = Query(...), authorize: AuthJWT = Depends()):
    await manager.connect(websocket)
    dataNumber = 1

    recordingFile = os.path.join(temp_dir, f"recording_{videoId}.mp4")

    command = [
        'ffmpeg', 
        '-y',
        '-i', 
        '-', 
        '-codec:v', 
        'copy', 
        '-f', 'mp4',
        recordingFile,
    ]

    process = subprocess.Popen(command, stdin=subprocess.PIPE)
    try:
        while True:
            try:
                data = await websocket.receive_bytes()
                if not data:
                    break
                process.stdin.write(data)
                await websocket.send_json({"chunkNumber": dataNumber, "status": 200})
                dataNumber = dataNumber + 1
            except RuntimeError:
                break      
    except WebSocketDisconnect:
        print(f"Client disconnected: {websocket.client.host}")
    finally:
        manager.disconnect(websocket)

        # Close stdin to signal EOF
        process.stdin.close()

        # Wait for FFmpeg to finish processing
        process.wait()

        # Ensure that the process is terminated
        process.terminate()  


    


    I also get this error in the console :-
enter image description here

    


  • Setting up RTP on Nginx

    2 février 2021, par Swap

    I'm trying to use Janus Media Server to relay WebRTC streams to a particular RTP host/port, from where ffmpeg can pick it up as an input and convert it further to an rtmp stream, which can then be used to broadcast to various social media platforms (such as, YouTube, Twitch, Facebook, etc.)

    


    My inspiration for this has been the following blog - https://www.meetecho.com/blog/firefox-webrtc-youtube-kinda/

    


    Specifically, I'm trying to replicate the following architecture -

    


    architecture

    


    And Janus, as per their documentation, has a very neat API for doing it -

    


    {&#xA;    "request" : "rtp_forward",&#xA;    "room" : <unique numeric="numeric" of="of" the="the" room="room" publisher="publisher" is="is" in="in">,&#xA;    "publisher_id" : <unique numeric="numeric" of="of" the="the" publisher="publisher" to="to" relay="relay" externally="externally">,&#xA;    "host" : "<host address="address" to="to" forward="forward" the="the" rtp="rtp" and="and" packets="packets">",&#xA;    "host_family" : "",&#xA;    "audio_port" : <port to="to" forward="forward" the="the" audio="audio" rtp="rtp" packets="packets">,&#xA;    "audio_ssrc" : <audio ssrc="ssrc" to="to" use="use" when="when" optional="optional">,&#xA;    "audio_pt" : <audio payload="payload" type="type" to="to" use="use" when="when" optional="optional">,&#xA;    "audio_rtcp_port" : <port to="to" contact="contact" receive="receive" audio="audio" rtcp="rtcp" feedback="feedback" from="from" the="the" and="and" currently="currently" unused="unused" for="for">,&#xA;    "video_port" : <port to="to" forward="forward" the="the" video="video" rtp="rtp" packets="packets">,&#xA;    "video_ssrc" : <video ssrc="ssrc" to="to" use="use" when="when" optional="optional">,&#xA;    "video_pt" : <video payload="payload" type="type" to="to" use="use" when="when" optional="optional">,&#xA;    "video_rtcp_port" : <port to="to" contact="contact" receive="receive" video="video" rtcp="rtcp" feedback="feedback" from="from" the="the" optional="optional">,&#xA;    "simulcast" : ,&#xA;    "video_port_2" : <if simulcasting="simulcasting" and="and" forwarding="forwarding" each="each" port="port" to="to" forward="forward" the="the" video="video" rtp="rtp" packets="packets" from="from" second="second" substream="substream"></if>layer to>,&#xA;    "video_ssrc_2" : <if simulcasting="simulcasting" and="and" forwarding="forwarding" each="each" video="video" ssrc="ssrc" to="to" use="use" the="the" second="second" substream="substream"></if>layer; optional>,&#xA;    "video_pt_2" : <if simulcasting="simulcasting" and="and" forwarding="forwarding" each="each" video="video" payload="payload" type="type" to="to" use="use" the="the" second="second" substream="substream"></if>layer; optional>,&#xA;    "video_port_3" : <if simulcasting="simulcasting" and="and" forwarding="forwarding" each="each" port="port" to="to" forward="forward" the="the" video="video" rtp="rtp" packets="packets" from="from" third="third" substream="substream"></if>layer to>,&#xA;    "video_ssrc_3" : <if simulcasting="simulcasting" and="and" forwarding="forwarding" each="each" video="video" ssrc="ssrc" to="to" use="use" the="the" third="third" substream="substream"></if>layer; optional>,&#xA;    "video_pt_3" : <if simulcasting="simulcasting" and="and" forwarding="forwarding" each="each" video="video" payload="payload" type="type" to="to" use="use" the="the" third="third" substream="substream"></if>layer; optional>,&#xA;    "data_port" : <port to="to" forward="forward" the="the" messages="messages">,&#xA;    "srtp_suite" : <length of="of" authentication="authentication" tag="tag" or="or" optional="optional">,&#xA;    "srtp_crypto" : "<key to="to" use="use" as="as" crypto="crypto" encoded="encoded" key="key" in="in" optional="optional">"&#xA;}&#xA;</key></length></port></port></video></video></port></port></audio></audio></port></host></unique></unique>

    &#xA;

    For this, I've setup a Nginx server, where I've also installed Janus and everything's been running smoothly so far. But I'm quite clueless as to how to setup my Nginx server so that it accepts RTP connections (which will be forwarded as RTMP using ffmpeg).

    &#xA;

    Please guide me to any relevant resources that would help me achieve this. Thanks in advance !

    &#xA;