gstreamer-cheat-sheet/test_streams.md

55 lines
1.7 KiB
Markdown
Raw Normal View History

2018-02-20 12:23:23 +00:00
# Test streams (GStreamer command-line cheat sheet)
2018-02-20 13:12:12 +00:00
### Display a test pattern
2018-02-20 12:23:23 +00:00
```
gst-launch-1.0 videotestsrc ! videoconvert ! autovideosink
```
2018-02-20 13:12:12 +00:00
This should display the test pattern in a window, that looks a
bit like this:
![Test pattern window](images/test-pattern.png "Test pattern window")
2018-02-20 13:13:44 +00:00
Colons can be used to align columns.
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don't need to make the
raw Markdown line up prettily. You can also use inline Markdown.
Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3
2018-02-20 13:12:12 +00:00
There are multiple test patterns available, such as
2018-02-20 13:14:22 +00:00
| Pattern | Example |
| ------------- |:-------------:|
2018-02-20 13:13:44 +00:00
| `videotestsrc pattern=snow` | ![](images/test_snow.png) |
2018-02-20 13:12:12 +00:00
| `videotestsrc pattern=red` (and blue and green) | !(images/test_red.png) |
| `videotestsrc pattern=red` (and blue and green) | !(images/test_red.png) |
| `videotestsrc pattern=pinwheel` | !(images/test_pinwheel.png) |
| `videotestsrc pattern=smpte100` (color test bars) | !(images/test_smpte100.png) |
| `videotestsrc pattern=colors` | !(images/test_colors.png) |
For the full list of patterns, see https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-videotestsrc.html
### Listen to a test audio (beep)
2018-02-20 12:23:23 +00:00
```
gst-launch-1.0 audiotestsrc ! audioconvert ! autoaudiosink
```
Combine both the test pattern and test audio:
```
gst-launch-1.0 audiotestsrc ! autoaudiosink videotestsrc ! autovideosink
```