streaming with ffserver

5,567 views
Skip to first unread message

Amar

unread,
Jul 9, 2010, 10:36:26 AM7/9/10
to WebM Discussion
I tried streaming webm video file with ffserver
my config file is:.

Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 10000
CustomLog -
NoDaemon
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 5M
</Feed>
<Stream test.mpeg>
Feed feed1.ffm
Format mpeg
AudioBitRate 32
AudioChannels 2
AudioSampleRate 44100
#VideoCodec libvpx
VideoBitRate 366
VideoBufferSize 40
VideoFrameRate 24
VideoSize 320x240
VideoGopSize 12
</Stream>

I feed video as
ffmpeg -i cartoon.mpeg http://localhost:8090/feed1.ffm

and played as
ffplay http://192.168.1.159:8090/test.mpeg



I got following error....

at ffserver
Codec for stream 0 does not use global headers but container format
requires global headers
Codec for stream 1 does not use global headers but container format
requires global headers
Extradata corrupt.
Error writing output header

at player
FFplay version SVN-r24084, Copyright (c) 2003-2010 the FFmpeg
developers
built on Jul 7 2010 23:50:53 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --
enable-postproc --enable-pthreads --enable-libmp3lame --enable-
libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --
enable-libx264 --enable-libxvid --enable-x11grab --enable-libvpx
libavutil 50.20. 0 / 50.20. 0
libavcodec 52.79. 1 / 52.79. 1
libavformat 52.73. 0 / 52.73. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.20. 1 / 1.20. 1
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
http://192.168.1.159:8090/test.webm: Invalid data found when
processing input


what can be the possible errror.
I can play webm viseo well using ffplay

nandan amar

unread,
Jul 9, 2010, 12:15:39 PM7/9/10
to WebM Discussion
On 9 July 2010 20:06, Amar <nanda...@gmail.com> wrote:
I tried streaming webm video file with ffserver
my config file is:.

Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 10000
CustomLog -
NoDaemon
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 5M
</Feed>
<Stream test.mpeg>
here Stream is test.webm
Feed feed1.ffm
Format mpeg
here  Format is webm

--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To post to this group, send email to webm-d...@webmproject.org.
To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.




--
Amar Kumar Nandan
 
http://aknandan.co.nr

James Zern

unread,
Jul 9, 2010, 4:32:49 PM7/9/10
to webm-d...@webmproject.org

This may be better directed at ffserver-user [1].

[1]: https://lists.mplayerhq.hu/mailman/listinfo/ffserver-user/

nandan amar

unread,
Jul 10, 2010, 4:20:17 AM7/10/10
to webm-d...@webmproject.org
Thanks Jamnes,
But I was able to do every thing correct with other video format .
where i got stuck is with .webm video.

Anyway I have posted the same message there also.


--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To post to this group, send email to webm-d...@webmproject.org.
To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.




--
Amar Kumar Nandan
MS by Research
IIIT-Bangalore
Karnataka ,India , 560100
http://aknandan.co.nr

Lou Quillio

unread,
Jun 26, 2012, 1:28:59 PM6/26/12
to webm-d...@webmproject.org
On Tue, Jun 26, 2012 at 7:54 AM, <flavioc...@gmail.com> wrote:
>
> I'm having the same problem.
> I start ffserver passing the ffserver.conf you can read above and it
> displays me this welcome message:

Again, this is best directed to ffserver-user:

https://lists.mplayerhq.hu/mailman/listinfo/ffserver-user/
http://ffmpeg.org/pipermail/ffserver-user/

LQ


--
Lou Quillio
Webmaster
WebMProject.org

