SgneepBox jeOS

Live Streaming with Youtube and USB WebCam

Tutorial

Live Streaming with Youtube and USB WebCam

In this tutorial you learn to insert a dual-state widget button, connected to the function that starts or stops youtube live streaming.

Press AutoRun button in system menù bar for open the control panel

Copy and paste this code in SgneepBox Editor!

Example :

( 1 ) connect usbcam to raspberry Pi3

( 2 ) press WIN + F11 to open sgneepBox editor

( 3 ) copy and paste in editor this code :

# Set USBCAM Microphone ( use arecord -l for device list )

youtube_hw 1

# Set USBCAM AV Streaming

youtube_url rtmp://x.rtmp.youtube.com/****

youtube_key 3ms1-fgvx-b235-3d5za

youtube_stream 320x200

#

#

#

#

#

( 4 ) Launch this script with RUN/RUN SCRIPT in main menù

streaming will start immediately after launching the script

#

Example:

Make two widget button for start and stop streaming:

in sgneepBox Script Editor :

# start streaming ( use button widget):

button_xy bt0 460 451

button_dim bt0 40 40

button_img bt0 button_blue.jpg

button_press bt0 button_red.jpg

button_unpress_call bt0 youtube_stream

button_call bt0 youtube_stream

button_run bt0

#

# stop streaming ( use button widget)

button_xy bt1 460 451

button_dim bt1 40 40

button_img bt1 button_blue.jpg

button_press bt1 button_red.jpg

button_unpress_call bt1 youtube_stream

button_call bt1 youtube_stream

button_run bt1

#

# make subfunction with name 'youtube_stream' and add:

# Set USBCAM Microphone ( use arecord -l for device list )

youtube_hw 1

# Set USBCAM AV Streaming

youtube_url rtmp://x.rtmp.youtube.com/****

youtube_key 3ms1-fgvx-b235-3d5za

youtube_stream 320x200

#

# make subfunction with name 'youtube_stream' and add:

# Set USBCAM Microphone ( use arecord -l for device list )

#

#

#

# make subfunction with name 'youtube_stop' and add:

youtube_kill

( 4 ) Launch this script with RUN/RUN SCRIPT in main menù