[FFmpeg-user] how to output .avi stream from mjpeg web cam

Soho Soho123 soho123.2012 at gmail.com
Thu Mar 14 10:45:32 CET 2013


Hi All,

I got the peoblem when I try to output .avi stream to remote client(vlc).
there is a lot error when vlc connect to ffserver:
the error is:

Thu Mar 14 17:29:32 2013 Too large number of skipped frames 817969303626 > 60000
Thu Mar 14 17:29:32 2013 Error writing frame to output

Does anyone have idea about the error?



ffserver conf:
====================================================
<Stream test.avi>
Feed feed1.ffm
Format avi
NoAudio
VideoSize 640x480
VideoFrameRate 15
VideoCodec mjpeg
</Stream>
====================================================
ffmpeg command line:
====================================================
ffmpeg -loglevel debug -f video4linux2 -input_format mjpeg -r 15 -s 640x480 -i
 /dev/video0 -vcodec copy http://localhost:8090/feed1.ffm
====================================================
and the log is :
====================================================
# ffserver -f /etc/ffserver.conf &
# ffserver version 1.1.git-951d39f Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 14 2013 15:21:06 with gcc 4.4.5-1.5.5p4 (GCC)
  configuration: --enable-cross-compile --cross-prefix=sdk-linux-
--arch=mips --target-os=linux --disa
ble-doc --enable-debug=3 --disable-htmlpages --disable-manpages
--disable-podpages --disable-txtpages -
-disable-mips32r2 --disable-w32threads --disable-os2threads
--disable-ffplay --disable-postproc --disab
le-runtime-cpudetect --disable-swscale-alpha --disable-yasm
--disable-vis --disable-altivec --disable-m
ipsdspr1 --disable-mipsdspr2 --disable-mipsfpu --disable-mmx
--disable-mmxext --disable-sse --disable-s
se2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42
--disable-avx --disable-fma4 --disabl
e-armv5te --disable-armv6 --disable-armv6t2 --disable-vfp
--disable-neon --enable-small --prefix=/ffmpeg-951d39f/romfs
--bindir=/ffmpeg-951d39f/romfs --enable-
pic --disable-bsfs --disable-filters
--enable-filter='aformat,aresample,copy,format,fps,frameste  libav
util      52. 17.102 / 52. 17.102
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.100 / 54. 63.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 38.103 /  3. 38.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
Thu Mar 14 17:28:54 2013 FFserver started.
ffmpeg -loglevel debug -f video4linux2 -input_format mjpeg -r 15 -s 640x480 -i
 /dev/video0 -vcodec copy http://localhost:8090/feed1.ffm
ffmpeg version 1.1.git-951d39f Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 14 2013 15:21:06 with gcc 4.4.5-1.5.5p4 (GCC)
  configuration: --enable-cross-compile --cross-prefix=sdk-linux-
