Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


This forum has not been maintained for a long time and will probably get deleted in the near future.
For faster responses to your questions, please use StackOverflow instead and tag your questions with "FFmpeg".
If you need a backup of the posts from this forum, please contact me directly.

FFMPEG Side by Side working with file not with ffserver

Discussions about problems encountered using ffserver.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

FFMPEG Side by Side working with file not with ffserver

Postby ffzzz » Wed Mar 08, 2017 6:36 am

Good morning everybody.
I got some problems with my new projekt.
I own 4 network camers, wich offers a rtsp stream.
Now i'd like to creat a side by side stream for 2 camers and/or a mosaic with all 4 cameras.

Let's start with side by side:
I use the following command to start ffmpeg:
Code: Select all
ffmpeg  -i  r..p://mi1/unicast -i r..p://mi3/unicast -filter_complex "nullsrc=size=1920x1080 [base]; [base][0:v] overlay [tmp]; [tmp][1:v] overlay=x=960" /tmp/webcam01.mpg

This works fine for creating a file but not for the server.

Here is my ffserver.conf:
Code: Select all
HTTPPort 8090
RTSPPort 8091
HTTPBindAddress 0.0.0.0
RTSPBindAddress 0.0.0.0
MaxClients 100
MaxBandwidth 10000
NoDefaults

<Feed webcam01.ffm>
   File /tmp/webcam01.ffm
   FileMaxSize 2M
ACL allow 127.0.0.1
ACL allow localhost
</Feed>

<stream webcam01.mov>
   Feed webcam01.ffm
   Format rtp
   VideoSize 1920x1080
   VideoQMin 5
   VideoQMax 20
#   VideoFrameRate 30
#  VideoBitRate 500
   AVOptionVideo flags +global_header
#   VideoCodec libx264
#   AVPresetVideo baseline
   NoAudio
</Stream>

<Stream stat.html>
Format status
# Only allow local people to get the status
ACL allow localhost
ACL allow 172.16.0.0 192.168.255.255
</Stream>


And here is my feed for the server:
Code: Select all
ffmpeg  -i r..p://mi1/unicast -i r..p://mi3/unicast -filter_complex "nullsrc=size=1920x1080 [base]; [base][0:v] overlay [tmp]; [tmp][1:v] overlay=x=960" h..p://localhost:8090/webcam01.ffm


When i run this, i get the following error:
Code: Select all
ffmpeg version 3.0.7-0ubuntu0.16.10.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.2.0 (Ubuntu 6.2.0-5ubuntu12) 20161005
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.10.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --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-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libx264
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Guessed Channel Layout for  Input Stream #0.1 : mono
Input #0, rtsp, from 'r..p://mi1/unicast':
  Metadata:
    title           : LIVE555 Streaming Media v2014.07.04
    comment         : LIVE555 Streaming Media v2014.07.04
  Duration: N/A, start: 0.001000, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p, 1920x1080, 14.08 tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s
Guessed Channel Layout for  Input Stream #1.1 : mono
Input #1, rtsp, from 'r..p://mi3/unicast':
  Metadata:
    title           : LIVE555 Streaming Media v2014.07.04
    comment         : LIVE555 Streaming Media v2014.07.04
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #1:0: Video: h264 (High), yuv420p, 1920x1080, 25 tbr, 90k tbn, 180k tbc
    Stream #1:1: Audio: pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s
[tcp @ 0x55ca4af36f80] Connection to t.p://localhost:8090 failed (Connection refused), trying next address
[tcp @ 0x55ca4ae42980] Connection to t.p://localhost:8090 failed (Connection refused), trying next address
Output #0, ffm, to 'h..p://localhost:8090/webcam01.ffm':
  Metadata:
    title           : LIVE555 Streaming Media v2014.07.04
    comment         : LIVE555 Streaming Media v2014.07.04
    creation_time   : 2017-03-07 22:28:16
    encoder         : Lavf57.25.100
    Stream #0:0: Video: mpeg1video, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 1000k tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.24.102 mpeg1video
    Side data:
      unknown side data type 10 (24 bytes)
    Stream #0:1: Video: mpeg4, yuv420p, 1920x1080, q=5-20, 200 kb/s, 14.08 fps, 1000k tbn, 14.08 tbc
    Metadata:
      encoder         : Lavc57.24.102 mpeg4
    Side data:
      unknown side data type 10 (24 bytes)
Stream mapping:
  Stream #0:0 (h264) -> overlay:overlay (graph 0)
  Stream #1:0 (h264) -> overlay:overlay (graph 0)
  overlay (graph 0) -> Stream #0:0 (mpeg1video)
  Stream #0:0 -> #0:1 (h264 (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
[rtsp @ 0x55ca4ad05e00] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[rtsp @ 0x55ca4ad84de0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
av_interleaved_write_frame(): Connection reset by peer
Error writing trailer of h..p://localhost:8090/webcam01.ffm: Connection reset by peerframe=    2 fps=0.0 q=2.2 Lq=4.0 size=      80kB time=00:00:01.77 bitrate= 369.2kbits/s dup=24 drop=0 speed=8.83x
video:250kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!


Sorry for the .. links but i cannot post links as i'm a new user.

Could you please help me?

Thank you guys.
ffzzz
 
Posts: 1
Joined: Wed Mar 08, 2017 6:13 am

Re: FFMPEG Side by Side working with file not with ffserver

Postby weevilknievel » Sun Jun 25, 2017 8:51 am

Hi,

I have the same problem - did you find the solution?

Thanks.
weevilknievel
 
Posts: 1
Joined: Sun Jun 25, 2017 8:43 am


Return to ffserver

Who is online

Users browsing this forum: Bing [Bot] and 2 guests