mirror of
https://github.com/matthew1000/gstreamer-cheat-sheet.git
synced 2024-11-27 18:41:02 +00:00
Describe playbin better
This commit is contained in:
parent
c48760ecab
commit
c1349815a3
1 changed files with 13 additions and 4 deletions
15
basics.md
15
basics.md
|
@ -10,13 +10,21 @@ export SRC=/home/me/videos/test.mp4
|
||||||
|
|
||||||
### Play a video (with audio)
|
### Play a video (with audio)
|
||||||
|
|
||||||
|
`playbin` is a magical element that can play anything:
|
||||||
|
|
||||||
```
|
```
|
||||||
gst-launch-1.0 -v playbin uri=file://$SRC
|
gst-launch-1.0 playbin uri=file://$SRC
|
||||||
```
|
```
|
||||||
|
|
||||||
or, if you'd rather have more control of the pipeline:
|
This works with video, audio, RTMP streams, and so much more.
|
||||||
|
|
||||||
|
The 'bin' in 'playbin' means that under-the-hood, it's a collection of elements. For example, we can achieve the same thing by going to the next level of elements, which separate the decoding part from the playing part:
|
||||||
|
|
||||||
|
```
|
||||||
|
gst-launch-1.0 filesrc location=$SRC ! decodebin ! playsink
|
||||||
|
```
|
||||||
|
|
||||||
|
Or, we can split down even further:
|
||||||
|
|
||||||
```
|
```
|
||||||
gst-launch-1.0 filesrc location=$SRC ! \
|
gst-launch-1.0 filesrc location=$SRC ! \
|
||||||
|
@ -88,3 +96,4 @@ gst-launch-1.0 -v \
|
||||||
decodebin ! videoconvert ! videoscale ! video/x-raw,width=100 ! videorate ! video/x-raw,framerate=5/1 ! \
|
decodebin ! videoconvert ! videoscale ! video/x-raw,width=100 ! videorate ! video/x-raw,framerate=5/1 ! \
|
||||||
autovideosink
|
autovideosink
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue