[FFmpeg-user] Trying to stream desktop screen using rtsp

Dheeraj Prasanth dheeraj at qplaytech.com
Fri Jan 24 05:33:51 CET 2014


Hi,

I am trying to stream my desktop using ffserver over rtsp.
ffmpeg command :

ffmpeg -f x11grab -r 25 -s 1366x768 -i :0.0 -vcodec libvpx -vpre 720p
-threads 0 -s 640x480 http://localhost:8090/feed1.ffm

ffserver :

Port 8090
RTSPPort 5554
BindAddress 0.0.0.0
MaxHTTPConnections 1000
MaxClients 200
MaxBandwidth 10000
CustomLog -

NoDaemon

<Feed feed1.ffm>
# ffmpeg http://localhost:8090/feed1.ffm
File /tmp/feed1.ffm
FileMaxSize 2000M
</Feed>

<Stream stream.sdp>
Format rtp
Feed feed1.ffm

VideoCodec libvpx
VideoBitRate 300
VideoFrameRate 25
VideoSize 1024x768
AVOptionVideo coder 0
AVOptionVideo bf 0
AVOptionVideo flags2 +mixed_refs+fastpskip
AVOptionVideo flags +loop
AVOptionVideo cmp +chroma
AVOptionVideo partitions +parti8x8+parti4x4+partp8x8+partb8x8
AVOptionVideo me_method hex
AVOptionVideo subq 7
AVOptionVideo me_range 16
AVOptionVideo g 250
AVOptionVideo keyint_min 10
AVOptionVideo sc_threshold 40
AVOptionVideo i_qfactor 0.71
AVOptionVideo b_strategy 1
AVOptionVideo qcomp 0.6
AVOptionVideo qmin 10
AVOptionVideo qmax 51
AVOptionVideo qdiff 4
AVOptionVideo refs 3
AVOptionVideo directpred 1
AVOptionVideo trellis 1
AVOptionVideo flags2 +mixed_refs+fastpskip
AVOptionVideo wpredp 0
AVOptionVideo flags +global_header

NoAudio
#AudioCodec aac
#AudioBitRate 96
#AudioChannels 1
#AudioSampleRate 44100
#AVOptionAudio flags +global_header

ACL allow localhost

</Stream>

<Stream stat.html>
Format status

ACL allow localhost
</Stream>

The server is getting started without any problems but when I try to
feed the stream

ffmpeg version 0.8.9-4:0.8.9-0ubuntu0.12.04.1, Copyright (c) 2000-2013
the Libav developers
  built on Nov  9 2013 19:08:00 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in
a future release. Please use avconv instead.
[x11grab @ 0x87f7a0] device: :0.0 -> display: :0.0 x: 0 y: 0 width:
1366 height: 768
[x11grab @ 0x87f7a0] shared memory extension  found
[x11grab @ 0x87f7a0] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0':
  Duration: N/A, start: 1390537781.414726, bitrate: 839270 kb/s
    Stream #0.0: Video: rawvideo, bgra, 1366x768, 839270 kb/s, 25 tbr,
1000k tbn, 25 tbc
[buffer @ 0x88c420] w:1366 h:768 pixfmt:bgra
[avsink @ 0x88c560] auto-inserting filter 'auto-inserted scaler 0'
between the filter 'src' and the filter 'out'
[scale @ 0x890440] w:1366 h:768 fmt:bgra -> w:1366 h:768 fmt:yuv420p flags:0x4
Segmentation fault (core dumped)

But when I try to save the stream from x11grab it gets recorded
without any problem.

ffmpeg -f x11grab -r 25 -s 1366x768 -i :0.0 a.mp4

What did I do wrong? Or is it the way i configured my ffserver?
-- 
Regards
Dheeraj Prasanth
Chief Technical Officer
QPlay Tech Pvt Ltd.
Mob : +918893043923
Email : dheeraj at qplaytech.com


More information about the ffmpeg-user mailing list