Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (79)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (7423)

  • ffmpeg : VLC won’t open .sdp files generated by ffmpeg

    8 mai 2020, par tiredamage42

    TLDR : VLC or Quicktime won’t open .sdp video stream files generated by ffmpeg, even though ffplay does.

    



    Web development and ffmpeg noob, so apologies if I’m using the wrong terminology :

    



    I’m trying to stream my desktop capture (on OSX) using ffmpeg, sending it out via rtp protocol. 
As of right now I’m just testing it out by streaming it over a port in my localhost (4000). And trying to play it locally.

    



    The problem is that when I try and open the .sdp file generated by the ffmpeg command, VLC opens it and immediately stops, no errors or anything, and shows that it has a duration of 0:00. Quicktime won’t event open the file in the first place.

    



    ffplay does play the stream and I can see my desktop in the player window (with a significant loss in quality though). Even so there are a ton of warning and errors that show up intermittently (outlined below)

    



    I’m not sure if it’s a problem in the way I start the ffmpeg stream, the command is after a ton of iterations of trying to just make it work, so my options might be way wrong.

    



    command to 'serve' the desktop capture :

    



    ./ffmpeg -f avfoundation -s 1920x1080 -r 60 -i "1" -an \
-vcodec libx264 -preset ultrafast -tune zerolatency -pix_fmt yuv420p \
-sdp_file video.sdp -rtsp_transport tcp -f rtp rtp://127.0.0.1:4000


    



    SDP file that’s generated with the ffmpeg command :

    



    SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.29.100
m=video 4000 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1


    



    ffplay command used to play the stream :

    



    ./ffplay -probesize 32 -analyzeduration 0 -sync ext \
-fflags nobuffer -fflags discardcorrupt -flags low_delay -framedrop \
-strict experimental -avioflags direct \
-protocol_whitelist file,rtp,udp -I video.sdp


    



    For a while before ffplay starts I see a bunch of these errors repeating (in red) :

    



    [h264 @ 0x7ff6b788de00] non-existing PPS 0 referenced
[h264 @ 0x7ff6b788de00] decode_slice_header error
[h264 @ 0x7ff6b788de00] no frame!


    



    then the window seems to 'catch up' to the stream and actually shows the desktop capture, and I get these errors and warnings on a regular interval :

    



    1- in a yellow warning color :

    



    [sdp @ 0x7fc85b830600] RTP: missed 4 packets
[sdp @ 0x7fc85b830600] max delay reached. need to consume packet


    



    2-in a red error color :

    



    [h264 @ 0x7fc85b02aa00] out of range intra chroma pred mode
[h264 @ 0x7fc85b02aa00] error while decoding MB 132 32


    



    (I have a feeling that the above errors have to do with previewing the desktop capture in the desktop I’m capturing and causing pixels in the display to overflow)

    



    Edit :
So, I solved the issue soon after posting, but will leave this up in case anyone runs into the same problem.

    



    The solution was to remove the top line in the .sdp file that said SDP:

    


  • Nginx RTMP Pull to HLS Streaming

    5 avril 2023, par Nathaniel Anderson

    I've followed this guide on setting up RTMP to HLS streaming - https://web.archive.org/web/20221205201139/https://docs.peer5.com/guides/setting-up-hls-live-streaming-server-using-nginx/

    


    RTMP streaming works just fine but for some reason I can't get HLS to link with the already existing RTMP server. I'm using OBS to stream to RTMP and it's set to be on x264 and as far as I know the default codec for audio is AAC so I'm not sure why it's not picking it up.

    


    Current Nginx.conf

    


    worker_processes  auto;
events {
    worker_connections  1024;
}

# RTMP configuration
rtmp {
    server {
        listen 1935; # Listen on standard RTMP port
        chunk_size 4000;

# Define the Application
        application show {
            live on;
            pull rtmp://localhost:1935/stream/test;
            # Turn on HLS
            hls on;
            hls_path /mnt/hls/;
            hls_fragment 3;
            hls_playlist_length 60;
            # disable consuming the stream from nginx as rtmp
            deny play all;
        }

        # RTMP video on demand for mp4 files
        application vod {
            play /mnt/mp4s;
        }

        # RTMP stream using OBS
        application stream {
            live on;
        }

    }
}

