GStreamer Daemon - Slow Motion

From RidgeRun Developer Connection
Revision as of 12:31, 28 June 2017 by Acervantes (talk | contribs) (Created page with "{{Gstd-1.0 Page|MP4 Video Recording|MP4 Video Recording| For the slow motion examples we will use the se...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

MP4 Video Recording

Home

MP4 Video Recording


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.

 1 #!/bin/bash
 2 
 3 # Absolute path to the video location
 4 VIDEO=$video.avi
 5 
 6 # Graceful cleanup upon CTRL-C
 7 trap "gstd-client pipeline_delete p; exit" SIGHUP SIGINT SIGTERM
 8 
 9 # Make sure there is no pipeline with this name already
10 gstd-client pipeline_delete p
11 
12 gstd-client pipeline_create p playbin uri=file://$VIDEO
13 
14 # Listen to the EOS messages
15 gstd-client bus_filter p eos
16 
17 gstd-client pipeline_play p
18 
19 # Wait for the message to perform seek
20 while true; do
21     gstd-client bus_read p
22     gstd-client event_seek p 1.0
23 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

MP4 Video Recording