schmich / piriscope

Livestream to Periscope from the Raspberry Pi
MIT License
13 stars 4 forks source link

Add RPi ARM Docker image #10

Open schmich opened 7 years ago

schmich commented 7 years ago
extant89 commented 5 years ago

I have the following problem when building the container? Any hints how to solve?

pi@raspberrypi:~/Downloads/piriscope-master $ sudo docker build -t "piriscope:v1" .

Step 4/7 : COPY piriscope_0.0.1-1_armhf.deb /tmp/piriscope_0.0.1-1_armhf.deb COPY failed: stat /var/lib/docker/tmp/docker-builder553452684/piriscope_0.0.1-1_armhf.deb: no such file or directory

schmich commented 5 years ago

This project is a bit dilapidated, so there are some rough edges.

There are layers needed to build the final piriscope docker image. If you have Ruby installed, most of these steps are easy. If you don't have Ruby, you can open the .rb files and follow along:

1. Build the piriscope executable

ruby -I. build-go-docker.rb

This uses Dockerfile-go to build a docker image that compiles the piriscope executable from the source in piriscope.go. The output is the piriscope executable binary and the piriscope-go image that can be deleted.

2. Build the piriscope Debian package

ruby -I. build-deb-docker.rb

This uses Dockerfile-deb to build an image that creates the Debian package using the output from step 1. The output is the piriscope_0.0.1-1_armhf.deb Debian package and the piriscope-deb image that can be deleted.

3. Finally, build the piriscope docker image

docker build -t "piriscope:v1" .

This uses Dockerfile to build the final Raspbian-based piriscope docker image using the output from step 2. The output is the piriscope:v1 docker image.

Let me know if you hit any other issues.

extant89 commented 5 years ago

When I run I am getting the following errors in periscope and stream doesn't work: Couldn't find H.264 parameter set(s) and Audio codec must be AAC-LC. Settings must be as listed here: https://assets.pscp.tv/help/PeriscopeProducer.pdf

extant89 commented 5 years ago

managed to make it work using the below command. you need to update some config settings in your code:

raspivid -n -o - -t 0 -fps 30 -b 4000000 -w 1280 -h 720 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://or.pscp.tv:80/x/{{KEY}}