From 27b046c217f0fecf84e4a4353cb85cbe61dade46 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Sun, 6 Dec 2020 19:41:14 +0100 Subject: [PATCH] update gstreamer pipelines to publish and read audio too --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6e461433..7aefeeaf 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Features: ./rtsp-simple-server ``` -3. Publish a stream. For instance, you can publish a video file with _FFmpeg_: +3. Publish a stream. For instance, you can publish a video/audio file with _FFmpeg_: ``` ffmpeg -re -stream_loop -1 -i file.ts -c copy -f rtsp rtsp://localhost:8554/mystream @@ -38,7 +38,7 @@ Features: or _GStreamer_: ``` - gst-launch-1.0 filesrc location=file.mp4 ! qtdemux ! rtspclientsink location=rtsp://localhost:8554/mystream + gst-launch-1.0 rtspclientsink name=s location=rtsp://localhost:8554/mystream filesrc location=file.mp4 ! qtdemux name=d d.video_0 ! queue ! s.sink_0 d.audio_0 ! queue ! s.sink_1 ``` 4. Open the stream. For instance, you can open the stream with _VLC_: @@ -50,7 +50,7 @@ Features: or _GStreamer_: ``` - gst-launch-1.0 rtspsrc location=rtsp://localhost:8554/mystream ! rtph264depay ! decodebin ! autovideosink + gst-launch-1.0 rtspsrc location=rtsp://localhost:8554/mystream name=s s. ! application/x-rtp,media=video ! decodebin ! autovideosink s. ! application/x-rtp,media=audio ! decodebin ! audioconvert ! audioresample ! autoaudiosink ``` or _FFmpeg_: