Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (49)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

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

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (5509)

  • Can I use the file buffer or stream as input for fluent-ffmpeg ? I am trying to avoid saving the video locally to get its path before removing

    22 avril 2023, par Moath Thawahreh

    I am receiving the file via an api, I was trying to process the file.buffer as input for FFmpeg but it did not work, I had to save the video locally first and then process the path and remove the saved video later on.
I don't want to believe that there is no other way to solve this and I have been looking for solutions and workarounds but it was all about ffmpeg input as a path.

    


    I would love to find a solution using fluent-ffmpeg because it has some other great features, but I won't mind any suggestions for compressing the video using any different approaches if it's more efficient

    


    Again my code below works fine but I have to save the video and then remove it I am hoping for a more efficient solution :

    


      fs.writeFileSync(&#x27;temp.mp4&#x27;, file.buffer);&#xA;&#xA;    // Resize the temporary file using ffmpeg&#xA;    ffmpeg(&#x27;temp.mp4&#x27;) // here I tried pass file.buffer as readable stream,it receives paths only &#xA;      .format(&#x27;mp4&#x27;)&#xA;      .size(&#x27;50%&#x27;)&#xA;      .save(&#x27;resized.mp4&#x27;)&#xA;      .on(&#x27;end&#x27;, async () => {&#xA;        // Upload the resized file to Firebase&#xA;        const resizedFileStream = bucket.file(`video/${uniqueId}`).createWriteStream();&#xA;        fs.createReadStream(&#x27;resized.mp4&#x27;).pipe(resizedFileStream);&#xA;&#xA;        await new Promise<void>((resolve, reject) => {&#xA;          resizedFileStream&#xA;            .on(&#x27;finish&#x27;, () => {&#xA;              // Remove the local files after they have been uploaded&#xA;              fs.unlinkSync(&#x27;temp.mp4&#x27;);&#xA;              fs.unlinkSync(&#x27;resized.mp4&#x27;);&#xA;              resolve();&#xA;            })&#xA;            .on(&#x27;error&#x27;, reject);&#xA;        });&#xA;&#xA;        // Get the URL of the uploaded resized version&#xA;        const resizedFile = bucket.file(`video/${uniqueId}`);&#xA;        const url = await resizedFile.getSignedUrl({&#xA;          action: &#x27;read&#x27;,&#xA;          expires: &#x27;03-17-2025&#x27;, // Change this to a reasonable expiration date&#xA;        });&#xA;&#xA;        console.log(&#x27;Resized file uploaded successfully.&#x27;);&#xA;      })&#xA;      .on(&#x27;error&#x27;, (err) => {&#xA;        console.log(&#x27;An error occurred: &#x27; &#x2B; err.message);&#xA;      });&#xA;</void>

    &#xA;

  • Stream H264 raw data on RTSP server

    1er janvier, par Aitazaz

    I have H264 hex string data saved in a list.&#xA;The data is in correct format as it is being received, I am trying to stream it to RTSP server.

    &#xA;

    I have stream the data in realtime as it is from a dashcam.

    &#xA;

    The RTSP server is deployed but when I stream frames to it, the connection is created and then ends in an instant (does not last for a second)

    &#xA;

    The code is mentioned below which performs this streaming task.

    &#xA;

    def h264_stream_to_rtsp(data_list, rtsp_url):&#xA;    try:&#xA;        ffmpeg_command = [&#xA;            "ffmpeg", &#xA;            "-f", "h264",&#xA;            "-i", "-",&#xA;            "-vcodec", "libx264",&#xA;            "-preset", "fast",&#xA;            "-f", "rtsp",&#xA;            "-analyzeduration", "5000000",&#xA;            "-probesize", "5000000", &#xA;            rtsp_url  # The RTSP URL to stream to&#xA;        ]&#xA;        &#xA;        ffmpeg_process = subprocess.Popen(ffmpeg_command, stdin=subprocess.PIPE)&#xA;&#xA;        for index, hex_data in enumerate(data_list):&#xA;            # print(f"Processing hex data {index &#x2B; 1}/{len(data_list)}...")&#xA;&#xA;            if len(hex_data) % 2 != 0:&#xA;                hex_data = &#x27;0&#x27; &#x2B; hex_data  # Append a leading zero if length is odd&#xA;&#xA;            binary_data = binascii.unhexlify(hex_data)&#xA;&#xA;            ffmpeg_process.stdin.write(binary_data)&#xA;&#xA;        ffmpeg_process.stdin.close()&#xA;&#xA;        ffmpeg_process.wait()&#xA;        print("Stream completed.")&#xA;&#xA;    except KeyboardInterrupt:&#xA;        print("Stopping live stream.")&#xA;    except Exception as e:&#xA;        print(f"Error: {e}")&#xA;

    &#xA;

    Logs from the RTSP server are mentioned below :

    &#xA;

    2025/01/01 10:56:04 INF [RTSP] [conn 20.174.9.78:35474] opened&#xA;2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] created by 20.174.9.78:35474&#xA;2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] is publishing to path &#x27;live&#x27;, 1 track (H264)&#xA;2025/01/01 10:56:04 INF [RTSP] [session 1d2bb871] destroyed: torn down by 20.174.9.78:35474&#xA;2025/01/01 10:56:04 INF [RTSP] [conn 20.174.9.78:35474] closed: EOF&#xA;2025/01/01 10:56:48 INF [RTSP] [conn 20.174.9.78:54448] opened&#xA;2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] created by 20.174.9.78:54448&#xA;2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] is publishing to path &#x27;live&#x27;, 1 track (H264)&#xA;2025/01/01 10:56:48 INF [RTSP] [session b6a95e71] destroyed: torn down by 20.174.9.78:54448&#xA;

    &#xA;

    How can I stream continuously ?

    &#xA;

  • HLS playback stopped with Player error : mediaError - bufferAppendError

    23 janvier, par Sumoanand

    I am trying to merge two videos together in the m3u8 manifest file.&#xA;However, exactly at the point to HLS stream discontinuity, video playback stops with following error :&#xA;Player error : mediaError - bufferAppendError

    &#xA;

    Here is the sample m3u8 snippet :

    &#xA;

    #EXT-X-PROGRAM-DATE-TIME:2025-01-23T01:23:10.200-06:00&#xA;#EXTINF:6.000&#xA;17.ts&#xA;#EXT-X-PROGRAM-DATE-TIME:2025-01-23T01:23:16.200-06:00&#xA;#EXTINF:6.000&#xA;18.ts&#xA;#EXT-X-DISCONTINUITY&#xA;#EXT-X-KEY:METHOD=NONE&#xA;#EXT-X-PROGRAM-DATE-TIME:2025-01-23T01:23:21.700-06:00&#xA;#EXTINF:6.000&#xA;10ak171685189367-007cb1c1a5398250e495vHD.20.ts&#xA;#EXT-X-PROGRAM-DATE-TIME:2025-01-23T01:23:27.700-06:00&#xA;#EXTINF:6.000&#xA;10ak171685189367-007cb1c1a5398250e495vHD.21.ts&#xA;

    &#xA;

    FFprobe output of 18.ts :

    &#xA;

      Duration: 00:00:06.01, start: 1692.774667, bitrate: 3440 kb/s&#xA;  Program 1 &#xA;  Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn&#xA;  Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 159 kb/s&#xA;

    &#xA;

    FFprobe output of 10ak171685189367-007cb1c1a5398250e495vHD.20.ts :

    &#xA;

      Duration: 00:00:06.02, start: 1.443444, bitrate: 744 kb/s&#xA;  Program 1 &#xA;    Metadata:&#xA;  Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn&#xA;  Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 65 kb/s&#xA;

    &#xA;

    I would greatly appreciate any inputs.

    &#xA;