Recherche avancée

Médias (10)

Mot : - Tags -/wav

Autres articles (32)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (4733)

  • moov atom missing when streaming video to server

    3 octobre 2024, par Zaid

    I am working on a screen recording application where it allows users to record their screen and I use websocket to send their bytes data in real time to my FastAPI Python server. The bytes are sent every 2 second and I use FFmpeg to keep saving the bytes in the output MP4 video file.

    


    problem :
After the user stops the recording, I have a ffmpeg process that takes the recorded video as input and add some filters on top of it and return an edited video. Most of the time it works fine, however, sometime users are facing this ffmpeg error :-

    


    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x60f50ba488c0] moov atom not found
/tmp/recording_91427bc6-3e69-4fef-9aa9-17093d41a136.mp4: Invalid data found when processing input


    


    When I open the video locally, there doesn't seem be any problem and neither the video is corrupted

    


    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)

    print(f"Chrome Extension = {token} and the key = {videoId}")

    print(f" Client connected: {websocket.client.host}")

    dataNumber = 1

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

    command = [
        'ffmpeg', 
        '-y',
        '-i', 
        '-', 
        '-codec:v', 
        'copy',  
        '-c:a', 'aac', 
        '-y',
        '-f', 'mp4',
        recordingFile,
        # "-"
        # f'output{queueNumber}.mp4',
    ]

    async with await anyio.open_process(command, stdin=subprocess.PIPE) as process:
        try:
            while True:
                try:
                    # async with video_lock:
                    data = await websocket.receive_bytes()
                    if not data:
                        break
                    await process.stdin.send(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)
            await process.stdin.aclose()
            await process.wait()


    


    This is error in the console :-
enter image description here

    


  • re-stream rtsp stream to youtube [closed]

    2 novembre 2024, par Darter

    i would like to re-stream an rtsp stream of a wifi camera to youtube
the stream is allready a H.264 codec.

    


    The camera does not have any audio, but youtube needs audio to accept the stream, thats why i faked and audio stream.
I tried this

    


    ffmpeg -re -rtsp_transport tcp -i rtsp://192.168.1.140/live -f lavfi -i anullsrc -f rawvideo rtmp://a.rtmp.youtube.com/live2/<stream key="key">&#xA;</stream>

    &#xA;

    but it fails

    &#xA;

    av_interleaved_write_frame(): Broken pipeB time=00:00:00.20 bitrate=884736.0kbits/s speed=0.0156x    &#xA;Error writing trailer of rtmp://a.rtmp.youtube.com/live2/dgyh-qzba-t13k-6qtf-6rgq: Broken pipe&#xA;

    &#xA;

    i would like to not change the codec to not put any stress on the machine

    &#xA;

  • RTP stream from ffmpeg not reaching mediasoup producer : what could be wrong ? [closed]

    5 novembre 2024, par Francesco Vignola

    I developed a producer for mediasoup that is supposed to receive the RTP stream generated by ffmpeg (via fluent-ffmpeg) and send it to the consumer.

    &#xA;

    ffmpeg correctly generates the stream, and I conducted a test with tcpdump, where I can see the traffic generated by ffmpeg being sent locally to the port of the PlainTransport with which the producer is created.

    &#xA;

    However, neither the producer nor the consumer seem to be able to intercept it, as the listeners I attached to the specific events are never triggered.

    &#xA;

    I also started an ffmpeg client to receive the stream, and the test was successful (it receives the stream). However, I can’t understand why it doesn't work with mediasoup.

    &#xA;

    Can someone help me ? Did I forget any configuration parameters ?

    &#xA;

    The code is as follows :

    &#xA;

    const router = await worker.createRouter({&#xA;   mediaCodecs: [{&#xA;      kind: &#x27;video&#x27;,&#xA;      mimeType: &#x27;video/VP8&#x27;,&#xA;      clockRate: 90000,&#xA;      payloadType: 96&#xA;   }]&#xA;});&#xA;&#xA;const transport = await router.createPlainTransport({&#xA;   listenIp: { ip: &#x27;127.0.0.1&#x27; },&#xA;   rtcpMux: false,&#xA;   comedia: true&#xA;});&#xA;&#xA;const producer = await transport.produce({&#xA;   kind: &#x27;video&#x27;,&#xA;   rtpParameters: router.rtpParameters&#xA;});&#xA;&#xA;const { localIp: ip, localPort: port } = transport.tuple;&#xA;const { localPort: rtcpPort } = transport.rtcpTuple;&#xA;&#xA;await transport.connect({&#xA;   ip: ip,&#xA;   port: port,&#xA;   rtcpPort: rtcpPort&#xA;});&#xA;&#xA;ffmpeg(videoFilePath)&#xA;   .inputOptions(&#x27;-re&#x27;)&#xA;   .videoCodec(&#x27;libvpx&#x27;)&#xA;   .outputOptions([&#xA;       &#x27;-f rtp&#x27;,&#xA;       &#x27;-payload_type&#x27;, &#x27;96&#x27;,&#xA;       &#x27;-ssrc&#x27;, ssrc,&#xA;       &#x27;-an&#x27;,&#xA;       &#x27;-sdp_file&#x27;, &#x27;out.sdp&#x27;&#xA;   ])&#xA;   .output(`rtp://${ip}:${port}?rtcpport=${rtcpPort}`)&#xA;   .run();&#xA;

    &#xA;

    The video to be streamed has an .mp4 extension and is saved locally on the server.

    &#xA;

    Thank you to anyone who is willing to help me.

    &#xA;