[FIX] ZM 1.24.2 "Error, failed to query crop"

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
hexskrew
Posts: 1
Joined: Tue Jul 20, 2010 6:40 pm

Post by hexskrew »

Just wanted to ask... I inserted (and deleted?!) the code you gave. FYI I appriciate the fix but at least give clearer instructions on the code. I will compile and check to see if it worked. Here ya go for everyone else (if this is right)

add this code to line 911

Code: Select all

	    int crop_rc = vidioctl( vid_fd, VIDIOC_G_CROP, &crop );     
add this code to line 921

Code: Select all

            if ( verbose ) {
		if (crop_rc >= 0) {
                sprintf( output+strlen(output), "  Current: %d x %d\n", crop.c.width, crop.c.height );
on the second add, delete the matching code as needed. I tried to post just a range of code but this reply box keeps messing the code up.
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

willberg wrote: Start the ffmpeg streaming video server:

Code: Select all

ffserver
My result is:
  • root@atom:/etc# ffserver
    FFserver version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
    configuration: --extra-version=4:0.5.1-1ubuntu1 --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 Mar 4 2010 12:39:38, gcc: 4.4.3
    /etc/ffserver.conf:11: Incorrect keyword: '<Feed>'
    /etc/ffserver.conf:14: No corresponding <Feed> for </Feed>
    /etc/ffserver.conf:17: Incorrect keyword: '<Stream>'
    /etc/ffserver.conf:37: No corresponding <Stream> for </Stream>
    Incorrect config file - exiting.
I copied your config from the web page.
Ubuntu 10.04.

TIA,
clytle374
Posts: 8
Joined: Mon Sep 06, 2010 3:44 am

Post by clytle374 »

aruzsi wrote:
willberg wrote: Start the ffmpeg streaming video server:

Code: Select all

ffserver
My result is:
  • root@atom:/etc# ffserver
    FFserver version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
    configuration: --extra-version=4:0.5.1-1ubuntu1 --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 Mar 4 2010 12:39:38, gcc: 4.4.3
    /etc/ffserver.conf:11: Incorrect keyword: '<Feed>'
    /etc/ffserver.conf:14: No corresponding <Feed> for </Feed>
    /etc/ffserver.conf:17: Incorrect keyword: '<Stream>'
    /etc/ffserver.conf:37: No corresponding <Stream> for </Stream>
    Incorrect config file - exiting.
I copied your config from the web page.
Ubuntu 10.04.

TIA,
I get the same message here. I haven't had a thing work right yet :(
clytle374
Posts: 8
Joined: Mon Sep 06, 2010 3:44 am

Post by clytle374 »

Code: Select all

Port 8090
# bind to all IPs aliased or not
BindAddress 0.0.0.0
# max number of simultaneous clients
MaxClients 1000
# max bandwidth per-client (kb/s)
MaxBandwidth 10000
# Suppress that if you want to launch ffserver as a daemon.
# NoDaemon

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

# FLV output - good for streaming
<Stream>
# the source feed
Feed feed1.ffm
# the output stream format - FLV = FLash Video
Format flv
VideoCodec flv
# this must match the ffmpeg -r argument
VideoFrameRate 15
# generally leave this is a large number
VideoBufferSize 80000
# another quality tweak
VideoBitRate 200
# quality ranges - 1-31 (1 = best, 31 = worst)
VideoQMin 1
VideoQMax 5
VideoSize 352x288
# this sets how many seconds in past to start
PreRoll 0
# wecams don't have audio
Noaudio
</Stream> 

After looking at the documents, I made the above changes. Now it starts and ZM seems to accept it, but no video.. YET

Smells like headway.
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

clytle374 wrote: After looking at the documents, I made the above changes. Now it starts and ZM seems to accept it, but no video.. YET
Will it work?
I'm waiting for your solution ....

TIA,
clytle374
Posts: 8
Joined: Mon Sep 06, 2010 3:44 am

Post by clytle374 »

aruzsi wrote:
clytle374 wrote: After looking at the documents, I made the above changes. Now it starts and ZM seems to accept it, but no video.. YET
Will it work?
I'm waiting for your solution ....

TIA,
Well, ffserver starts.

Could you try? I have a mutant webcam that has always caused problems, so it might be the issue.

I get a stream at http://localhost:8090/test.flv and zm turns the source yellow, but I get no feed.
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

clytle374 wrote: Could you try? I have a mutant webcam that has always caused problems, so it might be the issue.
OK.
In a few days I'll test your config on my server.

TIA,
WonkoTheSane
Posts: 1
Joined: Tue Sep 14, 2010 10:20 am

Post by WonkoTheSane »

This worked for me using Ubuntu 10.10Beta (changes marked in red).

The <Feed> & <Stream> tags must contain a filename, and the Feed argument in the <Stream> section should contain the full pathname to the feed.
(The original Ubuntu Forums post shows these, but they don't show here unless you disable HTML for some reason)

Port 8090
# bind to all IPs aliased or not
BindAddress 0.0.0.0
# max number of simultaneous clients
MaxClients 1000
# max bandwidth per-client (kb/s)
MaxBandwidth 10000
# Suppress that if you want to launch ffserver as a daemon.
# NoDaemon

< Feed /tmp/feed1.ffm >
FileMaxSize 5M
</Feed>

# FLV output - good for streaming
<Stream cam.flv>
# the source feed
Feed /tmp/feed1.ffm
# the output stream format - FLV = FLash Video
Format flv
VideoCodec flv
# this must match the ffmpeg -r argument
VideoFrameRate 15
# generally leave this is a large number
VideoBufferSize 80000
# another quality tweak
VideoBitRate 200
# quality ranges - 1-31 (1 = best, 31 = worst)
VideoQMin 1
VideoQMax 5
VideoSize 352x288
# this sets how many seconds in past to start
PreRoll 0
# wecams don't have audio
Noaudio
</Stream>
prniii
Posts: 1
Joined: Sun Sep 19, 2010 8:10 pm

Updated diffs that will work with patch.

Post by prniii »

With the originally posted diffs, the first diff is reversed order. A corrected diff follows. To apply save it as zm_local_camera.diff in the src directory. Then in the src directory apply using patch.

patch -p0 < zm_local_camera.diff zm_local_camera.cpp

Code: Select all

911c911,912
<             if ( vidioctl( vid_fd, VIDIOC_G_CROP, &crop ) < 0 )
---
>           int crop_rc = vidioctl( vid_fd, VIDIOC_G_CROP, &crop );
>           if ((crop_rc  < 0 ) && (errno != EINVAL))
920,921c921,929
<             if ( verbose )
<                 sprintf( output+strlen(output), "  Current: %d x %d\n", crop.c.width, crop.c.height );
---
> 
>             if ( verbose ) {
>               if (crop_rc >= 0) {
>                   sprintf( output+strlen(output), "  Current: %d x %d\n", crop.c.width, crop.c.height );
>               }
>               else {
>                   sprintf( output+strlen(output), "  Current: Cropping is not supported\n");
>               }
>           }
--
prniii
aruzsi
Posts: 16
Joined: Sat Aug 21, 2010 4:11 pm
Location: Budapest

Post by aruzsi »

WonkoTheSane wrote:This worked for me using Ubuntu 10.10Beta (changes marked in red).

< Feed /tmp/feed1.ffm >
FileMaxSize 5M
</Feed>

# FLV output - good for streaming
<Stream cam.flv>
# the source feed
Feed /tmp/feed1.ffm
My Ubuntu is an up-to-date 10.04.

ffserver.conf:

<Feed feed1>
FileMaxSize 5M
</Feed>

# FLV output - good for streaming
<Stream cam.flv>
# the source feed
Feed feed1

Only in the above config starts ffserver and will be a feed1.ffm under /tmp.

So maybe it is working. (how can I check?)

The next problem is:

root@atom:/tmp# ffmpeg -r 15 -s 352x288 -f video4linux2 -i /dev/video0 http://localhost:8090/feed1.ffm
FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5.1-1ubuntu1 --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 --enable-shared --disable-static
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 Mar 4 2010 12:35:30, gcc: 4.4.3
[video4linux2 @ 0x81dc2c0][3]Capabilities: 5000001
[video4linux2 @ 0x81dc2c0]The V4L2 driver changed the video from 352x288 to 320x240
[video4linux2 @ 0x81dc2c0]Cannot find a proper format.
/dev/video0: I/O error occurred
Usually that means that input file is truncated and/or corrupted.

TIA,
Pilot824
Posts: 1
Joined: Sun Dec 26, 2010 1:40 am

Post by Pilot824 »

I've tried the ffserver method; however I get this response from my terminal:

Code: Select all

root@alampert-laptop:/home/alampert# ffserver
FFserver version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5.1-1ubuntu1 --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 Mar  4 2010 12:39:38, gcc: 4.4.3
/etc/ffserver.conf:11: Incorrect keyword: '<Feed>'
/etc/ffserver.conf:14: No corresponding <Feed> for </Feed>
/etc/ffserver.conf:17: Incorrect keyword: '<Stream>'
/etc/ffserver.conf:37: No corresponding <Stream> for </Stream>
Incorrect config file - exiting.
Any Idea's?
tommy
Posts: 45
Joined: Sun Aug 17, 2003 2:58 am

Post by tommy »

I'm using the latest svn of both ffmpeg and Zoneminder on PCLINUXOS. All the patches mentioned in this thread have been implemented.
I was having the same problem with my Creative PC-CAM300 usb camera as celsian reported in his post on Mar 09,2010 "Error, failed to query crop capabilities /dev/video0: Invalid argument"

Crop capabilities is the API call VIDIOC_CROPCAP as shown here using v4l2-ctl:

[zmuser@localhost patch]# v4l2-ctl -d /dev/video1 --get-cropcap
VIDIOC_CROPCAP: failed: Invalid argument

Following the lead provided by the previous patches I created this patch:

--- zm_local_camera.cpp 2010-12-10 19:34:49.000000000 -0800
+++ zm_local_camera.cpp.patched 2011-01-10 12:31:00.642134062 -0800
@@ -886,25 +886,39 @@
memset( &cropcap, 0, sizeof(cropcap) );
cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if ( vidioctl( vid_fd, VIDIOC_CROPCAP, &cropcap ) < 0 )
- {
- Error( "Failed to query crop capabilities: %s", strerror(errno) );
- if ( verbose )
- sprintf( output, "Error, failed to query crop capabilities %s: %s\n", queryDevice, strerror(errno) );
- else
- sprintf( output, "error%d\n", errno );
- return( false );
- }
- if ( verbose )
- {
- sprintf( output+strlen(output), "Crop Capabilities\n" );
- sprintf( output+strlen(output), " Bounds: %d x %d\n", cropcap.bounds.width, cropcap.bounds.height );
- sprintf( output+strlen(output), " Default: %d x %d\n", cropcap.defrect.width, cropcap.defrect.height );
- }
- else
- {
- sprintf( output+strlen(output), "B:%dx%d|", cropcap.bounds.width, cropcap.bounds.height );
- }
+
+ if (errno != EINVAL)
+
+ {
+ Error( "Failed to query crop capabilities: %s", strerror(errno) );
+ if ( verbose )
+ sprintf( output, "Error, failed to query crop capabilities %s: %s\n", queryDevice, strerror(errno) );
+ else
+ sprintf( output, "error%d\n", errno );
+ return( false );
+ }
+
+ else
+
+ {
+ Info ( "Does not support VIDIOC_CROPCAP");
+ }
+
+ else
+
+
+ if ( verbose )
+ {
+ sprintf( output+strlen(output), "Crop Capabilities\n" );
+ sprintf( output+strlen(output), " Bounds: %d x %d\n", cropcap.bounds.width, cropcap.bounds.height );
+ sprintf( output+strlen(output), " Default: %d x %d\n", cropcap.defrect.width, cropcap.defrect.height );
+ }
+ else
+ {
+ sprintf( output+strlen(output), "B:%dx%d|", cropcap.bounds.width, cropcap.bounds.height );
+ }

+
struct v4l2_crop crop;
memset( &crop, 0, sizeof(crop) );
crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;

The camera is now working and the probe function on the monitor set up page works.

The next problem I had is one I believe I have seen reported in the forum but was unable to find again.
As well as the usb camera, I have one BTTV card. When the machine is booted with the usb camera plugged in, the usb camera is registered as /dev/video0 and the BTTV card as /dev/video1.
If the usb camera is plugged in after boot, the BTTV card has already been registered as /dev/video0 and the usb camera becomes /dev/video1. This plays havoc with Zoneminder.

I created a file called 98-my_video_devices.rules in /etc/udev/rules.d.
Here's the contents:
KERNEL=="video*", ATTRS{idProduct}=="400a", ATTRS{idVendor}=="041e",NAME="video1",SYMLINK+="vidPCCAM300"
KERNEL=="video*", ATTRS{device}=="0x036e", ATTRS{vendor}=="0x109e", NAME="video0",SYMLINK+="vidBTTV1"

This tells udev to create node video1 in /dev for the PCCAM300 and video0 for the BTTV card.
This happens even if the usb camera is plugged in at boot time. It also creates a symlink in /dev for each device.
The attributes used in the above file were culled using the information from this site:
http://www.reactivated.net/writing_udev ... l#udevinfo

Zmu is ok with the symlinks:

/usr/local/bin/zmu --query --device=/dev/vidPCCAM300 -v
Video Device: /dev/vidPCCAM300
General Capabilities
Driver: spca500
Card: Creative PC-CAM 300
Bus: usb-0000:00:1d.0-2
Version: 2.8.0
Type: 0x5000001
Supports video capture (X)
Does not support video output
Does not support frame buffer overlay
Does not support VBI capture
Does not support VBI output
Does not support sliced VBI capture
Does not support sliced VBI output
Does not support video output overlay
Does not have tuner
Does not have audio in and/or out
Does not have radio
Supports read/write i/o (X)
Does not support async i/o
Supports streaming i/o (X)
Standards:
Formats:
JPEG (JPEG)
Inputs: 1
Input 0
Name: spca500
Type: Camera
Audioset: 00000000
Standards: 0x0
Power on (X)
Signal detected (X)
Colour Signal detected
Horizontal Lock detected

However Zoneminder proper will not accept the symlinks if they're entered into the monitor setup pages. I just continue to use the nodes, /dev/video0 and /dev/video1, as in the past.

So far, everything working OK through several boots.
sumeytek
Posts: 5
Joined: Thu Jan 13, 2011 10:46 am

Post by sumeytek »

good work ffserver
change /etc/ffserver.conf


Port 8090
#rt 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>

# 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>

# coming from live feed 'feed1'
Feed feed1.ffm

# 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 mpeg

# 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

# Suppress video
#NoVideo

#VideoQMin 3
#VideoQMax 31

# Set this to the number of seconds backwards in time to start. Note that
# most players will buffer 5-10 seconds of video, and also you need to allow
# for a keyframe to appear in the data stream.
#Preroll 15

# ACL:

# You can allow ranges of addresses (or single addresses)
#ACL ALLOW <first> <last>

# You can deny ranges of addresses (or single addresses)
#ACL DENY <first> <last>

# You can repeat the ACL allow/deny as often as you like. It is on a per
# stream basis. The first match defines the action. If there are no matches,
# then the default is the inverse of the last ACL statement.
#
# Thus 'ACL allow localhost' only allows access from localhost.
# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
# allow everybody else.

</Stream>


##################################################################
# Example streams


# Multipart JPEG
#<Stream>
#Feed feed1.ffm
#Format mpjpeg
#VideoFrameRate 2
#VideoIntraOnly
#NoAudio
#Strict -1
#</Stream>


# Single JPEG

#<Stream>
#Feed feed1.ffm
#Format jpeg
#VideoFrameRate 2
#VideoIntraOnly
##VideoSize 352x240
#NoAudio
#Strict -1
#</Stream>


# Flash

#<Stream>
#Feed feed1.ffm
#Format swf
#VideoFrameRate 2
#VideoIntraOnly
#NoAudio
#</Stream>


# ASF compatible

<Stream>
Feed feed1.ffm
Format asf
VideoFrameRate 15
VideoSize 352x240
VideoBitRate 256
VideoBufferSize 40
VideoGopSize 30
AudioBitRate 64
StartSendOnKey
</Stream>


# MP3 audio

#<Stream>
#Feed feed1.ffm
#Format mp2
#AudioCodec mp3
#AudioBitRate 64
#AudioChannels 1
#AudioSampleRate 44100
#NoVideo
#</Stream>


# Ogg Vorbis audio

#<Stream>
#Feed feed1.ffm
#Title "Stream title"
#AudioBitRate 64
#AudioChannels 2
#AudioSampleRate 44100
#NoVideo
#</Stream>


# Real with audio only at 32 kbits

#<Stream>
#Feed feed1.ffm
#Format rm
#AudioBitRate 32
#NoVideo
#NoAudio
#</Stream>


# Real with audio and video at 64 kbits

#<Stream>
#Feed feed1.ffm
#Format rm
#AudioBitRate 32
#VideoBitRate 128
#VideoFrameRate 25
#VideoGopSize 25
#NoAudio
#</Stream>


##################################################################
# A stream coming from a file: you only need to set the input
# filename and optionally a new format. Supported conversions:
# AVI -> ASF

#<Stream>
#File "/usr/local/httpd/htdocs/tlive.rm"
#NoAudio
#</Stream>

#<Stream>
#File "/usr/local/httpd/htdocs/test.asf"
#NoAudio
#Author "Me"
#Copyright "Super MegaCorp"
#Title "Test stream from disk"
#Comment "Test comment"
#</Stream>


##################################################################
# RTSP examples
#
# You can access this stream with the RTSP URL:
# rtsp://localhost:5454/test1-rtsp.mpg
#
# A non-standard RTSP redirector is also created. Its URL is:
# http://localhost:8090/test1-rtsp.rtsp

#<Stream>
#Format rtp
#File "/usr/local/httpd/htdocs/test1.mpg"
#</Stream>


##################################################################
# SDP/multicast examples
#
# If you want to send your stream in multicast, you must set the
# multicast address with MulticastAddress. The port and the TTL can
# also be set.
#
# An SDP file is automatically generated by ffserver by adding the
# 'sdp' extension to the stream name (here
# http://localhost:8090/test1-sdp.sdp). You should usually give this
# file to your player to play the stream.
#
# The 'NoLoop' option can be used to avoid looping when the stream is
# terminated.

#<Stream>
#Format rtp
#File "/usr/local/httpd/htdocs/test1.mpg"
#MulticastAddress 224.124.0.1
#MulticastPort 5000
#MulticastTTL 16
#NoLoop
#</Stream>


##################################################################
# Special streams

# Server status

<Stream>
Format status

# Only allow local people to get the status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
</Stream>


# Redirect index.html to the appropriate site

<Redirect>
URL http://www.ffmpeg.org/
</Redirect>
Post Reply