Opened 11 years ago

Closed 11 years ago

#3372 closed defect (invalid)

Streaming in webm format gets stuck in the WAIT_FEED state

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

Description

Summary of the bug:
How to reproduce:

$ cat ffserver.conf 
Port 8090
BindAddress 0.0.0.0 
MaxClients 4
MaxBandwidth 50000 
NoDaemon 

<Feed webcam.ffm> 
  File /tmp/webcam.ffm 
  FileMaxSize 5M
</Feed> 

#<Stream webcam.mjpeg>
#  Feed webcam.ffm
#  Format mjpeg
#  VideoSize 640x480
#  VideoFrameRate 25
#  VideoBitRate 500
#  VideoIntraOnly
#  Noaudio
#  Strict -1
#</Stream>

<Stream webcam.webm>
  Feed webcam.ffm
  Format webm
  VideoCodec libvpx
  VideoSize 640x480
  VideoFrameRate 25
  VideoBitRate 512
  VideoIntraOnly
  AVOptionVideo flags +global_header
  AVOptionAudio flags +global_header
  AVOptionVideo cpu-used 5
  PreRoll 15
  StartSendOnKey
  Noaudio
  Strict -1
</Stream>

<Stream status.html>            # Server status URL
  Format status
  # Only allow local people to get the status
  ACL allow localhost
  ACL allow 192.168.0.0 192.168.255.255
</Stream>

$ ffserver -v verbose -f ~/ffserver.conf
avserver version 0.8.9-6:0.8.9-0ubuntu0.13.04.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:09:48 with gcc 4.7.3
  configuration: --arch=amd64 --enable-pthreads --enable-runtime-cpudetect --extra-version='6:0.8.9-0ubuntu0.13.04.1' --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-gnutls --enable-libgsm --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-swscale --enable-libcdio --enable-x11grab --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
  libavutil    51. 22. 1 / 51. 22. 1
  libavcodec   53. 35. 0 / 53. 35. 0
  libavformat  53. 21. 1 / 53. 21. 1
  libavdevice  53.  2. 0 / 53.  2. 0
  libavfilter   2. 15. 0 /  2. 15. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  52.  0. 0 / 52.  0. 0

$ avconv -f video4linux2 -i /dev/video0 -vcodec libvpx -b 512k -deadline realtime -flags +global_header -cpu-used 6 http://192.168.1.2:8090/webcam.ffm
avconv version 0.8.9-6:0.8.9-0ubuntu0.13.04.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:09:48 with gcc 4.7.3
[video4linux2 @ 0x24c5a00] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2, from '/dev/video0':
  Duration: N/A, start: 7513392.829316, bitrate: 147456 kb/s
    Stream #0.0: Video: rawvideo, yuyv422, 640x480, 147456 kb/s, 30 tbr, 1000k tbn, 30 tbc
Incompatible pixel format 'yuyv422' for codec 'libvpx', auto-selecting format 'yuv420p'
[buffer @ 0x24c7780] w:640 h:480 pixfmt:yuyv422
[avsink @ 0x24c80a0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x24cbda0] w:640 h:480 fmt:yuyv422 -> w:640 h:480 fmt:yuv420p flags:0x4
[libvpx @ 0x24c6a40] v1.1.0
Output #0, ffm, to 'http://192.168.1.2:8090/webcam.ffm':
  Metadata:
    encoder         : Lavf53.21.1
    Stream #0.0: Video: libvpx, yuv420p, 640x480, q=-1--1, 512 kb/s, 1000k tbn, 30 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> libvpx)
Press ctrl-c to stop encoding
frame= 2437 fps= 30 q=0.0 size=    5296kB time=81.23 bitrate= 534.1kbits/s dup=30 drop=0    

$ ffplay http://192.168.1.2:8090/webcam.webm
avplay version 0.8.9-6:0.8.9-0ubuntu0.13.04.1, Copyright (c) 2003-2013 the Libav developers
  built on Nov  9 2013 19:09:48 with gcc 4.7.3

-> status.html:

Connection Status

Number of connections: 3 / 4
Bandwidth in use: 512k / 50000k
#	File	IP	Proto	State	Target bits/sec	Actual bits/sec	Bytes transferred
1	status.html	192.168.1.42	HTTP/1.1	HTTP_WAIT_REQUEST	0	0	0
2	webcam.webm	192.168.1.2	HTTP/1.1	WAIT_FEED	512k	0	494
3	webcam.ffm(input)	192.168.1.2	HTTP/1.1	RECEIVE_DATA	512k	545k	2121k

If I use ffmpeg to write into a file, the file is readable in VLC; if I change format to mjpeg, the stream is readable through ffserver; so I think there is an issue with ffserver/webm.

Change History (1)

in reply to:  description comment:1 by llogan, 11 years ago

Component: ffserverundetermined
Resolution: invalid
Status: newclosed

Replying to alexpirine:

$ ffserver -v verbose -f ~/ffserver.conf
avserver version 0.8.9-6:0.8.9-0ubuntu0.13.04.1, Copyright (c) 2000-2013 the Libav developers

Please understand that we do not support third-party products here. You're using something from a fork that purposely copied the names of the FFmpeg tools and libraries. See: http://blog.pkh.me/p/13-the-ffmpeg-libav-situation.html

Feel free to re-open this ticket if you can reproduce this issue with the real tools from FFmpeg. See http://trac.ffmpeg.org/wiki/UbuntuCompilationGuide if you need help compiling.

Note: See TracTickets for help on using tickets.