[FFmpeg-user] runtime frame rate is not identical as -r option of ffmpeg

Soho Soho123 soho123.2012 at gmail.com
Mon Feb 18 06:43:03 CET 2013


Hi All,

I try to get video frame and send to remote client. When I use the
config for ffserver and command line of ffmpeg as the log below.
the frame is very low. it is 6~8 fps only.
But the frame rate option and config is 30fps.
does anyone have idea:
Why the runtime frame is very low?
ffserver.conf:
====================
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 10
MaxBandwidth 100000
CustomLog -
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 20M
ACL allow 127.0.0.1
</Feed>
<Stream test.mjpeg>
Feed feed1.ffm
Format mjpeg
VideoSize 640x480
VideoFrameRate 30
VideoBitRate 20000
VideoQMin 1
VideoQMax 10
Noaudio
</Stream>
====================

ffserver command line:
====================
ffserver -f /etc/ffserver.conf &
====================

the log of  ffserver:
======================
# ffserver version 1.1.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb  8 2013 14:39:10 with gcc 4.4.5-1.5.5p4 (GCC)
  configuration: --enable-cross-compile --cross-prefix=rsdk-linux-
--arch=mips --target-os=linux --disable
-doc --disable-htmlpages --disable-manpages --disable-podpages
--disable-txtpages --disable-w32threads --d
isable-os2threads --disable-ffplay --disable-postproc
--disable-mips32r2 --disable-yasm --disable-vis --di
sable-altivec --disable-mipsdspr1 --disable-mipsdspr2
--disable-mipsfpu --enable-small --prefix=/ffmpeg-1.1.1/romfs
--bindir=/ffmpeg-1.1.1/romfs --enable-pic --disable-encoders --ena
ble-encoder=mjpeg --enable-encoder=flv --enable-encoder=mpeg4
--disable-decoders --enable-decoder=mjpeg --
enable-decoder=flv --enable-decoder=mpeg4 --enable-decoder=rawvideo
--enable-encoder=rawvideo --enable-dec
oder=vorbis --enable-encoder=vorbis --disable-hwaccels
--disable-muxers --disable-demuxers --enable-muxer=
rawvideo --enable-muxer=mpegts --enable-muxer=ffm --enable-muxer=mov
libavutil      52. 13.100 / 52. 13.
100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
Mon Feb 18 12:52:42 2013 FFserver started.
==========================================

the command of ffmpeg:
==========================================
ffmpeg -v verbose -f video4linux2 -vcodec mjpeg -r 30 -s 640x480 -i /dev/video
0 http://localhost:8090/feed1.ffm
==========================================

the log of ffmpeg:
==========================================
ffmpeg version 1.1.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 8 2013 14:39:10 with gcc 4.4.5-1.5.5p4 (GCC)
configuration: --enable-cross-compile --cross-prefix=rsdk-linux-
--arch=mips --target-os=linux --disable
-doc --disable-htmlpages --disable-manpages --disable-podpages
--disable-txtpages --disable-w32threads --d
isable-os2threads --disable-ffplay --disable-postproc
--disable-mips32r2 --disable-yasm --disable-vis --di
sable-altivec --disable-mipsdspr1 --disable-mipsdspr2
--disable-mipsfpu --enable-small --prefix=/ffmpeg-1.1.1/romfs
--bindir=/ffmpeg-1.1.1/romfs
--enable-pic --disable-encoders --enable-encoder=mjpeg
--enable-encoder=flv --enable-encoder=mpeg4 --disable-decoders
--enable-decoder=mjpeg --
enable-decoder=flv --enable-decoder=mpeg4 --enable-decoder=rawvideo
--enable-encoder=rawvideo --enable-dec
oder=vorbis --enable-encoder=vorbis --disable-hwaccels
--disable-muxers --disable-demuxers --enable-muxer=
rawvideo --enable-muxer=mpegts --enable-muxer=ffm --enable-muxer=mov
libavutil 52. 13.100 / 52. 13.
100
libavcodec 54. 86.100 / 54. 86.100
libavformat 54. 59.106 / 54. 59.106
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.100 / 3. 32.100
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
[video4linux2,v4l2 @ 0x810230] [3]Capabilities: 4000001
[video4linux2,v4l2 @ 0x810230] Estimating duration from bitrate, this
may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1361187540.410000, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj422p, 640x480, -5 kb/s, 30 tbr, 1000k tbn, 30 tbc
Mon Feb 18 11:39:00 2013 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175
[graph 0 input from stream 0:0 @ 0x814d90] w:640 h:480 pixfmt:yuvj422p
tb:1/30 fr:30/1 sar:0/1 sws_param:f
lags=2
[scaler for output stream 0:0 @ 0x8157b0] w:640 h:480 flags:'0x4' interl:0
[graph 0 input from stream 0:0 @ 0x814d90] TB:0.033333
FRAME_RATE:30.000000 SAMPLE_RATE:nan
[scaler for output stream 0:0 @ 0x8157b0] w:640 h:480 fmt:yuvj422p
sar:0/1 -> w:640 h:480 fmt:yuvj422p sar
:0/1 flags:0x4
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
Metadata:
creation_time : now
encoder : Lavf54.59.106
Stream #0:0: Video: mjpeg, yuvj422p, 640x480, q=1-10, 20000 kb/s,
1000k tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg -> mjpeg)
Press [q] to stop, [?] for help
frame= 96 fps=7.2 q=1.6 size= 3744kB time=00:00:03.20 bitrate=9584.6kbits/s
==========================================


More information about the ffmpeg-user mailing list