--arch=mips --target-os=linux --disa
ble-doc --enable-debug=3 --disable-htmlpages --disable-manpages
--disable-podpages --disable-txtpages -
-disable-mips32r2 --disable-w32threcase VIDIOC_QUERYCAP
adcase VIDIOC_ENUMINPUT
s --disable-os2threads --disableSetting frame interval to 1/15 (666666).
-fUsing frame interval 66666.6 us (15.0 fps).
fplay --disable-postproc --disable-runtime-cpudetect
--disable-swscale-alpha --disable-yasm --disable-v
is --disable-altivec --disable-mipsdspr1 --disable-mipsdspr2
--disable-mipsfpu --disable-mmx --disable-
mmxext --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3
--disable-sse4 --disable-sse42 --dis
able-avx --disable-fma4 --disable-armv5te --disable-armv6
--disable-armv6t2 --disable-vfp --disable-neo
n --enable-small --prefix=/ffmpeg-951d39f/romfs
--bindir=/ffmpeg-951d39f/romfs --enable-pic --disable-bsfs
--disable-filters --enable-filter='aformat,aresample
,copy,format,fps,frameste  libavutil      52. 17.102 / 52. 17.102
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.100 / 54. 63.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 38.103 /  3. 38.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set
libav* logging level) with argument 'd
ebug'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'video4linux2'.
Reading option '-input_format' ... matched as AVOption 'input_format'
with argument 'mjpeg'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz
value, fraction or abbreviation)) wit
h argument '15'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or
abbreviation)) with argument '640
x480'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video
codec ('copy' to copy stream)) wit
h argument 'copy'.
Reading option 'http://localhost:8090/feed1.ffm' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument video4linux2.
Applying option r (set frame rate (Hz value, fraction or
abbreviation)) with argument 15.
Applying option s (set frame size (WxH or abbreviation)) with argument 640x480.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x6964e0] fd:3 capabilities:4000001
[video4linux2,v4l2 @ 0x6964e0] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x6964e0] input_channel: 0, input_name: Camera 1
[video4linux2,v4l2 @ 0x6964e0] Setting time per frame to 1/15
[mjpeg @ 0x69cc10] marker=d8 avail_size_in_buf=57340
[mjpeg @ 0x69cc10] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x69cc10] marker=db avail_size_in_buf=57338
[mjpeg @ 0x69cc10] index=0
[mjpeg @ 0x69cc10] qscale[0]: 2
[mjpeg @ 0x69cc10] marker parser used 67 bytes (536 bits)
[mjpeg @ 0x69cc10] marker=db avail_size_in_buf=57269
[mjpeg @ 0x69cc10] index=1
[mjpeg @ 0x69cc10] qscale[1]: 3
[mjpeg @ 0x69cc10] marker parser used 67 bytes (536 bits)
[mjpeg @ 0x69cc10] marker=c0 avail_size_in_buf=57200
[mjpeg @ 0x69cc10] sof0: picture: 640x480
[mjpeg @ 0x69cc10] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x69cc10] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x69cc10] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x69cc10] pix fmt id 21111100
[mjpeg @ 0x69cc10] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x69cc10] marker=c4 avail_size_in_buf=57181
[mjpeg @ 0x69cc10] class=0 index=0 nb_codes=12
[mjpeg @ 0x69cc10] marker parser used 31 bytes (248 bits)
[mjpeg @ 0x69cc10] marker=c4 avail_size_in_buf=57148
[mjpeg @ 0x69cc10] class=1 index=0 nb_codes=251
[mjpeg @ 0x69cc10] marker parser used 181 bytes (1448 bits)
[mjpeg @ 0x69cc10] marker=c4 avail_size_in_buf=56965
[mjpeg @ 0x69cc10] class=0 index=1 nb_codes=12
[mjpeg @ 0x69cc10] marker parser used 31 bytes (248 bits)
[mjpeg @ 0x69cc10] marker=c4 avail_size_in_buf=56932
[mjpeg @ 0x69cc10] class=1 index=1 nb_codes=251
[mjpeg @ 0x69cc10] marker parser used 181 bytes (1448 bits)
[mjpeg @ 0x69cc10] escaping removed 228 bytes
[mjpeg @ 0x69cc10] marker=da avail_size_in_buf=56749
[mjpeg @ 0x69cc10] component: 0
[mjpeg @ 0x69cc10] component: 1
[mjpeg @ 0x69cc10] component: 2
[mjpeg @ 0x69cc10] marker parser used 56520 bytes (452159 bits)
[mjpeg @ 0x69cc10] marker=d9 avail_size_in_buf=0
[mjpeg @ 0x69cc10] decode frame unused 0 bytes
[video4linux2,v4l2 @ 0x6964e0] All info found
[video4linux2,v4l2 @ 0x6964e0] Estimating duration from bitrate, this
may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 44.040000, bitrate: N/A
    Stream #0:0, 21, 1/1000000: Video: mjpeg, yuvj422p, 640x480,
1/1000000, -2 kb/s, 15 fps, 100 tbr, 1
000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file http://localhost:8090/feed1.ffm.
Applying option vcodec (force video codec ('copy' to copy stream))
with argument copy.
Successfully parsed a group of options.
Opening an output file: http://localhost:8090/feed1.ffm.
handle_connection, 1005
handle_connection, 1029
Thu Mar 14 17:29:16 2013 malloc size=4
http_prepare_data, 2356, Set HTTPSTATE_SEND_DATA
[ffm @ 0x69d8f0] Format ffm probed with size=2048 and score=101
[AVIOContext @ 0x69dee0] Statistics: 4096 bytes read, 0 seeks
Thu Mar 14 17:29:16 2013 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175
handle_connection, 1005
http_parse_request, 1880, Set HTTPSTATE_RECEIVE_DATA
Successfully opened the file.
2121
2233,ost->st->avg_frame_rate=15
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
  Metadata:
    creation_time   : now
    encoder         : Lavf54.63.100
    Stream #0:0, 0, 1/1000000: Video: mjpeg, yuvj422p, 640x480,
1/1000000, q=2-31, -2 kb/s, 15 fps, 100
0k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
nb_input_files==1
handle_connection, 1005
handle_connection, 1029
Thu Mar 14 17:29:32 2013 malloc size=4
http_prepare_data, 2356, Set HTTPSTATE_SEND_DATA
Thu Mar 14 17:29:32 2013 Too large number of skipped frames 817969303626 > 60000
Thu Mar 14 17:29:32 2013 Error writing frame to output
Thu Mar 14 17:29:32 2013 Too large number of skipped frames 817969303662 > 60000
Thu Mar 14 17:29:32 2013 Error writing frame to output
Thu Mar 14 17:29:32 2013 Too large number of skipped frames 817969303704 > 60000
Thu Mar 14 17:29:32 2013 Error writing frame to output
Thu Mar 14 17:29:32 2013 Too large number of skipped frames 817969303746 > 60000
Thu Mar 14 17:29:32 2013 Error writing frame to output
Thu Mar 14 17:29:32 2013 Too large number of skipped frames 817969303782 > 60000
Thu Mar 14 17:29:32 2013 Error writing frame to output
====================================================


More information about the ffmpeg-user mailing list