Recherche avancée

Médias (0)

Mot : - Tags -/diogene

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

Autres articles (70)

Sur d’autres sites (8266)

  • Low Latency DASH Nginx RTMP

    3 août 2017, par Kenan Christian

    I use arut nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module) on the media server, then I tried to stream using FFmpeg to the dash application, then I test the stream by playing it using VLC.

    And it waits around 30secs to start playing, and it plays from the beginning, not the current timestamp.

    This is my current config on the RTMP block

    rtmp {
       server {
           listen 1935;

           application live {
               live on;

              exec ffmpeg -re -i rtmp://localhost:1935/live/$name
                 -c:a libfdk_aac -b:a 32k  -c:v libx264 -b:v 128K -f flv rtmp://localhost:1935/hls/$name_low
                 -c:a libfdk_aac -b:a 64k  -c:v libx264 -b:v 256k -f flv rtmp://localhost:1935/hls/$name_mid
                 -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 512K -f flv rtmp://localhost:1935/hls/$name_hi
                 -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 512K -f flv rtmp://localhost:1935/dash/$name_dash;
           }

           application hls {
                live on;

                hls on;
                hls_path /tmp/hls;
                hls_nested on;

                hls_variant _low BANDWIDTH=160000;
                hls_variant _mid BANDWIDTH=320000;
                hls_variant _hi  BANDWIDTH=640000;
           }

           application dash {
               live on;

               dash on;
               dash_path /tmp/dash;
               dash_nested on;
           }
       }
    }

    This is the command I use for streaming

    ffmpeg -re -i 2014\ SPRING.mp4 -c copy -f flv
    rtmp://52.221.221.163:1935/dash/spring

    How can I reduce the delay, and make it play from the same timestamp as the streamer ?

    Can I achieve under 5s latency ?

    UPDATE

    Tried to change the playlist length and fragment length, using this directive

    dash_playlist_length 10s;
    dash_fragment 2s;

    But still got some latency problem, sometimes it’s smaller than before, sometimes it’s the same

  • Low Latency DASH Nginx RTMP

    10 mai 2017, par Kenan Christian

    I use arut nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module) on the media server, then I tried to stream using FFmpeg to the dash application, then I test the stream by playing it using VLC.

    And it waits around 30secs to start playing, and it plays from the beginning, not the current timestamp.

    This is my current config on the RTMP block

    rtmp {
       server {
           listen 1935;

           application live {
               live on;

              exec ffmpeg -re -i rtmp://localhost:1935/live/$name
                 -c:a libfdk_aac -b:a 32k  -c:v libx264 -b:v 128K -f flv rtmp://localhost:1935/hls/$name_low
                 -c:a libfdk_aac -b:a 64k  -c:v libx264 -b:v 256k -f flv rtmp://localhost:1935/hls/$name_mid
                 -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 512K -f flv rtmp://localhost:1935/hls/$name_hi
                 -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 512K -f flv rtmp://localhost:1935/dash/$name_dash;
           }

           application hls {
                live on;

                hls on;
                hls_path /tmp/hls;
                hls_nested on;

                hls_variant _low BANDWIDTH=160000;
                hls_variant _mid BANDWIDTH=320000;
                hls_variant _hi  BANDWIDTH=640000;
           }

           application dash {
               live on;

               dash on;
               dash_path /tmp/dash;
               dash_nested on;
           }
       }
    }

    This is the command I use for streaming

    ffmpeg -re -i 2014\ SPRING.mp4 -c copy -f flv
    rtmp://52.221.221.163:1935/dash/spring

    How can I reduce the delay, and make it play from the same timestamp as the streamer ?

    Can I achieve under 5s latency ?

    UPDATE

    Tried to change the playlist length and fragment length, using this directive

    dash_playlist_length 10s;
    dash_fragment 2s;

    But still got some latency problem, sometimes it’s smaller than before, sometimes it’s the same

  • Start rtl_fm and ffmpeg when connecting to a controller and return the stream

    14 février 2017, par yglodt

    I would like to run rtl_fm and ffmpeg on demand from within a Spring Controller, with parameters from the calling url, and return the stream to the caller.

    The command-line to run would more or less be :

    rtl_fm -f 105000K -M fm -s 170k -A std -l 0 -E deemp -r 44.1k | \
    ffmpeg -f s16le -ac 1 -i pipe:0 -acodec libmp3lame -ab 128k -f mpeg -

    105000 is the frequency in kHz and should be taken from a request parameter or path variable.

    The url (Controller) should return the stream so that it can be played in a remote vlc.

    When disconnecting from the url (stopping vlc playback), the rtl_fm and ffmpeg processes should be ended immediately.

    Is that feasible ?