Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 21/07/2019, à 21:10

bird12358

ffserver en remote

Bonjour,

J'essai de mettre en place un server de streaming de webcam sur mon pc que je puisse consulter sur un réseau local. Voici mon fichier ffserver.conf:

Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -

<Feed webcam.ffm> 
  File /tmp/webcam.ffm 
  FileMaxSize 5M
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255

</Feed> 

<Stream webcam.mjpeg>
  Feed webcam.ffm
  Format mjpeg
  VideoSize 640x480
  VideoFrameRate 25
  VideoBitRate 500
  VideoIntraOnly
  Noaudio
  Strict -1
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</Stream>

#<Stream webcam.webm>
#  Feed webcam.ffm
#  Format webm
#  VideoCodec libvpx
#  VideoSize 640x480
#  VideoFrameRate 25
#  VideoBitRate 512
#  VideoIntraOnly
#  AVOptionVideo flags +global_header
#  AVOptionAudio flags +global_header
#  AVOptionVideo cpu-used 5
#  PreRoll 15
#  StartSendOnKey
#  Noaudio
#  Strict -1
#</Stream>


<Stream status.html>
Format status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</Stream>

D'abord je lance en local sur mon pc d'adresse 192.168.1.13 :

 ffserver -d -f /etc/ffserver.conf

J'essaie de pinger depuis mon autre pc je n'ai pas de résultat :

ping -a 192.168.1.13:8090
ping: 192.168.1.13:8090: Nom ou service inconnu

Pareil quand je veux lancer un stream sur mon server depuis mon autre pc ca me donne aucun récultat:

ffmpeg -f v4l2 -s 352x288 -r 25 -i /dev/video0  http://192.168.1.13:8090/webcam.ffm
ffmpeg version 4.1.3-1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-7)
  configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[video4linux2,v4l2 @ 0x555702ae8880] The driver changed the time per frame from 1/25 to 1/30
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 13866.690228, bitrate: 48660 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 352x288, 48660 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[NULL @ 0x555702aec780] Unable to find a suitable output format for 'http://192.168.1.13:8090/webcam.ffm'
http://192.168.1.13:8090/webcam.ffm: Invalid argument

Par contre sur mon pc de server j'arrive correctement à envoyer un flux et a le consulter avec ffplay:

ffmpeg -f v4l2 -s 352x288 -r 25 -i /dev/video1  http://127.0.0.1:8090/webcam.ffm
ffplay rtp://127.0.0.1:5554/webcam.ffm

J'ai vérifier sur mon pc ou il y a mon ffserver mon firewall est inactif:

sudo ufw status
Status: inactive

Comment puis je faire pour envoyer le flux  et ensuite le consulter depuis mon autre pc?

Hors ligne