关于ffmpeg 和ffserver之间的配合工作
关于ffmpeg 和ffserver之间的配合工作
各位大哥,帮下忙:
我的最终目的是在DM6446开发板上的ARM端把采集的视频用过ffserver上传到网络上,故我现在想在PC的REdhat上把ffserver和ffmpeg跑起来。下面的动作的目的是 想把 /home/gzj/asf1.asf的视频文件通过ffmpeg传输到ffserver上,
最后在另一个终端里用ffplay显示出来(我的ffmpeg可以编辑视频文件,比如截图,转换等,ffserver可以启动,ffplay可以播放音视频文件)
执行步骤如下:
先看我的ffserver.conf的配置:
-------------------------------------------------------------------
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -
NoDaemon
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 200K
ACL allow 127.0.0.1
</Feed>
# ASF compatible
<Stream test.asf>
Feed feed1.ffm
Format asf
VideoFrameRate 15
VideoSize 352x240
VideoBitRate 256
VideoBufferSize 40
VideoGopSize 30
AudioBitRate 64
StartSendOnKey
</Stream>
# Server status
<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>
-------------------------------------------
终端的执行步骤如下(黑体字为输入的命令,最后一行为出现的错误,请问下为什么):
我输入的命令:ffserver -f /home/gzj/myFfserverConf/ffserver.conf &
[1] 7570 FFserver version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-shared --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-pthreads --enable-ffserver --enable-ffplay --enable-nonfree
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
built on Jan 13 2010 16:32:51, gcc: 3.4.6 20060404 (Red Hat 3.4.6-3)
Sat Jan 16 09:42:50 2010 FFserver started.
我输入的命令:ffmpeg -i /home/gzj/asf1.asf http://192.168.0.12:8090/feed1.ffm
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-shared --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-pthreads --enable-ffserver --enable-ffplay --enable-nonfree
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
built on Jan 13 2010 16:32:51, gcc: 3.4.6 20060404 (Red Hat 3.4.6-3)
Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 59.92 (719/12)
Input #0, asf, from '/home/gzj/asf1.asf':
Duration: 00:00:07.00, start: 3.100000, bitrate: 323 kb/s
Stream #0.0: Audio: wmav2, 32000 Hz, stereo, s16, 32 kb/s
Stream #0.1: Video: wmv1, yuv420p, 320x240, 59.92 tbr, 1k tbn, 1k tbc
Sat Jan 16 09:43:32 2010 192.168.0.12 - - [GET] "/feed1.ffm HTTP/1.1" 404 149
http://192.168.0.12:8090/feed1.ffm: I/O error occurred
Usually that means that input file is truncated and/or corrupted.
走到这里以后就退出了,请各位大侠说下为什么???谢谢了
------解决方案--------------------