http {
    sendfile off;
    tcp_nopush on;
    aio on;
    directio 512;
    default_type application/octet-stream;

    server {
        listen 8080;

        location / {
            # Disable cache
            add_header 'Cache-Control' 'no-cache';

            # CORS setup
            add_header 'Access-Control-Allow-Origin' '*' always;
            add_header 'Access-Control-Expose-Headers' 'Content-Length';

            # allow CORS preflight requests
            if ($request_method = 'OPTIONS') {
                add_header 'Access-Control-Allow-Origin' '*';
                add_header 'Access-Control-Max-Age' 1728000;
                add_header 'Content-Type' 'text/plain charset=UTF-8';
                add_header 'Content-Length' 0;
                return 204;
            }

            types {
                application/dash+xml mpd;
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }

            root /mnt/;
        }
    }
}


    


    I've tried changing the rtmp link I have in that config too to both internal and external IP's since it can be reached. I tested watching the rtmp from another computer on the network to confirm it was functional. I wanted to avoid transcoding with ffmpeg since the server doesn't have that kind of power.

    


  • I am streaming mp3 music via ffmpeg to a local rtmp server then converting to hls, but am having difficulties end to end testing

    12 avril 2020, par SquirrelSenpai

    I am streaming mp3 music via ffmpeg to a local rtmp server then converting to hls, but am having difficulties end to end testing. I am know test.m3u8 playlist should be produce, however I am unable to check inside /nginx/hls/ as it is locked by www-data during operation. I have tried multiple permutation of what I thought the output hls stream would be in vlc with no luck. localhost:8080/live/test.m3u8, localhost:8080/hls/test.m3u8

    



    Any tips on effective testing would be much appreciated.

    



    Technologies involved :

    



      

    • FFMPEG
    • 


    • NGINX (This and the below 3 are part of a module)
    • 


    • HLS
    • 


    • RTMP
    • 


    



    Working :

    



    ffmpeg -hide_banner -i http://149.255.59.164:8138 -f mp3 test.mp3


    



    Seemingly working, correctly reads files, shows conversion of some kind
    
size= 362kB time=00:00:23.09 bitrate= 128.3kbits/s speed=3.21x

    



    fmpeg -hide_banner -i http://x.x.x.x:8138 -f mp3 rtmp://localhost:1935/live/test


    



    Nginx.conf

    



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

events {
        worker_connections 768;
        # multi_accept on;
}

rtmp_auto_push on;

rtmp{

        server{

                listen 1935;

                chunk_size 4000;

                #one publisher, many subscribers

                application live {

                        # enable live streaming
                        live on;
                        record off;

                        # publish only from localhost
                        allow publish 127.0.0.1;
                        deny publish all;

                        # hls - required for web browser consumption
                        hls on;
                        hls_path /tmp/hls;
                        hls_fragment 3;
                        hls_playlist_length 60;

                        # disable consuming the streaming from nginx as rtmp
                        deny play all;

                }

        }

}

# HTTP can be used for accessing RTMP stats
http {

    server {

        listen      8080;

        # This URL provides RTMP statistics in XML
        location /stat {
            rtmp_stat all;

            # Use this stylesheet to view XML as web page
            # in browser
            rtmp_stat_stylesheet stat.xsl;
        }

        location /stat.xsl {
            # XML stylesheet to view RTMP stats.
            # Copy stat.xsl wherever you want
            # and put the full directory path here
            root /path/to/stat.xsl/;
        }

        location /hls {
            # Serve HLS fragments
            types {
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }
            root /tmp;
            add_header Cache-Control no-cache;
        }

        location /dash {
            # Serve DASH fragments
            root /tmp;
            add_header Cache-Control no-cache;
        }
    }
}