User Tools

Site Tools


informatica:linux:ffserver

This is an old revision of the document!


ffserver ffmpeg rstp server servidor

ffserver es parte del paquete ffmpeg. En esta receta vamos a configurarlo para servir un archivo multimedia (un video) a través del protocolo rstp.

1. Instalar el paquete ffmpeg

aptitude update && aptitude install ffmpeg

2. Mover el archivo de configuración original por si las moscas:

mv /etc/ffserver.conf /etc/ffserver.original

3. Crear un archivo nuevo:

nano /etc/ffserver.conf

Con el siguiente contenido:

# 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

# Anyadido
RTSPPort 5454

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

# 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

##################################################################
# 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 prueba.mpg>
Format rtp
File "/ruta/a/mi_archivo.mpeg"
</Stream>

4. Grabar y salir

5. Arrancar ffserver como demonio:

ffserver

6. Desde la misma máquina (u otra cambiando lógicamente la ip) probar:

rtsp://localhost:5454/prueba.mpg
informatica/linux/ffserver.1259317754.txt.gz · Last modified: 2015/04/13 20:19 (external edit)