Video

Using these commands you will be able to insert mp4 videos in your projects.

With VideoPlayer commands you can control the GPIO port via the Video-Player timeline.

You can synchronizing timeline video and activating actuator, sound, light and much more...


includes:

omxplayer, D-bus, youtube-dl, GPIO


update system:

sudo youtube-dl -U


VideoPlayer commands:

videoplayer_dimension

videoplayer_xy

video_ctrl

video_pause

video_player and video_close.


videoplayer_dimension (WIDTH) (EIGHT)


Set the dimension of the videoplayer, Width and Height are expressed in pixels.

Example

videoplayer_dimension 640 420
#...

videoplayer_xy (X) (Y)


Example:

videoplayer_xy 400 50
#...

video_ctrl (ID) (TIME) process (MAKESUB_ID)


Example:

# create function 'playsound't
make_sub playsound
sub playsound mp3_load sound.mp3
sub playsound sleep 5

# load 'playsound' function for starting at time :00:00:23
video_ctrl video_id 00:00:23 process playsound

video_player (YOUTUBE_VIDEO)

video_player (FILENAME) hd


Example in SgneepBox-Script:

# create function 'playsound'
make_sub your_sound
sub your_sound mp3_load sound.mp3
sub your_sound sleep 5

# set 'your_sound' function for starting at time 00:00:23 (hh:mm:ss)
video_ctrl video_id 00:00:23 process myfunction

# play video from youtube(streaming) or from USB/HDD:
video_player http://www.youtube.com/watch?v=VideoCode
#OR
# video_player filename.mp4 hd --> for load video from USB/HDD

#...

video_pause


Example:

video_player http://www.youtube.com/watch?v=*VideoCode
sleep 10

#PAUSE
video_pause
sleep 10

#PLAY
video_pause

#...
sleep 10
#close videoplayer
#video_close
Powered by Sgneep.com