[FFmpeg-user] ffserver parse ffm header got wrong size and stream index, then no any video data output

Soho Soho123 soho123.2012 at gmail.com
Tue May 28 15:08:05 CEST 2013


Hi All,

Does anyone have any idea about this issue?
I got this problem for a long time.
I can not get any progress by myself. Need your help !!!
Thanks!


2013/5/24 Soho Soho123 <soho123.2012 at gmail.com>

> Hi Carl,
>
> the issue is the same as :http://roundup.libav.org/issue855
>
> ffserver hangs when feeding it via http
> Do you have any idea?
>
>
>
>
> ==================================================
>
> hi All,
>
> I got the error when I using vlc to connect ffserver to get video stream,
> the video data is from usb webcam.
> video stream will stop when the error is occur
>
> the ffserver conf:
> <Stream test.mjpeg>
> Feed feed1.ffm
> Format mjpeg
> VideoSize 640x480
> VideoFrameRate 30
> VideoCodec mjpeg
> Noaudio
> </Stream>
> ffserver command :
> ffserver -f /etc/ffserver.conf &
> ffmpeg command:
> ffmpeg  -f video4linux2 -r 30 -s 640x480 -input_format mjpeg -i
> /dev/video0 -vcodec copy http://localhost:8090/feed1.ffm
>
> the output log:
> ====================================================
> ffserver version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
>   built on May  7 2013 13:35:34 with gcc 4.4.5-1.5.5p4 (GCC)
>   configuration: --enable-cross-compile --cross-prefix=sdk-linux-
> --arch=mips --target-os=linux --disable
> -doc --disable-htmlpages --disable-manpages --disable-podpages
> --disable-txtpages --disable-mips32r2 --dis
> able-ffplay --disable-postproc --disable-runtime-cpudetect
> --disable-swscale-alpha --disable-mipsdspr1 --d
> isable-mipsdspr2 --disable-mipsfpu --enable-small --prefix=/ffmpeg/romfs
> --bindir=/ffmpeg/romfs --disable-bsfs --disable-filters --enable-gpl
> --enable-libx264 --extra-c
> flags=-I/users/stream_server/ShareLib_Install/bin/../include
> --extra-libs='-L/users/stream_server/Shar
> eLib_Install/bin/../lib -lx264'
> --enable-filter='aformat,aresample,copy,format,fps,framestep,resample' --d
> isable-encoders --enable-encoder='mjpeg,h264,libx264,libx264rgb,yuv4'
> libavutil      52. 18.100 / 52. 18.
> 100
>   libavcodec     54. 92.100 / 54. 92.100
>   libavformat    54. 63.104 / 54. 63.104
>   libavdevice    54.  3.103 / 54.  3.103
>   libavfilter     3. 42.103 /  3. 42.103
>   libswscale      2.  2.100 /  2.  2.100
>   libswresample   0. 17.102 /  0. 17.102
> Wed May  8 11:17:50 2013 FFserver started.
> ffmpeg  -f video4linux2 -r 30 -s 640x480 -input_format mjpeg -i
> /dev/video0 -v
> codec copy http://localhost:8090/feed1.ffm
> ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
>   built on May  7 2013 13:35:34 with gcc 4.4.5-1.5.5p4 (GCC)
>   configuration: --enable-cross-compile --cross-prefix=sdk-linux-
> --arch=mips --target-os=linux --disable
> -doc --disable-htmlpages --disable-manpages --disable-podpages
> --disable-txtpages --disable-mips32r2 --dis
> able-ffplay --disable-postproc --disable-runtime-cpudetect
> --disable-swscale-alpha --disable-mipsdspr1 --d
> isable-mipsdspr2 --disable-mipsfpu --enable-small --prefix=/ffmpeg/romfs
> --bindir=/users/stream_server/ffmpeg/romfs --disable-bsfs --disable-filters
> --enable-gpl --enable-libx264 --extra-c
> flags=-I/users/stream_server/ShareLib_Install/bin/../include
> --extra-libs='-L/users/stream_server/Shar
> eLib_Install/bin/../lib -lx264'
> --enable-filter='aformat,aresample,copy,format,fps,framestep,resample' --d
> isable-encoders --enable-encoder='mjpeg,h264,libx264,libx264rgb,yuv4'
> libavutil      52. 18.100 / 52. 18.
> 100
>   libavcodec     54. 92.100 / 54. 92.100
>   libavformat    54. 63.104 / 54. 63.104
>   libavdevice    54.  3.103 / 54.  3.103
>   libavfilter     3. 42.103 /  3. 42.103
>   libswscale      2.  2.100 /  2.  2.100
>   libswresample   0. 17.102 /  0. 17.102
> [video4linux2,v4l2 @ 0x68d650] Estimating duration from bitrate, this may
> be inaccurate
> Input #0, video4linux2,v4l2, from '/dev/video0':
>   Duration: N/A, start: 38.490000, bitrate: N/A
>     Stream #0:0: Video: mjpeg, yuvj422p, 640x480, -5 kb/s, 30 fps, 30 tbr,
> 1000k tbn, 1000k tbc
> Wed May  8 11:18:06 2013 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200
> 4175
> Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
>   Metadata:
>     creation_time   : now
>     encoder         : Lavf54.63.104
>     Stream #0:0: Video: mjpeg, yuvj422p, 640x480, q=2-31, -5 kb/s, 30 fps,
> 1000k tbn, 1000k tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (copy)
> Press [q] to stop, [?] for help
> frame=   18 fps=0.0 q=-1.0 size=    1076kB time=00:00:00.80
> bitrate=11018.2kbits/s
> frame=   34 fps= 33 q=-1.0 size=    2244kB time=00:00:01.34
> bitrate=13718.5kbits/s    frame=   49 fps= 32 q=-1.0 size=    3336kB
> time=00:00:01.84 bitrate=14852.4kbits/s    frame=   64 fps= 32 q=-1.0
> size=    4376kB time=00:00:02.34 bitrate=15319.7kbits/s    frame=   79 fps=
> 31 q=-1.0 size=    5468kB time=00:00:02.84 bitrate=15772.5kbits/s
> frame=   94 fps= 31 q=-1.0 size=    6624kB time=00:00:03.34
> bitrate=16246.6kbits/s    frame=  109 fps= 31 q=-1.0 size=    7788kB
> time=00:00:03.84 bitrate=16614.4kbits/s    frame=  124 fps= 31 q=-1.0
> size=    8960kB time=00:00:04.34 bitrate=16912.5kbits/s    frame=  139 fps=
> 31 q=-1.0 size=   10128kB time=00:00:04.84 bitrate=17142.3kbits/s
> frame=  154 fps= 31 q=-1.0 size=   11296kB time=00:00:05.34
> bitrate=17329.0kbits/s    frame=  168 fps= 30 q=-1.0 size=   12384kB
> time=00:00:05.81 bitrate=17461.2kbits/s    frame=  183 fps= 30 q=-1.0
> size=   13544kB time=00:00:06.31 bitrate=17583.6kbits/s    frame=  198 fps=
> 30 q=-1.0 size=   14704kB time=00:00:06.81 bitrate=17688.0kbits/s
> frame=  213 fps= 30 q=-1.0 size=   15860kB time=00:00:07.31
> bitrate=17773.6kbits/s    frame=  228 fps= 30 q=-1.0 size=   17020kB
> time=00:00:07.81 bitrate=17852.5kbits/s    frame=  243 fps= 30 q=-1.0
> size=   18180kB time=00:00:08.31 bitrate=17921.8kbits/s    frame=  258 fps=
> 30 q=-1.0 size=   19340kB time=00:00:08.81 bitrate=17983.3kbits/s
> frame=  273 fps= 30 q=-1.0 size=   20500kB time=00:00:09.31
> bitrate=18038.2kbits/s    frame=  288 fps= 30 q=-1.0 size=   21656kB
> time=00:00:09.81 bitrate=18084.2kbits/s    frame=  303 fps= 30 q=-1.0
> size=   22816kB time=00:00:10.31 bitrate=18128.9kbits/s    frame=  318 fps=
> 30 q=-1.0 size=   23972kB time=00:00:10.81 bitrate=18166.4kbits/s    Wed
> May  8 11:18:17 2013 [ffm @ 0x663a20]invalid stream index 90
> frame=  333 fps= 30 q=-1.0 size=   25132kB time=00:00:11.31
> bitrate=18203.5kbits/s    Wed May  8 11:18:18 2013 [ffm @ 0x663a20]invalid
> stream index 120
> frame=  348 fps= 30 q=-1.0 size=   26288kB time=00:00:11.81
> bitrate=18234.7kbits/s    frame=  363 fps= 30 q=-1.0 size=   27448kB
> time=00:00:12.31 bitrate=18266.0kbits/s    frame=  378 fps= 30 q=-1.0
> size=   28604kB time=00:00:12.82 bitrate=18278.0kbits/s    frame=  393 fps=
> 30 q=-1.0 size=   29768kB time=00:00:13.32 bitrate=18307.8kbits/s
> frame=  408 fps= 30 q=-1.0 size=   30936kB time=00:00:13.82
> bitrate=18337.7kbits/s    frame=  423 fps= 30 q=-1.0 size=   32108kB
> time=00:00:14.32 bitrate=18367.9kbits/s    frame=  438 fps= 30 q=-1.0
> size=   33276kB time=00:00:14.82 bitrate=18393.9kbits/s    frame=  453 fps=
> 30 q=-1.0 size=   34444kB time=00:00:15.32 bitrate=18418.1kbits/s
> frame=  468 fps= 30 q=-1.0 size=   35612kB time=00:00:15.82
> bitrate=18440.8kbits/s    frame=  483 fps= 30 q=-1.0 size=   36780kB
> time=00:00:16.32 bitrate=18462.1kbits/s    frame=  498 fps= 30 q=-1.0
> size=   37948kB time=00:00:16.82 bitrate=18482.2kbits/s    frame=  513 fps=
> 30 q=-1.0 size=   39116kB time=00:00:17.32 bitrate=18501.1kbits/s
> frame=  528 fps= 30 q=-1.0 size=   40284kB time=00:00:17.82
> bitrate=18518.9kbits/s    frame=  543 fps= 30 q=-1.0 size=   41448kB
> time=00:00:18.32 bitrate=18534.0kbits/s    frame=  558 fps= 30 q=-1.0
> size=   42612kB time=00:00:18.82 bitrate=18548.2kbits/s    frame=  573 fps=
> 30 q=-1.0 size=   43780kB time=00:00:19.32 bitrate=18563.4kbits/s    Wed
> May  8 11:18:25 2013 192.168.1.100 - - [GET] "/test.mjpeg HTTP/1.1" 200
> 1499094
> frame=  588 fps= 30 q=-1.0 size=   44944kB time=00:00:19.82
> bitrate=18576.2kbits/s    frame=  603 fps= 30 q=-1.0 size=   46108kB
> time=00:00:20.32 bitrate=18588.4kbits/s    frame=  618 fps= 30 q=-1.0
> size=   47272kB time=00:00:20.82 bitrate=18600.0kbits/s    frame=  633 fps=
> 30 q=-1.0 size=   48436kB time=00:00:21.32 bitrate=18611.1kbits/s
> frame=  648 fps= 30 q=-1.0 size=   49604kB time=00:00:21.82
> bitrate=18623.1kbits/s    frame=  663 fps= 30 q=-1.0 size=   50760kB
> time=00:00:22.32 bitrate=18630.2kbits/s    frame=  678 fps= 30 q=-1.0
> size=   51896kB time=00:00:22.82 bitrate=18629.8kbits/s    frame=  693 fps=
> 30 q=-1.0 size=   53024kB time=00:00:23.32 bitrate=18626.6kbits/s
> frame=  708 fps= 30 q=-1.0 size=   54144kB time=00:00:23.82
> bitrate=18620.8kbits/s    frame=  723 fps= 30 q=-1.0 size=   55264kB
> time=00:00:24.32 bitrate=18615.2kbits/s    frame=  738 fps= 30 q=-1.0
> size=   56388kB time=00:00:24.82 bitrate=18611.2kbits/s    frame=  753 fps=
> 30 q=-1.0 size=   57508kB time=00:00:25.32 bitrate=18606.1kbits/s
> frame=  768 fps= 30 q=-1.0 size=   58628kB time=00:00:25.82
> bitrate=18601.1kbits/s    frame=  783 fps= 30 q=-1.0 size=   59748kB
> time=00:00:26.32 bitrate=18596.3kbits/s    frame=  798 fps= 30 q=-1.0
> size=   60876kB time=00:00:26.82 bitrate=18594.2kbits/s    frame=  808 fps=
> 30 q=-1.0 Lsize=   61628kB time=00:00:27.16 bitrate=18588.2kbits/s
> video:61400kB audio:0kB subtitle:0 global headers:0kB muxing overhead
> 0.371715%
> Wed May  8 11:18:33 2013 127.0.0.1 - - [POST] "/feed1.ffm HTTP/1.1" 200
> 63107072
> Received signal 2: terminating.
> #
> ==================================================
>
> ffmpeg seems keep running,
> but no any video data output by ffserver,
> the "invalid stream index" is print out from
> /libavformat/fmdec.c, function ffm_read_packet(),
> and I also get the error,
> function ffm_read_packet(),
> case READ_DATA:
>  size = AV_RB24(ffm->header + 2);
> the value of size is very very large, then ffm_is_avail_data() will return
> EAGAIN,
> such that there is no any video data can be output.
> Does anyone have idea?
> Any input is very appreciated!
>
>
> Best Regards,
> Soho
>
>


More information about the ffmpeg-user mailing list