From e96616b16edd23694cbc786639bfc4c2f92ea998 Mon Sep 17 00:00:00 2001 From: Matthew Clark Date: Wed, 18 Apr 2018 00:00:13 +0100 Subject: [PATCH] Try and fix broken markdown headers --- basics.md | 2 +- capturing_images.md | 8 ++++++-- memory_transfer.md | 6 ++++-- mixing.md | 6 +++++- test_streams.md | 10 ++++++++-- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/basics.md b/basics.md index a8591fe..3362881 100644 --- a/basics.md +++ b/basics.md @@ -10,7 +10,7 @@ export SRC=/home/me/videos/test.mp4 ### Play a video (with audio) -`playbin` is a magical element that can play anything: +The magical element `playbin` can play anything: ``` gst-launch-1.0 playbin uri=file://$SRC diff --git a/capturing_images.md b/capturing_images.md index ea6ad69..3ae74c2 100644 --- a/capturing_images.md +++ b/capturing_images.md @@ -1,12 +1,16 @@ # Capturing images (GStreamer command-line cheat sheet) -### Capture an image as png +### Capture an image as PNG + +The `pngenc` element can create a single PNG: ``` gst-launch-1.0 videotestsrc ! pngenc ! filesink location=foo.png ``` -### Capture an image as jpeg +### Capture an image as JPEG + +The `jpegenc` element can create a single JPEG: ``` gst-launch-1.0 videotestsrc ! jpegenc ! filesink location=foo.jpg diff --git a/memory_transfer.md b/memory_transfer.md index 938a3ef..c79cd70 100644 --- a/memory_transfer.md +++ b/memory_transfer.md @@ -4,6 +4,8 @@ The [`shmsink`](https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-pl ### Putting a stream into memory +Put a test video source into memory: + ``` gst-launch-1.0 -v videotestsrc ! \ 'video/x-raw, format=(string)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1' ! \ @@ -26,10 +28,10 @@ gst-launch-1.0 filesrc location=$SRC ! \ ### Reading a stream from memory +This will display the video of a stream locally: + ``` gst-launch-1.0 shmsrc socket-path=/tmp/tmpsock ! \ 'video/x-raw, format=(string)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1' ! \ autovideosink ```` - - diff --git a/mixing.md b/mixing.md index b3cd169..53caf5a 100644 --- a/mixing.md +++ b/mixing.md @@ -97,7 +97,9 @@ gst-launch-1.0 \ Use the `audiomixer` element to mix audio. It replaces the `adder` element, which struggles under some circumstances (according to the [GStreamer 1.14 release notes](https://gstreamer.freedesktop.org/releases/1.14/)). -### Mix two (or more) test streams +### Mix two (or more) test audio streams + +Here we use two different frequencies (tones): ``` gst-launch-1.0 \ @@ -112,6 +114,8 @@ gst-launch-1.0 \ ### Mix two (or more) MP3 files +Ensure `$AUDIO_SRC` and `$AUDIO_SRC2` environment variables are set to mp3 files. + ``` gst-launch-1.0 \ audiomixer name=mix ! audioconvert ! autoaudiosink \ diff --git a/test_streams.md b/test_streams.md index ea5fe96..b7bf510 100644 --- a/test_streams.md +++ b/test_streams.md @@ -1,8 +1,10 @@ # Test streams (GStreamer command-line cheat sheet) -## Video test streams +## Video test streams -### Display a test pattern +### Display a test pattern + +The `videotestsrc` element creates test patterns. Display locally like this: ``` gst-launch-1.0 videotestsrc ! videoconvert ! autovideosink @@ -37,6 +39,8 @@ gst-launch-1.0 -v videotestsrc pattern=snow ! video/x-raw,width=1280,height=720 ### Listen to a test audio (beep) +The element `audiotestsrc` can make a variety of test sounds: + ``` gst-launch-1.0 audiotestsrc ! autoaudiosink ``` @@ -58,6 +62,8 @@ gst-launch-1.0 audiotestsrc volume=0.1 ! autoaudiosink ### White noise +Set `wave` to `white-noise`: + ``` gst-launch-1.0 audiotestsrc wave="white-noise" ! autoaudiosink ```