how does the streaming video plugin gstreamer script work

407 views
Skip to first unread message

Wilbert Jackson

unread,
Oct 5, 2015, 8:08:08 AM10/5/15
to meetecho-janus
I am new to gstreamer and got a script working that performs screen captures to a file. Next step is to send screen captures to peers using the video streaming plugin. I looked at the test script used in the video streaming plugin demo but do not understand where it gets the video file it streams from. Could someone please briefly explain how it works, and what I need to modify in the screen capture script to stream screens to peers.

Thanks

Wilbert Jackson

Screen capture script
gst-launch-0.10 ximagesrc use-damage=0 ! video/x-raw-rgb,framerate=15/1 ! ffmpegcolorspace ! vp8enc threads=4 quality=10 speed=7 ! mux. pulsesrc ! audio/x-raw-int ! queue ! audioconvert ! vorbisenc ! mux. matroskamux name=mux ! filesink location=test5.mkv

Video Streaming Plugin test script
gst-launch \
audiotestsrc ! \
audioresample ! audio/x-raw-int,channels=1,rate=16000 ! \
opusenc bitrate=20000 ! \
rtpopuspay ! udpsink host=127.0.0.1 port=5002 \
videotestsrc ! \
video/x-raw-rgb,width=320,height=240,framerate=15/1 ! \
videoscale ! videorate ! ffmpegcolorspace ! timeoverlay ! \
vp8enc bitrate=256000 speed=2 max-latency=1 error-resilient=true ! \
rtpvp8pay ! udpsink host=127.0.0.1 port=5004

Lorenzo Miniero

unread,
Oct 6, 2015, 6:17:02 AM10/6/15
to meetecho-janus
That's a question for the gstreamer lists, especially if you're not familiar with how the gstreamer pipelines work.

Cheers,
Lorenzo
Message has been deleted

Mikael Boman

unread,
Oct 8, 2015, 4:04:29 PM10/8/15
to meetecho-janus
Forgot to mention to make sure to use vp8+opus, not vorbis, for webm.
/M

On Thursday, October 8, 2015 at 9:57:11 PM UTC+2, Mikael Boman wrote:
Not sure what you what the problem is, but I never got Gstreamer to stream opus audio properly, so I used ffmpeg instead. Just make sure the opus is not any weird format like 5.1 - if so reduce it to 2 ch stereo. What I did was to transcode video/audio stream it to webm (vp8+opus) and then stream:

ffmpeg -re -i infile.webm -vcodec copy -an -f rtp rtp://127.0.0.1:5004 -vn -acodec copy -f rtp rtp://127.0.0.1:5002

/M


Reply all
Reply to author
Forward
0 new messages