Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
streamingbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
POCS
streamingbox
Commits
d24aa961
Commit
d24aa961
authored
5 years ago
by
Nicolas PERNOUD
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit
parents
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+20
-0
20 additions, 0 deletions
README.md
start_stream.sh
+23
-0
23 additions, 0 deletions
start_stream.sh
with
43 additions
and
0 deletions
README.md
0 → 100644
+
20
−
0
View file @
d24aa961
# Streaming box
A simple script to turn an headless raspberry pi 4 (with a
**good**
microphone) into a plug and play youtube streaming box.
## Setup
Set up the pi to boot in logged in (pi user) console mode with
`sudo raspi-config`
.
Copy the
**start_stream.sh**
script into
`/home/pi`
and make it executable with
`chmod +x ./start_stream.sh`
.
Put your youtube API key into the script.
Add
`./start_stream.sh`
at the end of
`/home/pi/.bashrc`
.
## Usage
Plug the microphone. Plug the Raspberry Pi. Enjoy.
## Debug
Debug : boot with a screen and keyboard, use CTRL+C to exit the running script.
This diff is collapsed.
Click to expand it.
start_stream.sh
0 → 100644
+
23
−
0
View file @
d24aa961
#!/bin/sh
KEY
=
"***PUT YOUR YOUTUBE API KEY HERE***"
sleep
30
# Allow time for the raspberry pi to boot
echo
"STREAM BOX STARTED - Press [CTRL+C] to stop..."
while
true
;
do
#Pipe to ffmpeg
#Audio stream
#Video stream (from pipe)
#Audio options
#Video options
#Push to youtube
raspivid
-n
-o
-
-t
0
-hf
-fps
25
-b
6000000 | ffmpeg
-re
\
-thread_queue_size
8192
\
-f
alsa
-i
plughw:1,0
\
-thread_queue_size
8192
\
-f
h264
-i
-
-r
25
\
-ac
1
-acodec
libmp3lame
-ar
44100
-b
:a 128k
\
-vcodec
copy
\
-g
50
-strict
experimental
-f
flv rtmp://a.rtmp.youtube.com/live2/
$KEY
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment