Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (90)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (10293)

  • Streaming fails when I activate hls

    4 avril 2024, par yieniggu

    I'm currently testing a local server with nginx and the rtmp module in order to receive video streams. It's working just fine, but I want to add hls/dash in order to reproduce the streams on html. However, when I add this functionality to the config file the sources start complaining about the server and stop streaming.

    


    For example, if am streaming through OBS I got a message that is attempting to reconnect every 2 seconds with no success.

    


    If I use ffmpeg as :

    


    ffmpeg -re -i 'pescado.mp4' -c:v libx264 -preset slower -tune zerolatency -c:a aac -f flv rtmp://localhost/live/pescado


    


    The error I have is :

    


    av_interleaved_write_frame(): Broken pipeB time=00:00:00.00 bitrate=16592.0kbits/s speed=0.00225x    
[flv @ 0x5d3f03942cc0] Failed to update header with correct duration.
[flv @ 0x5d3f03942cc0] Failed to update header with correct filesize.
Error writing trailer of rtmp://localhost/live/pescado: Broken pipe


    


    This is my nginx config file :

    


    ser www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}


#mail {
#       # See sample authentication script at:
#       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#       # auth_http localhost/auth.php;
#       # pop3_capabilities "TOP" "USER";
#       # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#       server {
#               listen     localhost:110;
#               protocol   pop3;
#               proxy      on;
#       }
#
#       server {
#               listen     localhost:143;
#               protocol   imap;
#               proxy      on;
#       }
#}


rtmp {
        server {
                listen 1935;
                chunk_size 4096;

                allow publish 127.0.0.1;
                allow publish 10.33.6.235;
                deny publish all;

                application live {
                        live on;
                        record off;

                        hls on;
                        hls_path /var/www/html/stream/hls;
                        hls_fragment 3;
                        hls_playlist_length 60;
                        hls_cleanup off;

                        dash on;
                        dash_path /var/www/html/stream/dash;
                        dash_cleanup off;
                }
        }
}


    


    I've been following the tutorials from How To Set Up a Video Streaming Server using Nginx-RTMP on Ubuntu 22.04

    


  • my ffmpeg livestream keeps crashing : How do I troubleshoot ?

    12 février 2024, par n79qk272x57w46w9

    I can't find the reason on why it is crashing, all I have is a list of mp3 files which are encoded to AAC on the fly.

    


    stream.sh

    


    #!/bin/bash

ffmpeg \
-stream_loop -1 -re \
-i video.mp4 \
-safe 0 \
-f concat \
-i playlist.txt \
-c:v libx264 -preset slower -b:v 3500k -maxrate 3500k -bufsize 7000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 320k -ac 2 -ar 44100 -f flv \
rtmps://---------------/s/----key----:----key----


    


    This is what journalctl collected :

    


    Feb 12 18:07:57 main bash[3236855]: [47.9K blob data]
Feb 12 18:11:38 main bash[3236855]: [48.0K blob data]
Feb 12 18:15:19 main bash[3236855]: [48.0K blob data]
Feb 12 18:18:59 main bash[3236855]: [48.0K blob data]
Feb 12 18:22:41 main bash[3236855]: [48.0K blob data]
Feb 12 18:26:21 main bash[3236855]: [48.0K blob data]
Feb 12 18:30:02 main bash[3236855]: [48.0K blob data]
Feb 12 18:33:42 main bash[3236855]: [48.0K blob data]
Feb 12 18:37:23 main bash[3236855]: [48.0K blob data]
Feb 12 18:41:03 main bash[3236855]: [48.0K blob data]
Feb 12 18:44:44 main bash[3236855]: [48.0K blob data]
Feb 12 18:48:25 main bash[3236855]: [48.0K blob data]
Feb 12 18:50:07 main bash[3236855]: [22.3K blob data]
Feb 12 18:50:07 main bash[3236855]: av_interleaved_write_frame(): Input/output error
Feb 12 18:50:09 main bash[3236855]:     Last message repeated 1 times
Feb 12 18:50:09 main bash[3236855]: [flv @ 0x5642d6c08c00] Failed to update header with correct duration.
Feb 12 18:50:09 main bash[3236855]: [flv @ 0x5642d6c08c00] Failed to update header with correct filesize.
Feb 12 18:50:09 main bash[3236855]: Error writing trailer of rtmps://------------/s/key:key: Input/output error
Feb 12 18:50:09 main bash[3236855]: frame=1215777 fps= 30 q=14.0 Lsize=18376958kB time=11:16:04.14 bitrate=3711.3kbits/s dup=0 drop=1 speed=   1x
Feb 12 18:50:09 main bash[3236855]: video:16828839kB audio:1495386kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.287779%
Feb 12 18:50:09 main bash[3236855]: [tls @ 0x5642d6bbcf40] The specified session has been invalidated for some reason.
Feb 12 18:50:09 main bash[3236855]:     Last message repeated 1 times
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] frame I:24338 Avg QP: 3.06  size: 52975
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] frame P:393923 Avg QP: 6.45  size: 24751
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] frame B:797516 Avg QP: 9.68  size:  7767
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] consecutive B-frames:  6.8% 12.2% 15.4% 65.7%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] mb I  I16..4: 47.0%  5.2% 47.9%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] mb P  I16..4:  0.8%  0.5%  4.3%  P16..4: 18.2% 13.6% 11.8%  4.1%  2.3%    skip:44.2%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] mb B  I16..4:  0.2%  0.1%  0.7%  B16..8: 21.7% 14.2%  6.4%  direct: 7.9%  skip:48.8%  L0:35.3% L1:35.8% BI:28.9%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] 8x8 transform intra:6.6% inter:16.5%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] direct mvs  spatial:99.7% temporal:0.3%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] coded y,uvDC,uvAC intra: 68.9% 62.6% 52.6% inter: 36.3% 21.5% 11.4%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] i16 v,h,dc,p: 70% 14% 13%  3%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 21% 19%  5%  5%  5%  6%  8% 10%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 23% 18%  5%  6%  6%  6%  6%  8%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] i8c dc,h,v,p: 59% 24% 12%  5%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] Weighted P-Frames: Y:2.0% UV:0.5%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] ref P L0: 69.7% 13.7%  6.8%  3.4%  2.0%  1.8%  1.3%  1.2%  0.2%  0.0%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] ref B L0: 88.7%  7.1%  2.0%  0.9%  0.7%  0.4%  0.3%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] ref B L1: 97.2%  2.8%
Feb 12 18:50:09 main bash[3236855]: [libx264 @ 0x5642d6be6300] kb/s:3398.63
Feb 12 18:50:09 main bash[3236855]: [aac @ 0x5642d6bbdd40] Qavg: 14231.606
Feb 12 18:50:09 main bash[3236855]: Conversion failed!
Feb 12 18:50:09 main systemd[1]: stream.service: Main process exited, code=exited, status=1/FAILURE
Feb 12 18:50:09 main systemd[1]: stream.service: Failed with result 'exit-code'.


    


    From this log it is hard to tell at which point and which file it started to have problems converting.

    


  • Decode h264 video bytes into JPEG frames in memory with ffmpeg

    5 février 2024, par John Karkas

    I'm using python and ffmpeg (4.4.2) to generate a h264 video stream from images produced continuously from a process. I am aiming to send this stream over websocket connection and decode it to individual image frames at the receiving end, and emulate a stream by continuously pushing frames to an <img style='max-width: 300px; max-height: 300px' /> tag in my HTML.

    &#xA;

    However, I cannot read images at the receiving end, after trying combinations of rawvideo input format, image2pipe format, re-encoding the incoming stream with mjpeg and png, etc. So I would be happy to know what the standard way of doing something like this would be.

    &#xA;

    At the source, I'm piping frames from a while loop into ffmpeg to assemble a h264 encoded video. My command is :

    &#xA;

            command = [&#xA;            &#x27;ffmpeg&#x27;,&#xA;            &#x27;-f&#x27;, &#x27;rawvideo&#x27;,&#xA;            &#x27;-pix_fmt&#x27;, &#x27;rgb24&#x27;,&#xA;            &#x27;-s&#x27;, f&#x27;{shape[1]}x{shape[0]}&#x27;,&#xA;            &#x27;-re&#x27;,&#xA;            &#x27;-i&#x27;, &#x27;pipe:&#x27;,&#xA;            &#x27;-vcodec&#x27;, &#x27;h264&#x27;,&#xA;            &#x27;-f&#x27;, &#x27;rawvideo&#x27;,&#xA;            # &#x27;-vsync&#x27;, &#x27;vfr&#x27;,&#xA;            &#x27;-hide_banner&#x27;,&#xA;            &#x27;-loglevel&#x27;, &#x27;error&#x27;,&#xA;            &#x27;pipe:&#x27;&#xA;        ]&#xA;

    &#xA;

    At the receiving end of the websocket connection, I can store the images in storage by including :

    &#xA;

            command = [&#xA;            &#x27;ffmpeg&#x27;,&#xA;            &#x27;-i&#x27;, &#x27;-&#x27;,  # Read from stdin&#xA;            &#x27;-c:v&#x27;, &#x27;mjpeg&#x27;,&#xA;            &#x27;-f&#x27;, &#x27;image2&#x27;,&#xA;            &#x27;-hide_banner&#x27;,&#xA;            &#x27;-loglevel&#x27;, &#x27;error&#x27;,&#xA;            f&#x27;encoded/img_%d_encoded.jpg&#x27;&#xA;        ]&#xA;

    &#xA;

    in my ffmpeg command.

    &#xA;

    But, I want to instead extract each individual frame coming in the pipe and load in my application, without saving them in storage. So basically, I want whatever is happening at by the &#x27;encoded/img_%d_encoded.jpg&#x27; line in ffmpeg, but allowing me to access each frame in the stdout subprocess pipe of an ffmpeg pipeline at the receiving end, running in its own thread.

    &#xA;

      &#xA;
    • What would be the most appropriate ffmpeg command to fulfil a use case like the above ? And how could it be tuned to be faster or have more quality ?
    • &#xA;

    • Would I be able to read from the stdout buffer with process.stdout.read(2560x1440x3) for each frame ?
    • &#xA;

    &#xA;

    If you feel strongly about referring me to a more update version of ffmpeg, please do so.

    &#xA;

    PS : It is understandable this may not be the optimal way to create a stream. Nevertheless, I do not find there should be much complexity in this and the latency should be low. I could instead communicate JPEG images via the websocket and view them in my <img style='max-width: 300px; max-height: 300px' /> tag, but I want to save on bandwidth and relay some computational effort at the receiving end.

    &#xA;