Recherche avancée

Médias (91)

Autres articles (46)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Liste des distributions compatibles

    26 avril 2011, par

    Le tableau ci-dessous correspond à la liste des distributions Linux compatible avec le script d’installation automatique de MediaSPIP. Nom de la distributionNom de la versionNuméro de version 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
    Si vous souhaitez nous aider à améliorer cette liste, vous pouvez nous fournir un accès à une machine dont la distribution n’est pas citée ci-dessus ou nous envoyer le (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (4317)

  • Split Audio nad Video, or redirect audio to virtual sound card, on real time stream

    26 décembre 2012, par Inferius

    I have a semi-profi camera, and recived stream through FireWire, but this device call in windows how simultaneous A/V device. Ffmpeg or other in C# not recording audio, only video (This finded only video stream A/V). How split realtime audio from video, or record audio from video ?

  • Live streaming : node-media-server + Dash.js configured for real-time low latency

    7 juillet 2021, par Maoration

    We're working on an app that enables live monitoring of your back yard.
Each client has a camera connected to the internet, streaming to our public node.js server.

    



    I'm trying to use node-media-server to publish an MPEG-DASH (or HLS) stream to be available for our app clients, on different networks, bandwidths and resolutions around the world.

    



    Our goal is to get as close as possible to live "real-time" so you can monitor what happens in your backyard instantly.

    



    The technical flow already accomplished is :

    



      

    1. ffmpeg process on our server processes the incoming camera stream (separate child process for each camera) and publishes the stream via RTSP on the local machine for node-media-server to use as an 'input' (we are also saving segmented files, generating thumbnails, etc.). the ffmpeg command responsible for that is :

      



      -c:v libx264 -preset ultrafast -tune zerolatency -b:v 900k -f flv rtmp://127.0.0.1:1935/live/office

    2. 


    3. node-media-server is running with what I found as the default configuration for 'live-streaming'

      



      private NMS_CONFIG = {
server: {
  secret: 'thisisnotmyrealsecret',
},
rtmp_server: {
  rtmp: {
    port: 1935,
    chunk_size: 60000,
    gop_cache: false,
    ping: 60,
    ping_timeout: 30,
  },
  http: {
    port: 8888,
    mediaroot: './server/media',
    allow_origin: '*',
  },
  trans: {
    ffmpeg: '/usr/bin/ffmpeg',
    tasks: [
      {
        app: 'live',
        hls: true,
        hlsFlags: '[hls_time=2:hls_list_size=3:hls_flags=delete_segments]',
        dash: true,
        dashFlags: '[f=dash:window_size=3:extra_window_size=5]',
      },
    ],
  },
},


      



      } ;

    4. 


    5. As I understand it, out of the box NMS (node-media-server) publishes the input stream it gets in multiple output formats : flv, mpeg-dash, hls.
with all sorts of online players for these formats I'm able to access and the stream using the url on localhost. with mpeg-dash and hls I'm getting anything between 10-15 seconds of delay, and more.

    6. 


    




    



    My goal now is to implement a local client-side mpeg-dash player, using dash.js and configure it to be as close as possible to live.

    



    my code for that is :

    



    

    

    &#xD;&#xA;&#xD;&#xA;    &#xD;&#xA;        &#xD;&#xA;        &#xD;&#xA;    &#xD;&#xA;    &#xD;&#xA;        <div>&#xD;&#xA;            <video autoplay="" controls=""></video>&#xD;&#xA;        </div>&#xD;&#xA;        <code class="echappe-js">&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/dashjs/3.0.2/dash.all.min.js&quot;&gt;&lt;/script&gt;&#xD;&#xA;&#xD;&#xA;        &lt;script&gt;&amp;#xD;&amp;#xA;            (function(){&amp;#xD;&amp;#xA;                // var url = &quot;https://dash.akamaized.net/envivio/EnvivioDash3/manifest.mpd&quot;;&amp;#xD;&amp;#xA;                var url = &quot;http://localhost:8888/live/office/index.mpd&quot;;&amp;#xD;&amp;#xA;                var player = dashjs.MediaPlayer().create();&amp;#xD;&amp;#xA;                &amp;#xD;&amp;#xA;                &amp;#xD;&amp;#xA;&amp;#xD;&amp;#xA;                // config&amp;#xD;&amp;#xA;                targetLatency = 2.0;        // Lowering this value will lower latency but may decrease the player&amp;#x27;s ability to build a stable buffer.&amp;#xD;&amp;#xA;                minDrift = 0.05;            // Minimum latency deviation allowed before activating catch-up mechanism.&amp;#xD;&amp;#xA;                catchupPlaybackRate = 0.5;  // Maximum catch-up rate, as a percentage, for low latency live streams.&amp;#xD;&amp;#xA;                stableBuffer = 2;           // The time that the internal buffer target will be set to post startup/seeks (NOT top quality).&amp;#xD;&amp;#xA;                bufferAtTopQuality = 2;     // The time that the internal buffer target will be set to once playing the top quality.&amp;#xD;&amp;#xA;&amp;#xD;&amp;#xA;&amp;#xD;&amp;#xA;                player.updateSettings({&amp;#xD;&amp;#xA;                    &amp;#x27;streaming&amp;#x27;: {&amp;#xD;&amp;#xA;                        &amp;#x27;liveDelay&amp;#x27;: 2,&amp;#xD;&amp;#xA;                        &amp;#x27;liveCatchUpMinDrift&amp;#x27;: 0.05,&amp;#xD;&amp;#xA;                        &amp;#x27;liveCatchUpPlaybackRate&amp;#x27;: 0.5,&amp;#xD;&amp;#xA;                        &amp;#x27;stableBufferTime&amp;#x27;: 2,&amp;#xD;&amp;#xA;                        &amp;#x27;bufferTimeAtTopQuality&amp;#x27;: 2,&amp;#xD;&amp;#xA;                        &amp;#x27;bufferTimeAtTopQualityLongForm&amp;#x27;: 2,&amp;#xD;&amp;#xA;                        &amp;#x27;bufferToKeep&amp;#x27;: 2,&amp;#xD;&amp;#xA;                        &amp;#x27;bufferAheadToKeep&amp;#x27;: 2,&amp;#xD;&amp;#xA;                        &amp;#x27;lowLatencyEnabled&amp;#x27;: true,&amp;#xD;&amp;#xA;                        &amp;#x27;fastSwitchEnabled&amp;#x27;: true,&amp;#xD;&amp;#xA;                        &amp;#x27;abr&amp;#x27;: {&amp;#xD;&amp;#xA;                            &amp;#x27;limitBitrateByPortal&amp;#x27;: true&amp;#xD;&amp;#xA;                        },&amp;#xD;&amp;#xA;                    }&amp;#xD;&amp;#xA;                });&amp;#xD;&amp;#xA;&amp;#xD;&amp;#xA;                console.log(player.getSettings());&amp;#xD;&amp;#xA;&amp;#xD;&amp;#xA;                setInterval(() =&gt; {&amp;#xD;&amp;#xA;                  console.log(&amp;#x27;Live latency= &amp;#x27;, player.getCurrentLiveLatency());&amp;#xD;&amp;#xA;                  console.log(&amp;#x27;Buffer length= &amp;#x27;, player.getBufferLength(&amp;#x27;video&amp;#x27;));&amp;#xD;&amp;#xA;                }, 3000);&amp;#xD;&amp;#xA;&amp;#xD;&amp;#xA;                player.initialize(document.querySelector(&quot;#videoPlayer&quot;), url, true);&amp;#xD;&amp;#xA;&amp;#xD;&amp;#xA;            })();&amp;#xD;&amp;#xA;&amp;#xD;&amp;#xA;        &lt;/script&gt;&#xD;&#xA;    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;&#xA;

    with the online test video (https://dash.akamaized.net/envivio/EnvivioDash3/manifest.mpd) I see that the live latency value is close to 2 secs (but I have no way to actually confirm it. it's a video file streamed. in my office I have a camera so I can actually compare latency between real-life and the stream I get).&#xA;however when working locally with my NMS, it seems this value does not want to go below 20-25 seconds.

    &#xA;&#xA;

    Am I doing something wrong ? any configuration on the player (client-side html) I'm forgetting ?&#xA;or is there a missing configuration I should add on the server side (NMS) ?

    &#xA;

  • How to apply dynamic watermarking for users watching video in real-time ? [closed]

    3 janvier, par Barun Bhattacharjee

    I am working on a video streaming project where I need to apply a dynamic watermarking (e.g., username and email) in real-time for security purposes. The video is being streamed in DASH format, and the segment files are in .m4s format generated via FFmpeg.

    &#xA;

    Challenges :&#xA;Is it possible to directly apply dynamic watermarking to .m4s segment files ?

    &#xA;

    Video segments are generated using FFmpeg with the following command :

    &#xA;

    ffmpeg&#xA;    .input(video_path)&#xA;    .output(mpd_path,&#xA;            format=&#x27;dash&#x27;,&#xA;            map=&#x27;0&#x27;,&#xA;            video_bitrate=&#x27;2400k&#x27;,&#xA;            video_size=&#x27;1920x1080&#x27;,&#xA;            vcodec=&#x27;libx264&#x27;,&#xA;            seg_duration=&#x27;4&#x27;,  # Sets segment duration to 4 seconds&#xA;            acodec=&#x27;copy&#x27;)&#xA;    .run()&#xA;&#xA;

    &#xA;

    What I tried :&#xA;I attempted to use FFmpeg to apply a watermark dynamically to the .m4s files using the drawtext filter, but .m4s files are not always recognized as valid input for FFmpeg operations.

    &#xA;

    # FFmpeg command to add watermark to m4s file&#xA;try:&#xA;    # FFmpeg processing&#xA;    out, err = (&#xA;        ffmpeg&#xA;        .input(m4s_file_path)  # Input the segment file&#xA;        .filter(&#xA;            "drawtext",&#xA;            text=user_info,&#xA;            fontfile="font/dejavu-sans/DejaVuSans-Bold.ttf",&#xA;            fontsize=24,&#xA;            fontcolor="white",&#xA;            x=10,&#xA;            y=10&#xA;        )&#xA;        .output(&#xA;            "pipe:",  # Stream output as a byte stream&#xA;            format="mp4",  # Output format as MP4 (compatible with MPEG-DASH)&#xA;            vcodec="libx264",&#xA;            acodec="copy",&#xA;            movflags="frag_keyframe&#x2B;empty_moov"&#xA;        )&#xA;        .run(capture_stdout=True, capture_stderr=True)&#xA;    )&#xA;&#xA;    logger.info(f"FFmpeg process completed. stdout length: {len(out)}, stderr: {err.decode(&#x27;utf-8&#x27;)}")&#xA;    logger.error(f"FFmpeg stderr: {err.decode(&#x27;utf-8&#x27;)}")&#xA;    return out  # Return the processed video stream data&#xA;&#xA;&#xA;except ffmpeg.Error as e:&#xA;    stderr_output = e.stderr.decode(&#x27;utf-8&#x27;) if e.stderr else "No stderr available"&#xA;    logger.error(f"FFmpeg error: {stderr_output}")&#xA;&#xA;    raise RuntimeError(f"Error processing video: {stderr_output}")&#xA;&#xA;

    &#xA;

    Error I faced :

    &#xA;

    video-streaming-backend  | [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f1bf99cc640] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none(tv, bt709), 1920x1012): unspecified pixel format&#xA;video-streaming-backend  | Consider increasing the value for the &#x27;analyzeduration&#x27; (10000000) and &#x27;probesize&#x27; (5000000) options&#xA;video-streaming-backend  | Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;http://web:8000/media/stream_video/chunks/ec1db006-b488-47ad-8220-79a05bcaae39/segments/init-stream0.m4s&#x27;:&#xA;video-streaming-backend  |   Metadata:&#xA;video-streaming-backend  |     major_brand     : iso5&#xA;video-streaming-backend  |     minor_version   : 512&#xA;video-streaming-backend  |     compatible_brands: iso5iso6mp41&#xA;video-streaming-backend  |     encoder         : Lavf60.16.100&#xA;video-streaming-backend  |   Duration: N/A, bitrate: N/A&#xA;video-streaming-backend  |   Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), none(tv, bt709), 1920x1012, SAR 1:1 DAR 480:253, 12288 tbr, 12288 tbn (default)&#xA;video-streaming-backend  |     Metadata:&#xA;video-streaming-backend  |       handler_name    : VideoHandler&#xA;video-streaming-backend  |       vendor_id       : [0][0][0][0]&#xA;video-streaming-backend  | Stream mapping:&#xA;video-streaming-backend  |   Stream #0:0 (h264) -> drawtext:default&#xA;video-streaming-backend  |   drawtext:default -> Stream #0:0 (libx264)&#xA;video-streaming-backend  | Press [q] to stop, [?] for help&#xA;video-streaming-backend  | Cannot determine format of input stream 0:0 after EOF&#xA;video-streaming-backend  | Error marking filters as finished&#xA;video-streaming-backend  | Error while filtering: Invalid data found when processing input&#xA;video-streaming-backend  | [out#0/mp4 @ 0x7f1bf8e73100] Nothing was written into output file, because at least one of its streams received no packets.&#xA;video-streaming-backend  | frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=N/A bitrate=N/A speed=N/A    &#xA;video-streaming-backend  | Conversion failed!&#xA;&#xA;

    &#xA;

    These errors have left me wondering if .m4s is a viable format for dynamic watermarking. If it's not, what would be the correct approach ?

    &#xA;