Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


This forum has not been maintained for a long time and will probably get deleted in the near future.
For faster responses to your questions, please use StackOverflow instead and tag your questions with "FFmpeg".
If you need a backup of the posts from this forum, please contact me directly.

ffserver to sream a video from webcam

Discussions about problems encountered using ffserver.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

ffserver to sream a video from webcam

Postby xav12358 » Thu Feb 02, 2017 9:42 am

Hello,
I am new on that forum so hello everybody.

I try to use ffmeg to stream video from my computer to my smartphone. So I I use ffserver to send images from my webcam first and then I would like to use OpenCV to send a processed image. But First I have trouble with the ffmeg server. I think I do somethink wrong.

I use that ffserver.conf file:
Code: Select all
# 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 1000

# 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

I use my webcam as input video0:

Code: Select all
ffmpeg -f v4l2 -s 320x240 -r 25 -i /dev/video0 -c:a -f alsa -ac 0 -i  http://localhost:8090/feed1.ffm


And there are that error:
Code: Select all
    [video4linux2,v4l2 @ 0x2648160] Dequeued v4l2 buffer contains corrupted data (0 bytes).
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 0.000000, bitrate: 30720 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 30720 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
[wmav2 @ 0x264ef20] block_align is not set


Is there a problem in the configuration file?
xav12358
 
Posts: 2
Joined: Thu Feb 02, 2017 9:37 am

Return to ffserver

Who is online

Users browsing this forum: No registered users and 6 guests