GStreamer Daemon - Slow Motion: Difference between revisions

From RidgeRun Developer Wiki
(Created page with "{{Gstd-1.0 Page|MP4 Video Recording|MP4 Video Recording| For the slow motion examples we will use the se...")
 
No edit summary
Line 1: Line 1:
{{Gstd-1.0 Page|[[Gstd-1.0 - MP4 Video Recording|MP4 Video Recording]]|[[Gstd-1.0 - MP4 Video Recording|MP4 Video Recording]]|
{{Gstd-1.0 Page|[[Gstd-1.0 - MP4 Video Recording|MP4 Video Recording]]|[[Gstd-1.0 - Reverse Playback|Reverse Playback]]|


For the slow motion examples we will use the seek gstd event, with that event we can control the rate, beginning and ending of the pipeline stream.
For the slow motion examples we will use the seek gstd event, with that event we can control the rate, beginning and ending of the pipeline stream.

Revision as of 17:47, 28 June 2017


MP4 Video Recording

Home

Reverse Playback


For the slow motion examples we will use the seek gstd event, with that event we can control the rate, beginning and ending of the pipeline stream.


Example

The following example is a bash script that demonstrates the simple slow motion playback.

#!/bin/bash

# Absolute path to the video location
VIDEO=$video.avi

# Graceful cleanup upon CTRL-C
trap "gstd-client pipeline_delete p; exit" SIGHUP SIGINT SIGTERM

# Make sure there is no pipeline with this name already
gstd-client pipeline_delete p

gstd-client pipeline_create p playbin uri=file://$VIDEO

# Listen to the EOS messages
gstd-client bus_filter p eos

gstd-client pipeline_play p

# Wait for the message to perform seek
while true; do
    gstd-client bus_read p
    gstd-client event_seek p 1.0
done

To run the script you will need an existing video. You may use the video recording simple example to quickly use Gstd-1.0 to record one. To run the Gapless script type

./simple-gapless-playback.sh /tmp/video.mp4




MP4 Video Recording

Home

Reverse Playback