Recherche avancée

Médias (0)

Mot : - Tags -/diogene

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

Autres articles (32)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (5969)

  • ffmpeg output separate channel from an input with multiple channels

    16 février 2017, par tiras muturi

    i run this command to be able to stream a udp live stream to a http live stream that is playable using a mobile application that am building.
    its just a stream with audio streams only.

    ffmpeg -i udp ://@localhost:1111 -map 0:a http://localhost:8090/feed1.ffm

    Input #0, mpegts, from 'udp://@localhost:1111':
     Duration: N/A, start: 54616.264622, bitrate: 768 kb/s
     Program 1
       Metadata:
     service_name    : Service 1
     service_provider: TLK
       Stream #0:0[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
     Program 2
    Metadata:
     service_name    : Service 2
     service_provider: TLK
    Stream #0:1[0x111]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 3
    Metadata:
     service_name    : Service 3
     service_provider: TLK
    Stream #0:2[0x121]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 4
    Metadata:
     service_name    : Service 4
     service_provider: TLK
    Stream #0:3[0x131]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
     Program 5
    Metadata:
     service_name    : Service 5
     service_provider: TLK
    Stream #0:4[0x141]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
     Program 6
    Metadata:
     service_name    : Service 6
     service_provider: TLK
    Stream #0:5[0x151]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
     Program 7
    Metadata:
     service_name    : Service 7
     service_provider: TLK
    Stream #0:6[0x161]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 8
    Metadata:
     service_name    : Service 1
     service_provider: TLK
    Stream #0:7[0x171]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s

    i get this output

    Stream mapping:
     Stream #0:0 -> #0:0 (mp2 (native) -> mp2 (native))
     Stream #0:0 -> #0:1 (mp2 (native) -> mp2 (native))
    Press [q] to stop, [?] for help
    size=     100kB time=00:00:07.19 bitrate= 113.8kbits/s speed=3.01x
    video:0kB audio:84kB subtitle:0kB other streams:0kB global headers:0kB  muxing overhead: 18.358242%

    i really want a way i can be able to map every input stream to have an output stream that can be accessed separately from the other like maybe if i need the first stream maybe i will just

    ffplay http://localhost:8090/feed1.ffm

    and if i need the 7th stream i will just

    ffplay http://localhost:8090/feed7.ffm

    Please can someone help me crack this issue. FFmpeg dont have complex examples for my current situation.

    this is my header information

    ubuntu@ip-localhost:~$ \
    ffmpeg -i udp://@localhost:4000 \
     -map 0:a:0     http://localhost:8090/feed1.ffm
     -map 0:a:1 http://localhost:8090/feed2.ffm
     -map 0:a:2 http://localhost:8090/feed3.ffm
     -map 0:a:3 http://localhost:8090/feed4.ffm
     -map 0:a:4 http://localhost:8090/feed5.ffm
     -map 0:a:5 http://localhost:8090/feed6.ffm
     -map 0:a:6 http://localhost:8090/feed7.ffm
     -map 0:a:7 http://localhost:8090/feed8.ffm

    ffmpeg version 3.2.4-1 16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.1 (Ubuntu 5.4.1-5ubuntu2 16.04.york1) 20170210
    configuration : —prefix=/usr —extra-version=’1 16.04.york0’ — toolchain=hardened —libdir=/usr/lib/x86_64-linux-gnu —incdir=/usr/include/x86_64-linux-gnu —enable-gpl —disable-stripping —enable-avresample —enable-avisynth —enable-gnutls —enable-ladspa —enable-libass —enable-libbluray —enable-libbs2b —enable-libcaca —enable-libcdio —enable-libebur128 —enable-libflite —enable-libfontconfig —enable-libfreetype —enable-libfribidi —enable-libgme —enable-libgsm —enable-libmp3lame —enable-libopenjpeg —enable-libopenmpt —enable-libopus —enable-libpulse —enable-librubberband —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libspeex —enable-libssh —enable-libtheora —enable-libtwolame —enable-libvorbis —enable-libvpx —enable-libwavpack —enable-libwebp —enable-libx265 —enable-libxvid —enable-libzmq —enable-libzvbi —enable-omx —enable-openal —enable-opengl —enable-sdl2 —enable-libdc1394 —enable-libiec61883 —enable-chromaprint —enable-frei0r —enable-libopencv —enable-libx264 —enable-shared
    libavutil 55. 34.101 / 55. 34.101
    libavcodec 57. 64.101 / 57. 64.101
    libavformat 57. 56.101 / 57. 56.101
    libavdevice 57. 1.100 / 57. 1.100
    libavfilter 6. 65.100 / 6. 65.100
    libavresample 3. 1. 0 / 3. 1. 0
    libswscale 4. 2.100 / 4. 2.100
    libswresample 2. 3.100 / 2. 3.100
    libpostproc 54. 1.100 / 54. 1.100

    Input #0, mpegts, from 'udp://@localhost:1111':
     Duration: N/A, start: 60047.944622, bitrate: 768 kb/s
     Program 1
       Metadata:
     service_name    : Service 1
     service_provider: TKL
    Stream #0:0[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 2
    Metadata:
     service_name    : Service 2
     service_provider: TKL
    Stream #0:1[0x111]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 3
    Metadata:
     service_name    : Service 3
     service_provider: TKL
    Stream #0:2[0x121]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 4
    Metadata:
     service_name    : Service 4
     service_provider: TKL
    Stream #0:3[0x131]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 5
    Metadata:
     service_name    : Service 5
     service_provider: TKL
    Stream #0:4[0x141]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 6
    Metadata:
     service_name    : Service 6
     service_provider: TKL
    Stream #0:5[0x151]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 7
    Metadata:
     service_name    : Service 7
     service_provider: TKL
    Stream #0:6[0x161]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 8
    Metadata:
     service_name    : Service 8
     service_provider: TKL
    Stream #0:7[0x171]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #0:0: Audio: mp2, 44100 Hz, mono, s16, 32 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Stream #0:1: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #1, ffm, to 'http://localhost:8090/feed2.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #1:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #2, ffm, to 'http://localhost:8090/feed3.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #2:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #3, ffm, to 'http://localhost:8090/feed4.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #3:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #4, ffm, to 'http://localhost:8090/feed5.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #4:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #5, ffm, to 'http://localhost:8090/feed6.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #5:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #6, ffm, to 'http://localhost:8090/feed7.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #6:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #7, ffm, to 'http://localhost:8090/feed8.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #7:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Stream mapping:
    Stream #0:0 -> #0:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #0:1 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #1:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #2:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #3:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #4:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #5:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #6:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #7:0 (mp2 (native) -> mp2 (native))
    Press [q] to stop, [?] for help

    thats my full console.

  • Demultiplex UDP live stream to multiple single live stream outputs using FFMPEG & FFSERVE

    17 février 2017, par tiras muturi

    i have a problem with ffmpeg. i have an input live stream that has 8 inputs and i want to use ffmpeg to convert it from udp live steram to tcp livestream and then extract each of the 8 input stream differently.

    i have been reading about the ffmpeg documentation at they havent provided a clear way of solving my problem.

    am running

    ffmpeg version 3.2.4-1~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.1 (Ubuntu 5.4.1-5ubuntu2~16.04.york1) 20170210 configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.101 / 57. 56.101 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libavresample 3. 1. 0 / 3. 1. 0 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100

    am running this command to help me split my input into multiple output that can be accessed differently.

    ffmpeg \
    -i udp://@localhost:4000 -loglevel debug \
    -map 0:0 http://localhost:8090/feed1.ffm \
    -map 0:1 http://localhost:8090/feed2.ffm \
    -map 0:2 http://localhost:8090/feed3.ffm \
    -map 0:3 http://localhost:8090/feed4.ffm \
    -map 0:4 http://localhost:8090/feed5.ffm \
    -map 0:5 http://localhost:8090/feed6.ffm \
    -map 0:6 http://localhost:8090/feed7.ffm \
    -map 0:7 http://localhost:8090/feed8.ffm

    this is my full output

    ubuntu@ip-172-31-40-57:~$ ffmpeg -i udp://@localhost:4000  -map 0:0  http://localhost:8090/feed1.ffm  -map 0:1 http://localhost:8090/feed2.ffm  -map 0:2 http://localhost:8090/feed3.ffm  -map 0:3 http://localhost:8090/feed4.ffm  -map 0:4 http://localhost:8090/feed5.ffm  -map 0:5 http://localhost:8090/feed6.ffm  -map 0:6 http://localhost:8090/feed7.ffm  -map 0:7 http://localhost:8090/feed8.ffm

    ffmpeg version 3.2.4-1~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.1 (Ubuntu 5.4.1-5ubuntu2~16.04.york1) 20170210 configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil      55. 34.101 / 55. 34.101 libavcodec     57. 64.101 / 57. 64.101 libavformat    57. 56.101 / 57. 56.101 libavdevice    57.  1.100 / 57.  1.100 libavfilter     6. 65.100 /  6. 65.100 libavresample   3.  1.  0 /  3.  1.  0 libswscale      4.  2.100 /  4.  2.100 libswresample   2.  3.100 /  2.  3.100 libpostproc    54.  1.100 / 54.  1.100


    Input #0, mpegts, from 'udp://@localhost:4000':
    Duration: N/A, start: 14580.980000, bitrate: 768 kb/s
    Program 1
    Metadata:
     service_name    : STREAM1
     service_provider: RAL
    Stream #0:0[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 2
    Metadata:
     service_name    : STREAM2
     service_provider: RAL
    Stream #0:1[0x111]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 3
    Metadata:
     service_name    : STREAM3
     service_provider: RAL
    Stream #0:2[0x121]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
     Program 4
     Metadata:
     service_name    : STREAM4
     service_provider: RAL
    Stream #0:3[0x131]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 5
    Metadata:
     service_name    : STREAM5
     service_provider: RAL
    Stream #0:4[0x141]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 6
    Metadata:
     service_name    : STREAM6
     service_provider: RAL
    Stream #0:5[0x151]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 7
    Metadata:
     service_name    : STREAM7
     service_provider: RAL
    Stream #0:6[0x161]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Program 8
    Metadata:
     service_name    : STREAM8
     service_provider: RAL
    Stream #0:7[0x171]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 96 kb/s
    Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #0:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #1, ffm, to 'http://localhost:8090/feed2.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #1:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #2, ffm, to 'http://localhost:8090/feed3.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #2:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #3, ffm, to 'http://localhost:8090/feed4.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #3:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #4, ffm, to 'http://localhost:8090/feed5.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #4:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #5, ffm, to 'http://localhost:8090/feed6.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #5:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #6, ffm, to 'http://localhost:8090/feed7.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #6:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Output #7, ffm, to 'http://localhost:8090/feed8.ffm':
    Metadata:
    creation_time   : now
    encoder         : Lavf57.56.101
    Stream #7:0: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
    Metadata:
     encoder         : Lavc57.64.101 mp2
    Stream mapping:
    Stream #0:0 -> #0:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #1:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #2:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #3:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #4:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #5:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #6:0 (mp2 (native) -> mp2 (native))
    Stream #0:0 -> #7:0 (mp2 (native) -> mp2 (native))
    Press [q] to stop, [?] for help
    size=      72kB time=00:00:07.66 bitrate=  76.9kbits/s speed=2.68x
    video:0kB audio:480kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Exiting normally, received signal 2.

    these are my live feeds.

    <feed>


    File /tmp/feed2.ffm
    FileMaxSize 64M

    ACL allow 127.0.0.1

    </feed>

    <feed>


     File /tmp/feed3.ffm
     FileMaxSize 64M

     ACL allow 127.0.0.1

    </feed>


    <feed>


     File /tmp/feed4.ffm
     FileMaxSize 64M

     ACL allow 127.0.0.1

    </feed>

    these are my stream

    MP3 audio

    <stream>
    Feed feed1.ffm
    Format mp2
    #AudioCodec mp3
    AudioBitRate 64
    AudioChannels 2
    AudioSampleRate 44100
    NoVideo
    </stream>

    <stream>
    Feed feed2.ffm
    Format mp2
    #AudioCodec mp3
    AudioBitRate 64
    AudioChannels 2
    AudioSampleRate 44100
    NoVideo
    </stream>

    <stream>
    Feed feed3.ffm
    Format mp2
    #AudioCodec mp3
    AudioBitRate 64
    AudioChannels 2
    AudioSampleRate 44100
    NoVideo
    </stream>
  • WebM live streaming via DASH

    23 février 2017, par ewack

    I am following the instructions here to try to make WebM live streaming via DASH. My input is from an Axis camera and it is streaming as h264 encoding. I am using node to spin up the ffmpeg processes. I am able to create the .hdr file and the .chk files. The .mpd file is even created but it’s empty and I get an error saying :

    Could not write header for output file #0 (incorrect codec parameters ?): Operation not permittedStream mapping: Stream #0:0 -> #0:0 (copy)

    Here’s all of my code :

    var express = require('express');
    spawn = require('child_process').spawn;

    var app = express();

    app.use(express.static(__dirname + '/public'));

    app.listen(8080);
    console.log("Running on Port 8080");

    var ffmpeg1 = spawn('ffmpeg', [
       '-y',
       //video
       '-i', 'rtsp://admin:password@192.168.1.54:554/axis-media/media.amp?videocodec=h264&amp;resolution=1280x720',

       '-map', '0:0',
       '-pix_fmt', 'yuv420p',
       '-color_range', '2',
       '-c:v', 'libvpx-vp9',

       '-s', '1280x720',
       '-keyint_min', '25',
       '-g', '25',

       // //VP9_LIVE_PARAMS
       '-speed', '6',
       '-tile-columns', '4',
       '-frame-parallel', '1',
       '-threads', '8',
       '-static-thresh', '0',
       '-max-intra-rate', '300',
       '-deadline', 'realtime',
       '-lag-in-frames', '0',
       '-error-resilient', '1',

       '-f', 'webm_chunk',
       '-header', 'public/glass_360.hdr',
       '-chunk_start_index', '1',
       'public/glass_360_%d.chk',
    ]);


    setTimeout(()=> {
     var ffmpeg2 = spawn('ffmpeg', [
       '-y',
       '-f', 'webm_dash_manifest',
       '-live', '1',
       '-i', 'public/glass_360.hdr',
       '-c', 'copy',
       '-map', '0',
       '-r', '25',
       '-framerate', '25',

       '-f', 'webm_dash_manifest',
       '-live', '1',

       '-adaptation_sets', '"id=0,streams=0"',
       '-chunk_start_index', '1',
       '-chunk_duration_ms', '2000',
       '-time_shift_buffer_depth', '7200',
       '-minimum_update_period', '7200',

       'public/glass_live_manifest.mpd'
     ]);
     ffmpeg2.stdout.on('data',
         function (data) {
             console.log('ff2std: ' + data);
         }
     );

     ffmpeg2.stderr.on('data',
         function (data) {
             console.log('ff2err: ' + data);
         }
     );
    }, 5000);

    ffmpeg1.stdout.on('data',
       function (data) {
           console.log('ff1std: ' + data);
       }
    );

    ffmpeg1.stderr.on('data',
       function (data) {
           console.log('ff1err: ' + data);
       }
    );

    Here is all of my output :

    Running on Port 8080
    ff1err: ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
     built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-frei0r --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.1.2/include/openjpeg-2.1 --enable-nonfree --enable-vda

    ff1err:   libavutil      55. 34.101 / 55. 34.101
     libavcodec     57. 64.101 / 57. 64.101
     libavformat    57. 56.101 / 57. 56.101
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libavresample   3.  1.  0 /  3.  1.  0
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100

    ff1err: Input #0, rtsp, from 'rtsp://admin:password@192.168.1.54:554/axis-media/media.amp?videocodec=h264&amp;resolution=1280x720':
     Metadata:
       title           : Session streamed with GStreamer
       comment         : rtsp-server
     Duration: N/A, start: 0.033344
    ff1err: , bitrate: N/A
       Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 180k tbc

    ff1err: [swscaler @ 0x7f8df281bc00] deprecated pixel format used, make sure you did set range correctly

    ff1err: [libvpx-vp9 @ 0x7f8df2800600] v1.6.1

    ff1err: Output #0, webm_chunk, to 'public/glass_360_%d.chk':
     Metadata:
       title           : Session streamed with GStreamer
       comment         : rtsp-server
       encoder         : Lavf57.56.101

    ff1err:     Stream #0:0: Video: vp9 (libvpx-vp9), yuv420p(pc), 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 200 kb/s, 25 fps, 1k tbn, 25 tbc
       Metadata:
         encoder         : Lavc57.64.101 libvpx-vp9
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> vp9 (libvpx-vp9))
    Press [q] to stop, [?] for help

    ff1err: frame=   10 fps=0.0 q=0.0 size=N/A time=00:00:00.36 bitrate=N/A speed=0.71x    
    ff1err: frame=   25 fps= 25 q=0.0 size=N/A time=00:00:00.96 bitrate=N/A speed=0.946x    
    ff1err: frame=   40 fps= 26 q=0.0 size=N/A time=00:00:01.56 bitrate=N/A speed=1.03x    
    ff1err: frame=   55 fps= 27 q=0.0 size=N/A time=00:00:02.16 bitrate=N/A speed=1.07x    
    ff1err: frame=   70 fps= 28 q=0.0 size=N/A time=00:00:02.76 bitrate=N/A speed=1.09x    
    ff1err: frame=   85 fps= 28 q=0.0 size=N/A time=00:00:03.36 bitrate=N/A speed=1.11x    
    ff2err: ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
     built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-frei0r --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.1.2/include/openjpeg-2.1 --enable-nonfree --enable-vda

    ff2err:   libavutil      55. 34.101 / 55. 34.101
     libavcodec     57. 64.101 / 57. 64.101
     libavformat    57. 56.101 / 57. 56.101
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libavresample   3.  1.  0 /  3.  1.  0
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100

    ff2err: [webm_dash_manifest @ 0x7fbc5b80b400] Could not find codec parameters for stream 0 (Video: vp9, none, 1280x720): unspecified pixel format
    Consider increasing the value for the 'analyzeduration' and 'probesize' options

    ff2err: Input #0, webm_dash_manifest, from 'public/glass_360.hdr':
     Metadata:
       title           : Session streamed with GStreamer
       encoder         : Lavf57.56.101
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: vp9, none, 1280x720
    ff2err: , SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
       Metadata:
         webm_dash_manifest_file_name: glass_360.hdr
         webm_dash_manifest_track_number: 1

    ff2err: Could not write header for output file #0 (incorrect codec parameters ?): Operation not permittedStream mapping:
     Stream #0:0 -> #0:0 (copy)

    ff2err:     Last message repeated 1 times

    ff1err: frame=  101 fps= 29 q=0.0 size=N/A time=00:00:04.00 bitrate=N/A speed=1.13x    
    ff1err: frame=  116 fps= 29 q=0.0 size=N/A time=00:00:04.60 bitrate=N/A speed=1.14x    
    ff1err: frame=  131 fps= 29 q=0.0 size=N/A time=00:00:05.20 bitrate=N/A speed=1.15x    
    ff1err: frame=  146 fps= 29 q=0.0 size=N/A time=00:00:05.80 bitrate=N/A speed=1.15x    
    ff1err: frame=  161 fps= 29 q=0.0 size=N/A time=00:00:06.40 bitrate=N/A speed=1.15x    
    ff1err: frame=  177 fps= 29 q=0.0 size=N/A time=00:00:07.04 bitrate=N/A speed=1.16x    
    ff1err: frame=  192 fps= 29 q=0.0 size=N/A time=00:00:07.64 bitrate=N/A speed=1.16x    
    ff1err: frame=  207 fps= 29 q=0.0 size=N/A time=00:00:08.24 bitrate=N/A speed=1.16x    
    ff1err: frame=  222 fps= 29 q=0.0 size=N/A time=00:00:08.84 bitrate=N/A speed=1.17x    
    ff1err: frame=  237 fps= 29 q=0.0 size=N/A time=00:00:09.44 bitrate=N/A speed=1.17x    
    ff1err: frame=  252 fps= 29 q=0.0 size=N/A time=00:00:10.04 bitrate=N/A speed=1.17x  

    Why is ffmpeg creating an empty .mpd file ?