Web Digest

还有众多网络文摘,仅供个人收藏和参考

Posts Tagged ‘ffmpeg

ffmpeg+ffserver将IP Camera的RTSP流转换为flv流

with one comment

ffmpeg -rtsp_transport tcp -i rtsp://admin:admin@cam.no-ip.org:554/video.mp4 –vcodec

flv -acodec copy   -r 25  http://127.0.0.1:8010/feed1.ffm -f flv -loglevel quiet

 

 

 

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

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

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

 

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

# Flash

<Stream test.flv>
  # the source feed
  Feed feed1.ffm
  # the output stream format – FLV = FLash Video
  Format flv
  VideoCodec flv
  # VideoCodec mpeg4
  # this must match the ffmpeg -r argument
  VideoFrameRate 25
  # another quality tweak
  # VideoBitRate 900
  # quality ranges – 1-31 (1 = best, 31 = worst)
  VideoQMin 1
  VideoQMax 3

  # VideoBufferSize 80000

  VideoSize 640×480

  # PreRoll 0

  # wecams don’t have audio
  NoAudio

  StartSendOnKey
</Stream>

<Stream stat.html>
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 index.html>
#URL http://www.ffmpeg.org/
# </Redirect>

 

参考文章

http://www.dexmac.com/index.php/how-to/74-streaming-with-ffserver

Written by admin

December 21, 2011 at 5:52 am

Posted in 网站|Site

Tagged with

ffmpeg强制使用TCP方式读取rtsp视频

leave a comment »

ffmpeg -rtsp_transport tcp -i rtsp://admin:admin@cam.no-ip.org:554/video.mp4 -vcodec copy -acodec copy  -r 25  -f flv http://127.0.0.1:8010/feed1.ffm

Written by admin

December 20, 2011 at 6:12 am

Posted in 网站|Site

Tagged with