You are not logged in.
Hi Guys!
I have an ffserver running and streaming a 3gp file via rtsp. Problem is, vlc, mpayer, and totem all have problems connecting to the stream (so I'm assuming my configuration is incorrect?)
Any ideas?
The ffserver.conf file looks like this:
Port 9091
RTSPPort 5454
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -
NoDaemon
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 500M
</Feed>
<Stream live.mpeg>
Format rtp
File "/tmp/rtp.mp4"
Feed feed1.ffm
VideoCodec mpeg2video
VideoFrameRate 15
VideoBitRate 200
VideoSize 400x320
#AudioCodec mp2
#AudioBitRate 32
#AudioChannels 2
#AudioSampleRate 22050
NoAudio
#Preroll 10
ACL allow 127.0.0.1
</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>
URL http://www.ffmpeg.org/
</Redirect>The log from ffserver looks like this:
$ ffserver -f /tmp/ffserver.conf
FFserver version 0.6-4:0.6-2ubuntu6, Copyright (c) 2000-2010 the FFmpeg developers
built on Oct 5 2010 22:36:53 with gcc 4.4.5
configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
WARNING: library configuration mismatch
libavutil configuration: --extra-version=4:0.6-2ubuntu3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --enable-shared --disable-static
libavcodec configuration: --extra-version=4:0.6-2ubuntu3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-libmp3lame --enable-gpl --enable-postproc --enable-x11grab --enable-libfaad --enable-libxvid --enable-libx264 --enable-librtmp --enable-libdc1394 --enable-shared --disable-static
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Sun Oct 10 12:37:20 2010 FFserver started.
Sun Oct 10 12:38:34 2010 127.0.0.1 - - [DESCRIBE] "rtsp://127.0.0.1:5454/live/mpeg RTSP/1.0" 200 166
Sun Oct 10 12:38:38 2010 127.0.0.1:51118 - - "PLAY live.mpeg/streamid=0 RTP/UDP"
Sun Oct 10 12:38:38 2010 127.0.0.1 - - [] " RTP/UDP" 200 0
Sun Oct 10 12:38:43 2010 127.0.0.1 - - [TEARDOWN] "rtsp://127.0.0.1:5454/live.mpeg RTSP/1.0" 200 819
Sun Oct 10 12:38:43 2010 127.0.0.1:0 - - "PLAY live.mpeg/streamid=0 RTP/TCP"
Sun Oct 10 12:38:43 2010 127.0.0.1 - - [] " RTP/TCP" 200 0
Sun Oct 10 12:38:54 2010 127.0.0.1 - - [PLAY] "rtsp://127.0.0.1:5454/live.mpeg RTSP/1.0" 200 621..and totem's logs look like this:
$ totem rtsp://127.0.0.1:5454/live.mpeg
** Message: Error: Could not read from resource.
gstrtspsrc.c(4408): gst_rtspsrc_send (): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Got error response: 454 (Session Not Found).Offline
I've never used ffserver before, but you may want to try to add a 'Feed' field in the 'Stream live.mpeg' section:
Feed feed1.ffm
Offline
Dude, there is one already! ![]()
Offline
Dude, there is one already!
I'm sick at the moment and seem to be more dense than I previously thought. The strange this is that I read through your code more than once and even double checked what I wrote against your post before I hit send. Sorry about that.
I was looking around the documentation and some sites, and it looks to me like that you have to 'feed' ffserver through ffmpeg:
Offline
Thanks, I was under the impression you could either feed from ffmpeg OR use the file attribute so ffserver would do the encoding itself?
I tried the ffmpeg way but could never get it to play nicely, it kept complaining about bitrate/dimensions even though they were correct (nautilus shows me these)
Am I using the file attribute incorrectly?
Last edited by tommed (2010-10-11 07:38:35)
Offline
That should say ffserver not observer. Bloody Dellstreak Streak!! :S
Offline
Thanks, I was under the impression you could either feed from ffmpeg OR use the file attribute so ffserver would do the encoding itself?
I tried the ffmpeg way but could never get it to play nicely, it kept complaining about bitrate/dimensions even though they were correct (nautilus shows me these)
Am I using the file attribute incorrectly?
You do have mp4 as the file type and mpeg2 as the codec. I'm not sure if that should make any difference seeing that most Linux players ignore containers and look only at streams. I can't remember off of the top of my head how much of mpeg2 video is part of the mpeg4 specification. It may be only TS, but I'm too lazy to look it up. I would try changing that and see if it makes any difference.
I did come across a few posts in my short search that mentioned that ffserver doesn't play well with streaming files. That doesn't make sense to me, but it does to others.
Offline
Ah you could be onto something there..
What I want to do is to convert the mp4 to mpeg2 and resize, and compress it on the fly.
I'm guessing that ffserver can't do this unless I feed it through ffmpeg as mpeg2? So ffmpeg does the conversions and ffserver is just a dumb server relaying the video over rtsp?
I'll try this out and let you know.
Thanks!
(PS. Hope they are wrong about ffserver streaming!!)
Offline