Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (106)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (8279)

  • How to reduce the latency of CMAF ?

    13 juin 2023, par dannyomni

    I implemented CMAF through a self-built nginx server with ffmpeg, but I encountered some technical bottlenecks. My latency always remains at 3 seconds and cannot be further reduced. Additionally, I'm unable to successfully implement chunked transfer.

    


    Briefly describe my environment, I use OBS to push the live stream to the server, then transcode it on the server, and finally push the content to users through CDN.

    


    Here is some of my code

    


    ffmpeg :

    


    sudo ffmpeg -i rtmp://127.0.0.1:1935/live/stream -loglevel 40 -c copy -sc_threshold 0 -g 60 -bf 0 -map 0 -f dash -strict experimental -use_timeline 1 -use_template 1 -seg_duration 1 -window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" -streaming 1 -dash_segment_type mp4 -utc_timing_url "http://time.akamai.com/?iso" -movflags frag_keyframe+empty_moov+default_base_moof -ldash 1 -hls_playlist 1 -master_m3u8_publish_rate 1 -remove_at_exit 1 /var/www/html/live/manifest.mpd


    


    nignx config :

    


    server_name myserver.com;
    add_header Access-Control-Allow-Origin *;
    add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
    add_header Access-Control-Allow-Headers 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
    add_header Access-Control-Expose-Headers 'Content-Length,Content-Range';
    root /var/www/html;
    index index.html index.nginx-debian.html;
        location / {
            chunked_transfer_encoding on;
        }


    


    html player

    


    &#xA;&#xA;&#xA;    &#xA;    &#xA;    &#xA;    <code class="echappe-js">&lt;script src=&quot;https://cdn.jsdelivr.net/npm/hls.js@latest&quot;&gt;&lt;/script&gt;&#xA;    &lt;script src=&quot;https://cdn.dashjs.org/latest/dash.all.min.js&quot;&gt;&lt;/script&gt;&#xA;    &#xA;&#xA;&#xA;    &#xA;&#xA;    &lt;script&gt;&amp;#xA;        const video = document.getElementById(&amp;#x27;video&amp;#x27;);&amp;#xA;        const hlsSrc = &amp;#x27;/live/master.m3u8&amp;#x27;; // Replace with your HLS stream URL&amp;#xA;        const dashSrc = &amp;#x27;/live/stream.mpd&amp;#x27;; // Replace with your DASH stream URL&amp;#xA;&amp;#xA;        function isHlsSupported() {&amp;#xA;            return Hls.isSupported() || video.canPlayType(&amp;#x27;application/vnd.apple.mpegurl&amp;#x27;);&amp;#xA;        }&amp;#xA;&amp;#xA;        function isDashSupported() {&amp;#xA;            return !!window.MediaSource &amp;amp;&amp;amp; !!MediaSource.isTypeSupported(&amp;#x27;video/mp4; codecs=&quot;avc1.4d401e,mp4a.40.2&quot;&amp;#x27;);&amp;#xA;        }&amp;#xA;&amp;#xA;        if (isHlsSupported()) {&amp;#xA;            // Use HLS for playback&amp;#xA;            const hls = new Hls({&amp;#xA;                lowLatencyMode: true,// Enable low-latency mode&amp;#xA;                liveSyncDurationCount: 1, // Number of segments used to sync live stream&amp;#xA;                liveMaxLatencyDurationCount: 2,// Number of segments used to calculate the latency&amp;#xA;                maxBufferLength: 2,// Max buffer length in seconds&amp;#xA;                maxBufferSize: 1000 * 1000 * 100,// Max buffer size in bytes&amp;#xA;                liveBackBufferLength: 0// Max back buffer length in seconds (0 means back buffer disabled)&amp;#xA;            });&amp;#xA;            hls.loadSource(hlsSrc);&amp;#xA;            hls.attachMedia(video);&amp;#xA;            hls.on(Hls.Events.MANIFEST_PARSED, () =&gt; {&amp;#xA;                video.play();&amp;#xA;            });&amp;#xA;        } else if (isDashSupported()) {&amp;#xA;            // Use DASH for playback&amp;#xA;            const player = dashjs.MediaPlayer().create();&amp;#xA;            player.initialize(video, dashSrc, true);&amp;#xA;            player.updateSettings({&amp;#xA;                streaming: {&amp;#xA;                    lowLatencyEnabled: true, // Enable low-latency mode&amp;#xA;                    liveDelay: 1, // Set live delay in seconds, equal to 3 times the segment duration&amp;#xA;                    liveCatchUpPlaybackRate: 1.2, // Playback rate for catching up when behind the live edge&amp;#xA;                    liveCatchUpMinDrift: 0.5, // Minimum drift from live edge before initiating catch-up (in seconds)&amp;#xA;                    bufferTimeAtTopQuality: 3, // Maximum buffer length in seconds&amp;#xA;                    bufferToKeep: 0, // Duration of the back buffer in seconds (disable back buffer)&amp;#xA;                }&amp;#xA;            });&amp;#xA;        } else {&amp;#xA;            console.error(&amp;#x27;Neither HLS nor DASH playback is supported in this browser.&amp;#x27;);&amp;#xA;        }&amp;#xA;    &lt;/script&gt;&#xA;&#xA;&#xA;

    &#xA;

    I hope to reduce the latency to 1 second.

    &#xA;

  • Ghost image issues with ffmpeg -filter_complex displace

    5 juillet 2022, par raul.vila

    I've (almost) been able to apply a displacement based on 2 animated gaussian noise videos, but I'm having issues with a ghost image. A picture is worth a thousand words.

    &#xA;

    Here you have a script to replicate the issue :

    &#xA;

    ffmpeg -y -t 2 -f lavfi -i color=c=blue:s=160x120 -c:v libx264 -tune stillimage -pix_fmt rgb24 00_empty.mp4&#xA;ffmpeg -y -i 00_empty.mp4 -vf "drawtext=text=string1:y=h/2:x=w-t*w/2:fontcolor=white:fontsize=60" 01_text.mp4&#xA;ffmpeg -y -t 2 -f lavfi -i color=c=gray:s=160x120 -c:v libx264 -tune stillimage -pix_fmt rgb24 02_gray.mp4&#xA;ffmpeg -y -i 01_text.mp4 -i 02_gray.mp4 -i 02_gray.mp4 -filter_complex "[0][1][2]displace=edge=mirror" 03_displaced_text.mp4&#xA;

    &#xA;

    It creates a test video with a scrolling text and a gray dummy video. Then it applies a displacement based on the gray video. If I understand correctly, because the gray video is 100% gray, it should leave the video unchanged (or maybe displace everything by a fixed ammount of pixels), but it creates a "shadow". I tried with 3 different pixel formats (yuv420p, yuv444p, rgb24) because I found this question on stackoverflow talking about that :

    &#xA;

    &#xA;

    ffmpeg version 5.0.1-full_build-www.gyan.dev

    &#xA;

    Any idea will be welcome.
    &#xA;Thanks !

    &#xA;

  • how to choose ffmpeg video mp3 audio version id ?

    7 juin 2013, par Ulterior

    I am having issues on ffmpeg encoded video files audio tracks. My encoded video contains ID for audio track as extracted from mediainfo :

    I use CODEC_ID_MP3 in guess_format "mov" container for quicktime

    Audio
    ID                                       : 2
    Format                                   : MPEG Audio
    Format version                           : Version 2
    Format profile                           : Layer 3
    Codec ID                                 : .mp3
    Duration                                 : 2s 916ms
    Bit rate mode                            : Constant
    Bit rate                                 : 128 Kbps
    Channel(s)                               : 1 channel
    Sampling rate                            : 16.0 KHz
    Compression mode                         : Lossy
    Stream size                              : 45.3 KiB (2%)
    Language                                 : English

    This is not recognized on a vanilla codecless installation of windows 7, only played by k-lite codec libmad

    I have noticed, that another test file contains similar mp3 track and is played by media player OK :

    Audio
    ID                                       : 2
    Format                                   : MPEG Audio
    Format version                           : Version 1
    Format profile                           : Layer 3
    Mode                                     : Joint stereo
    Mode extension                           : MS Stereo
    Codec ID                                 : 6B
    Duration                                 : 1mn 9s
    Bit rate mode                            : Constant
    Bit rate                                 : 320 Kbps
    Channel(s)                               : 2 channels
    Sampling rate                            : 44.1 KHz
    Compression mode                         : Lossy
    Stream size                              : 2.67 MiB (38%)
    Writing library                          : LAME3.98

    The difference I noticed is in Format version number and Codec ID, which is Version 2 from ffmpeg output - I couldnt locate this version setting in ffmpeg source files, so my question is - is there a way to influence this format version identificator and set the codec id as in above playable video ?