> FFserver version SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.1, Copyright (c)
> 2000-2009 Fabrice Bellard, et al.
>   configuration: --extra-version=4:0.5.9-0ubuntu0.10.04.1 --prefix=/usr
> --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib
> --enable-libgsm --enable-libschroedinger --enable-libspeex
> --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib
> --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl
> --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394
> --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static
> --disable-ffmpeg --disable-ffplay
>   libavutil     49.15. 0 / 49.15. 0
>   libavcodec    52.20. 1 / 52.20. 1
>   libavformat   52.31. 0 / 52.31. 0
>   libavdevice   52. 1. 0 / 52. 1. 0
>   libavfilter    0. 4. 0 /  0. 4. 0
>   libswscale     0. 7. 1 /  0. 7. 1
>   libpostproc   51. 2. 0 / 51. 2. 0
>   built on Jun 12 2012 16:28:36, gcc: 4.4.3
> Tue Jun 26 16:51:05 2012 FFserver started.
>
> In ffserver status page i read this:
> PathServed
> Conns
> bytesFormatBit rate
> kbits/sVideo
> kbits/s
> CodecAudio
> kbits/s
> CodecFeed
> flavio.mp400avi00libx2640/var/www/flavio.mp4
>
>
> When I try to open file using browser i get this message in the shell:
> Tue Jun 26 16:53:36 2012 Error writing output header
> Tue Jun 26 16:53:36 2012 192.168.1.122 - - [GET] "/flavio.mp4 HTTP/1.0"
> 200 68
>
> Could anyone help me?
>
> Thanks!
>
> My ffserver.conf file is the following:
>
>>>
>>> # 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.
>>>
>>> BindAddress 0.0.0.0
>>>
>>>
>>> # 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 2000
>>>
>>>
>>> # 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 1000
>>>
>>>
>>> # This the maximum amount of kbit/sec that you are prepared to
>>>
>>> # consume when streaming to clients.
>>>
>>> MaxBandwidth 100000
>>>
>>>
>>> # 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.
>>>
>>> NoDaemon
>>>
>>>
>>>
>>> ##################################################################
>>>
>>> # Definition of the live feeds. Each live feed contains one video
>>>
>>> # and/or audio sequence coming from an ffmpeg encoder or another
>>>
>>> # ffserver. This sequence may be encoded simultaneously with several
>>>
>>> # codecs at several resolutions.
>>>
>>>
>>> #<Feed feed1.ffm>
>>>
>>>
>>> # You must use 'ffmpeg' to send a live feed to ffserver. In this
>>>
>>> # example, you can type:
>>>
>>> #
>>>
>>> # ffmpeg http://localhost:8090/feed1.ffm
>>>
>>>
>>> # ffserver can also do time shifting. It means that it can stream any
>>>
>>> # previously recorded live stream. The request should contain:
>>>
>>> # "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
>>>
>>> # a path where the feed is stored on disk. You also specify the
>>>
>>> # maximum size of the feed, where zero means unlimited. Default:
>>>
>>> # File=/tmp/feed_name.ffm FileMaxSize=5M
>>>
>>> #File /tmp/feed1.ffm
>>>
>>> #FileMaxSize 200K
>>>
>>>
>>> # You could specify
>>>
>>> # ReadOnlyFile /saved/specialvideo.ffm
>>>
>>> # This marks the file as readonly and it will not be deleted or updated.
>>>
>>>
>>> # Specify launch in order to start ffmpeg automatically.
>>>
>>> # First ffmpeg must be defined with an appropriate path if needed,
>>>
>>> # after that options can follow, but avoid adding the http:// field
>>>
>>> #Launch ffmpeg
>>>
>>>
>>> # Only allow connections from localhost to the feed.
>>>
>>> #ACL allow 127.0.0.1
>>>
>>>
>>> #</Feed>
>>>
>>>
>>>
>>> ##################################################################
>>>
>>> # Now you can define each stream which will be generated from the
>>>
>>> # original audio and video stream. Each format has a filename (here
>>>
>>> # 'test1.mpg'). FFServer will send this stream when answering a
>>>
>>> # request containing this filename.
>>>
>>>
>>> <Stream flavio.mp4>
>>>
>>>
>>> # coming from live feed 'feed1'
>>>
>>> #Feed feed1.ffm
>>>
>>> File "/var/www/flavio.mp4"
>>>
>>>
>>> # Format of the stream : you can choose among:
>>>
>>> # mpeg       : MPEG-1 multiplexed video and audio
>>>
>>> # mpegvideo  : only MPEG-1 video
>>>
>>> # mp2        : MPEG-2 audio (use AudioCodec to select layer 2 and 3
>>> codec)
>>>
>>> # ogg        : Ogg format (Vorbis audio codec)
>>>
>>> # rm         : RealNetworks-compatible stream. Multiplexed audio and
>>> video.
>>>
>>> # ra         : RealNetworks-compatible stream. Audio only.
>>>
>>> # mpjpeg     : Multipart JPEG (works with Netscape without any plugin)
>>>
>>> # jpeg       : Generate a single JPEG image.
>>>
>>> # asf        : ASF compatible streaming (Windows Media Player format).
>>>
>>> # swf        : Macromedia Flash compatible stream
>>>
>>> # avi        : AVI format (MPEG-4 video, MPEG audio sound)
>>>
>>> Format avi
>>>
>>>
>>> # Bitrate for the audio stream. Codecs usually support only a few
>>>
>>> # different bitrates.
>>>
>>> AudioBitRate 32
>>>
>>>
>>> # Number of audio channels: 1 = mono, 2 = stereo
>>>
>>> AudioChannels 1
>>>
>>>
>>> # Sampling frequency for audio. When using low bitrates, you should
>>>
>>> # lower this frequency to 22050 or 11025. The supported frequencies
>>>
>>> # depend on the selected audio codec.
>>>
>>> AudioSampleRate 44100
>>>
>>>
>>> # Bitrate for the video stream
>>>
>>> VideoBitRate 64
>>>
>>>
>>> # Ratecontrol buffer size
>>>
>>> VideoBufferSize 40
>>>
>>>
>>> # Number of frames per second
>>>
>>> VideoFrameRate 3
>>>
>>>
>>> # Size of the video frame: WxH (default: 160x128)
>>>
>>> # The following abbreviations are defined: sqcif, qcif, cif, 4cif,
>>> qqvga,
>>>
>>> # qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga,
>>> wsxga,
>>>
>>> # wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720,
>>>
>>> # hd1080
>>>
>>> VideoSize 160x128
>>>
>>>
>>> # Transmit only intra frames (useful for low bitrates, but kills frame
>>> rate).
>>>
>>> #VideoIntraOnly
>>>
>>>
>>> # If non-intra only, an intra frame is transmitted every VideoGopSize
>>>
>>> # frames. Video synchronization can only begin at an intra frame.
>>>
>>> VideoGopSize 12
>>>
>>>
>>> # More MPEG-4 parameters
>>>
>>> # VideoHighQuality
>>>
>>> # Video4MotionVector
>>>
>>>
>>> # Choose your codecs:
>>>
>>> #AudioCodec mp2
>>>
>>> #VideoCodec mpeg1video
>>>
>>>
>>> # Suppress audio
>>>
>>> #NoAudio
>
> --
> You received this message because you are subscribed to the Google Groups
> "WebM Discussion" group.
> To view this discussion on the web visit
> https://groups.google.com/a/webmproject.org/d/msg/webm-discuss/-/PGv-qD9QD5QJ.

nandan amar

unread,
Mar 18, 2013, 9:58:50 PM3/18/13
to WebM Discussion
Congrats !

On Tue, Mar 19, 2013 at 5:59 AM, <coryge...@gmail.com> wrote:
> I know this is a bit old, but I got this working for 320x240 live streams by
> first following: http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
>
> My working 320x240 config can be found at:
> http://superuser.com/questions/567656/ffserver-configuration-to-handle-a-large-webm-stream
> --
> You received this message because you are subscribed to the Google Groups
> "WebM Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to webm-discuss...@webmproject.org.
>
> To post to this group, send email to webm-d...@webmproject.org.
> Visit this group at
> http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.
> For more options, visit
> https://groups.google.com/a/webmproject.org/groups/opt_out.
>
>



--

Amar Kumar Nandan
Bangalore, India,
☎:+91-9019054471
✉:nanda...@gmail.com
http://aknandan.co.nr
Reply all
Reply to author
Forward
0 new messages