Opened 3 years ago

Closed 2 months ago

#4217 closed defect (invalid)

ffmpeg stream is delayed

Reported by: illumilore Owned by:
Priority: normal Component: ffserver
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


When using ffmpeg to ffserver, the stream will gradually over the course of a day start to become more delayed, up to 5-7 seconds from current time. When started it doesn't seem to be that far behind.

Summary of the bug:
How to reproduce:

% ffmpeg -i input ... output
ffmpeg version
built on ...

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

./ffmpeg -f alsa -itsoffset 0.1 -ar 24000 -i plughw:1 -f video4linux2 -input_format mjpeg -s 960x720 -r 5 -i /dev/video0 -map 0:a -map 1:v -f segment -segment_time 3600 -segment_atclocktime 1 -r 5 -s 640x480 -reset_timestamps 1 -segment_list_flags live -vf "drawtext='fontfile=/usr/share/fonts/truetype/DejaVuSans.ttf:fontcolor=white:fontsize=30:x=1:y=2:shadowx=1:shadowy=1:text=%{localtime\:%Y-%m-%d %H


\:%S}'" -segment_start_number 1023 /media/cam/test_%03d.avi 2>/dev/null

# /etc/ffserver.conf
# Port on which the server is listening. You must select a different
# port from your standard HTTP web server if it is running on the same
# computer.
Port 8090

# Address on which the server is bound. Only useful if you have
# several network interfaces.

# Number of simultaneous HTTP connections that can be handled. It has
# to be defined *before* the MaxClients? parameter, since it defines the
# MaxClients? maximum limit.
MaxHTTPConnections 20

# Number of simultaneous requests that can be handled. Since FFServer
# is very fast, it is more likely that you will want to leave this high
# and use MaxBandwidth?, below.
MaxClients? 10

# This the maximum amount of kbit/sec that you are prepared to
# consume when streaming to clients.
MaxBandwidth? 8000

# Access log file (uses standard Apache log file format)
# '-' is the standard output.
CustomLog? -

# Suppress that if you want to launch ffserver as a daemon.

<Feed cam.ffm>

File /tmp/cam.ffm #when remarked, no file is beeing created and the stream keeps working!!
FileMaxSize? 400K

# Only allow connections from localhost to the feed.
ACL allow
ACL allow


# SWF output - great for testing
<Stream test.swf>

# the source feed
Feed cam.ffm
# the output stream format - SWF = flash
Format swf
# this must match the ffmpeg -r argument
VideoFrameRate? 5
# another quality tweak
VideoBitRate? 4000
# quality ranges - 1-31 (1 = best, 31 = worst)
VideoQMin 5
VideoQMax 15
VideoSize? 960x720

#AudioCodec? vorbis
#AudioBitRate? 64
#AudioChannels? 2
#AudioSampleRate? 24000

#<Stream test.sdp>
#Feed cam.ffm
#Format rtp
#VideoCodec? libx264
#VideoSize? 960x720
#VideoQMin 1
#VideoQMax 20

<Stream test.jpg>

Feed cam.ffm
Format jpeg
VideoFrameRate? 2
VideoQmin? 1
VideoQMax 5
VideoSize? 960x720
Strict -1


<Stream test.mjpg>

Feed cam.ffm
Format mpjpeg
VideoFrameRate? 1
VideoQmin? 10
VideoQMax 20
VideoSize? 480x320
Strict -1


$ ffmpeg --version
ffmpeg version 2.3.3 Copyright (c) 2000-2014 the FFmpeg developers

built on Nov 14 2014 12:17:00 with gcc 4.8 (SUSE Linux)
configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fPIC -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libx265 --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc --enable-gnutls
libavutil 52. 92.100 / 52. 92.100
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 48.100 / 55. 48.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.100 / 4. 11.100
libavresample 1. 3. 0 / 1. 3. 0
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100

Change History (1)

comment:1 Changed 2 months ago by atomnuker

  • Resolution set to invalid
  • Status changed from new to closed

ffserver was removed from git master, closing bug as invalid

Note: See TracTickets for help on using tickets.